diff options
author | Matthieu Patou <mat@matws.net> | 2010-03-03 11:38:51 +0300 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-11 13:31:37 +0100 |
commit | 8306eb1c5f7126a72423e936dc36e77f86532d6b (patch) | |
tree | d43546087322270daa6bffc94fb205d0bf66be0e | |
parent | 5f2f4849e556cb761c7d9fca78cb1ef9e1279974 (diff) | |
download | samba-8306eb1c5f7126a72423e936dc36e77f86532d6b.tar.gz samba-8306eb1c5f7126a72423e936dc36e77f86532d6b.tar.bz2 samba-8306eb1c5f7126a72423e936dc36e77f86532d6b.zip |
s4: create ../lib/iniparser_build/config.m4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | lib/iniparser_build/config.m4 | 45 | ||||
-rw-r--r-- | source4/configure.ac | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/lib/iniparser_build/config.m4 b/lib/iniparser_build/config.m4 new file mode 100644 index 0000000000..282c977c18 --- /dev/null +++ b/lib/iniparser_build/config.m4 @@ -0,0 +1,45 @@ +AC_ARG_WITH(included-iniparser, +[AS_HELP_STRING([--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_EXT(iniparser, LIBINIPARSER_LIBS, iniparser_load) + +fi + +AC_MSG_CHECKING(whether to use included iniparser) +if test x"$ac_cv_lib_ext_iniparser" != x"yes"; then + + iniparserpaths="../iniparser ../lib/iniparser" + for d in $iniparserpaths; do + if test -f "$srcdir/$d/src/iniparser.c"; then + iniparserdir="$d" + break; + fi + done + if test x"$iniparserdir" = "x"; then + AC_MSG_ERROR([cannot find iniparser source in $iniparserpaths]) + fi + INIPARSER_CFLAGS="-I$srcdir/$iniparserdir/src" + AC_MSG_RESULT(yes) + + INIPARSER_OBJS="" + INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/iniparser.o" + INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/dictionary.o" + INIPARSER_OBJS="$INIPARSER_OBJS $srcdir/$iniparserdir/../iniparser_build/strlib.o" + + SMB_SUBSYSTEM(LIBINIPARSER,[$INIPARSER_OBJS],[],[$INIPARSER_CFLAGS]) +else + AC_MSG_RESULT(no) + SMB_EXT_LIB(LIBINIPARSER,,,,${LIBINIPARSER_LIBS}) + SMB_ENABLE(LIBINIPARSER,YES) +fi + diff --git a/source4/configure.ac b/source4/configure.ac index c615169b37..c6bdc54fe3 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -129,6 +129,7 @@ m4_include(../lib/uid_wrapper/config.m4) dnl nsswitch must be before auth as it sets some variable dnl tested by auth/config.m4, libiiniparser must be even before dnl because nsswitch depend also on it +m4_include(../lib/iniparser_build/config.m4) m4_include(../nsswitch/config.m4) m4_include(auth/config.m4) m4_include(kdc/config.m4) |