--- syncekonnector/configure.in.in.old 2006-01-11 21:11:42.000000000 +0900 +++ syncekonnector/configure.in.in 2006-01-11 23:10:52.000000000 +0900 @@ -1,5 +1,40 @@ SYNCE_CHECK_RRA +dnl look for kde-config +AC_ARG_WITH(kde-config, + AC_HELP_STRING([--with-kde-config=FILE], [exec prefix where KDE-CONFIG is installed (optional)]), + kde_config="$withval", kde_config="kde-config") + +dnl setup lib/lib64 logic +AC_ARG_WITH(libdir, + AC_HELP_STRING([--with-libdir=DIR], [directory where LIBRARIES are installed (optional lib/lib64)]), + libdirsuffix="$withval", libdirsuffix="lib") + +dnl see if kde-config exists +dnl if --with-kde-config has +dnl a value +KDE_CONFIG=$kde_config +if test "x$kde_config" != "xkde-config" ; then + AC_CHECK_FILE($KDE_CONFIG, + [], + [ + AC_MSG_ERROR([kde-config not found!]) + exit + ] + ) +fi + +dnl setup kde library directories +LIBDIR=$libdirsuffix +KDE_PREFIX=`$KDE_CONFIG --prefix` +KDE_LIBS="-L$KDE_PREFIX/$LIBDIR" +AC_SUBST(KDE_LIBS) + +dnl adjust ldflags so AC_CHECK_LIBS +dnl compiles the tests properly +OLD_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $KDE_LIBS" + AC_CHECK_LIB(kabc_file, main, [ LIB_KABC_FILE="-lkabc_file" @@ -31,6 +66,8 @@ ] ) AC_SUBST(LIB_KSYNC) +dnl revert ldflags back +LDFLAGS="$OLD_LDFLAGS" AC_CHECK_FILE($kde_includes/kitchensync/filter.h, [ @@ -41,4 +78,4 @@ exit ] ) -AC_SUBST(KITCHENSYNC_INCLUDES) +AC_SUBST(KITCHENSYNC_INCLUDES) --- syncekonnector/Makefile.am.old 2006-01-11 22:36:58.000000000 +0900 +++ syncekonnector/Makefile.am 2006-01-11 23:03:56.000000000 +0900 @@ -36,6 +36,6 @@ servicedir = $(kde_servicesdir)/kresources/konnector service_DATA = syncekonnector.desktop libsyncekonnector_la_LIBADD = $(RRA_LIB) $(RAPI_LIB) $(SYNCE_LIB)\ - $(LIB_KABC_FILE) $(LIB_KONNECTOR) $(LIB_KSYNC) + $(KDE_LIBS) $(LIB_KABC_FILE) $(LIB_KONNECTOR) $(LIB_KSYNC) AM_CFLAGS = -pedantic-errors -Wall AM_CXXFLAGS = -pedantic-errors -Wall