diff --git a/configure.in b/configure.in index 59b5401d..51b9dc68 100644 --- a/configure.in +++ b/configure.in @@ -58,14 +58,8 @@ esac dnl Checks for libraries. AC_CHECK_LIB(pthread,pthread_create,LDFLAGS="$LDFLAGS -lpthread") -AC_ARG_WITH(gdbm, - [--with-gdbm store music info in gdbm databases], - [ case "${withval}" in - yes) use_gdbm=true; LDFLAGS="${LDFLAGS} -lgdbm"; CPPFLAGS="${CPPFLAGS} -DWITH_GDBM";; - no) use_gdbm=false;; - *) AC_MSG_ERROR(bad value ${withval} for --with-gdbm);; - esac ], [use_gdbm=false]) -AM_CONDITIONAL(COND_USE_GDBM, test x$use_gdbm = xtrue) +dnl no with gdbm anymore +LDFLAGS="${LDFLAGS} -lgdbm"; AC_ARG_WITH(gdbm-includes, [--with-gdbm-includes[[=DIR]] use gdbm include files in DIR],[ @@ -107,6 +101,12 @@ AC_ARG_WITH(id3tag, LDFLAGS="${LDFLAGS} -L$withval/lib" fi ]) + + +AC_CHECK_HEADERS(gdbm.h,LDFLAGS="${LDFLAGS} -lgdbm", [ + AC_MSG_ERROR([gdbm.h not found... try --with-gdmb-includes=dir])]]) +AC_CHECK_LIB(gdbm,gdbm_open,LDFLAGS="$LDFLAGS -lgdbm", echo "Must have gdbm";exit) + AC_CHECK_HEADERS(id3tag.h,LDFLAGS="${LDFLAGS} -lid3tag",[ AC_MSG_ERROR([id3tag.h not found... try --with-id3tag=dir])]) AC_CHECK_LIB(id3tag,id3_file_open,LDFLAGS="$LDFLAGS -lid3tag",echo "Must have libid3tag";exit) diff --git a/src/Makefile.am b/src/Makefile.am index 3621c64e..e7109927 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,12 +6,6 @@ AM_YFLAGS=-d sbin_PROGRAMS = mt-daapd -if COND_USE_GDBM -DBFILE=db-gdbm.c redblack.c -else -DBFILE=db-memory.c -endif - if COND_REND_POSIX PRENDSRC=mDNS.c mDNSClientAPI.h mDNSDebug.h mDNSPosix.c mDNSUNP.c rend-posix.c mDNSPlatformFunctions.h endif @@ -26,7 +20,7 @@ endif mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \ webserver.h configfile.c configfile.h err.c err.h restart.c restart.h \ - daap-proto.c daap-proto.h daap.c daap.h $(DBFILE) db-memory.h \ + daap-proto.c daap-proto.h daap.c daap.h db-gdbm.c db-memory.h \ mp3-scanner.h mp3-scanner.c playlist.c playlist.h rend-unix.c \ rend-unix.h lexer.l parser.y strcasestr.c strcasestr.h strsep.c \ $(PRENDSRC) $(ORENDSRC) $(HRENDSRC) @@ -34,7 +28,7 @@ mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \ EXTRA_DIST = mDNS.c mDNSClientAPI.h mDNSDebug.h mDNSPosix.c \ mDNSUNP.c mDNSPlatformFunctions.h mDNSPosix.h mDNSUNP.h \ rend-howl.c rend-posix.c rend-osx.c strcasestr.c strsep.c db-memory.c \ - db-gdbm.c strcasestr.h redblack.c redblack.h + db-gdbm.c strcasestr.h redblack.c redblack.h db-memory.c