From 6c3c399d8de7727ef0559542940e4cc44d620f2b Mon Sep 17 00:00:00 2001 From: titan Date: Fri, 16 Mar 2007 05:56:00 +0000 Subject: [PATCH] Rework some of the autofoo that goes along with making exif optional. SVN revision: 28766 --- configure.in | 36 ++++++++++++++++++------------------ src/bin/Makefile.am | 2 +- src/bin/config.h.in | 3 --- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/configure.in b/configure.in index 5f36890..c00f94a 100644 --- a/configure.in +++ b/configure.in @@ -67,25 +67,25 @@ dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory]) -AC_CHECK_HEADERS(sqlite3.h, - SQLITE_LIBS="$SQLITE_LIBS -lsqlite3", - AC_MSG_ERROR([Ephoto needs sqlite3 to compile.]) - ) -AC_SUBST(SQLITE_LIBS) +PKG_CHECK_MODULES([SQLITE], sqlite3, + [ + have_sqlite3="Yes" + ], + [ + have_sqlite3="No" + AC_MSG_ERROR([Ephoto needs sqlite3 to compile.]) + ] +) -if pkg-config --exists sqlite3; then - have_sqlite3="Yes" -else - have_sqlite3="No" - AC_MSG_ERROR([Ephoto needs sqlite3 to compile.]) -fi - -if pkg-config --exists 'libexif >= 0.6.13'; then - have_exif="Yes" - AC_DEFINE(BUILD_EXIF_SUPPORT, 1, [Enable Exif Support]) -else - have_exif="No" -fi +PKG_CHECK_MODULES([EXIF], libexif >= 0.6.13, + [ + have_exif="Yes" + AC_DEFINE(BUILD_EXIF_SUPPORT, 1, [Enable Exif Support]) + ], + [ + have_exif="No" + ] +) PROG="evas-config"; AC_PATH_PROG(EVAS_CONFIG, $PROG, "", $PATH) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 6da1ca3..869b137 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -18,7 +18,7 @@ ephoto_SOURCES = ephoto.c \ ephoto_CFLAGS = @ewl_cflags@ -Wall -Werror -ephoto_LDADD = @ewl_libs@ -lsqlite3 -lexif +ephoto_LDADD = @ewl_libs@ @SQLITE_LIBS@ @EXIF_LIBS@ EXTRA_DIST = \ ephoto.h diff --git a/src/bin/config.h.in b/src/bin/config.h.in index 32fea76..cab8f85 100644 --- a/src/bin/config.h.in +++ b/src/bin/config.h.in @@ -26,9 +26,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SQLITE3_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H