Don't link everything against lib{z,bz2,pam,gdbm}.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 14 Aug 2007 17:10:59 +0000 (19:10 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 14 Aug 2007 17:10:59 +0000 (19:10 +0200)
clients/gtk2/Makefile.am
configure.in
daemon/Makefile.am

index 7cbf39a..13561ad 100644 (file)
@@ -21,7 +21,7 @@ BUILT_SOURCES=        mainwnd.gtk inpdialog.gtk pref.gtk reslist.gtk
 main.c: mainwnd.gtk inpdialog.gtk pref.gtk reslist.gtk
 
 localedir=$(datadir)/locale
-dolcon_LDFLAGS=        @GTK2_LIBS@ @LIBXML_LIBS@
+dolcon_LDFLAGS=        @GTK2_LIBS@ @LIBXML_LIBS@ -lbz2
 dolcon_LDADD=$(top_srcdir)/lib/libdcui.la $(top_srcdir)/common/libhttp.a
 dolcon_CPPFLAGS=@GTK2_CFLAGS@ @LIBXML_CFLAGS@ \
                -DLOCALEDIR=\"$(localedir)\"
index 37eef90..bbeca73 100644 (file)
@@ -23,9 +23,9 @@ AC_PROG_LIBTOOL
 
 DOLDA_AC_GROUP([Checking required libraries])
 
-AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** must have zlib]))
-AC_CHECK_LIB(bz2, BZ2_bzWriteOpen, , AC_MSG_ERROR([*** must have bzlib]))
-AC_CHECK_LIB(gdbm, gdbm_open, , AC_MSG_ERROR([*** must have gdbm]))
+AC_CHECK_LIB(z, deflate, [:], AC_MSG_ERROR([*** must have zlib]))
+AC_CHECK_LIB(bz2, BZ2_bzWriteOpen, [:], AC_MSG_ERROR([*** must have bzlib]))
+AC_CHECK_LIB(gdbm, gdbm_open, [:], AC_MSG_ERROR([*** must have gdbm]))
 
 extlibs=
 experimental=no
@@ -37,7 +37,8 @@ pam_msg=no
 AH_TEMPLATE(HAVE_PAM, [define to compile support for PAM authentication])
 AC_ARG_WITH(pam, [  --with-pam              Enable PAM support])
 DOLDA_PKG([HAS_PAM], [test "$with_pam" = no && HAS_PAM=no],
-                    [AC_CHECK_LIB(pam, pam_start, , [HAS_PAM=no])])
+                    [AC_CHECK_LIB(pam, pam_start, [:], [HAS_PAM=no])],
+                    [PAM_LIBS=-lpam])
 if test "$with_pam" = yes -a "$HAS_PAM" = no; then
        AC_MSG_ERROR([*** cannot find PAM on this system])
 fi
@@ -45,6 +46,7 @@ if test "$HAS_PAM" = yes; then
        AC_DEFINE(HAVE_PAM)
        pam_msg=yes
 fi
+AC_SUBST(PAM_LIBS)
 
 # Gtk 2.0 check
 AC_ARG_WITH(gtk2, [  --with-gtk2             Enable GTK2 support])
index 0f240d7..3ff8bef 100644 (file)
@@ -26,5 +26,5 @@ doldacond_SOURCES=    main.c \
 
 EXTRA_DIST=emacs-local
 doldacond_LDADD=$(top_srcdir)/common/libcommon.a \
-               @KRB5_LIBS@ -lbz2 -lz
+               @KRB5_LIBS@ -lbz2 -lz -lgdbm @PAM_LIBS@
 doldacond_CPPFLAGS=-I$(top_srcdir)/include -DDAEMON @KRB5_CFLAGS@