From c8fabfbf1919da16e16ec3e998aa0e8ccd9ed0d3 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 11 Apr 2006 16:57:16 +0000 Subject: r15043: Only build our copy of iniparser when the system doesn't have one. Guenther (This used to be commit 5ae22cf46b1077b8892a2941a2891fe7412f1b9f) --- source3/Makefile.in | 8 ++++---- source3/configure.in | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/Makefile.in b/source3/Makefile.in index 8f3112c7e2..7a30b297dd 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -116,7 +116,7 @@ LIBSMBSHAREMODES_MAJOR=0 LIBSMBSHAREMODES_MINOR=2 FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/tdb @SMBWRAP_INC@ -I. $(CPPFLAGS) -I$(srcdir) -D_SAMBA_BUILD_ -FLAGS2 = -I$(srcdir)/iniparser/src +FLAGS2 = FLAGS3 = FLAGS4 = FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) @@ -512,7 +512,7 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \ - lib/replace1.o $(SNPRINTF_OBJ) $(INIPARSER_OBJ) + lib/replace1.o $(SNPRINTF_OBJ) PAM_WINBIND_PICOBJ = $(PAM_WINBIND_OBJ:.o=.@PICSUFFIX@) @@ -1209,10 +1209,10 @@ bin/winbindd@EXEEXT@: $(WINBINDD_OBJ) @BUILD_POPT@ bin/.dummy $(LDAP_LIBS) $(KRB5LIBS) \ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ -bin/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_PICOBJ) bin/.dummy +bin/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_PICOBJ) @BUILD_INIPARSER@ bin/.dummy @echo "Linking shared library $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \ - @SONAMEFLAG@`basename $@` $(LIBS) -lpam + @SONAMEFLAG@`basename $@` $(LIBS) @INIPARSERLIBS@ -lpam bin/rhosts.@SHLIBEXT@: $(AUTH_RHOSTS_OBJ:.o=.@PICSUFFIX@) @echo "Building plugin $@" diff --git a/source3/configure.in b/source3/configure.in index f21ee2faa8..1aa4adf4f0 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -5313,6 +5313,43 @@ AC_SUBST(BUILD_POPT) AC_SUBST(POPTLIBS) AC_SUBST(FLAGS1) +################################################# +# Check to see if we should use the included iniparser + +AC_ARG_WITH(included-iniparser, +[ --with-included-iniparser use bundled iniparser library, not from system], +[ + case "$withval" in + yes) + INCLUDED_INIPARSER=yes + ;; + no) + INCLUDED_INIPARSER=no + ;; + esac ], +) +if test x"$INCLUDED_INIPARSER" != x"yes"; then + AC_CHECK_LIB(iniparser, iniparser_load, + INCLUDED_INIPARSER=no, INCLUDED_INIPARSER=yes) +fi + +AC_MSG_CHECKING(whether to use included iniparser) +if test x"$INCLUDED_INIPARSER" = x"yes"; then + AC_MSG_RESULT(yes) + BUILD_INIPARSER='$(INIPARSER_OBJ)' + INIPARSERLIBS='$(INIPARSER_OBJ)' + FLAGS1="$FLAGS1 -I$srcdir/iniparser/src" +else + AC_MSG_RESULT(no) + BUILD_INIPARSER="" + INIPARSERLIBS="-liniparser" +fi +AC_SUBST(BUILD_INIPARSER) +AC_SUBST(INIPARSERLIBS) +AC_SUBST(FLAGS1) + + + ################################################# # Check if the user wants Python -- cgit