diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-02-12 08:07:46 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2004-02-12 08:07:46 +0000 |
commit | e46d297083c6e656774d94bb8153334836a27937 (patch) | |
tree | 1b0231ae6eb3d7be7e85e841b62740ea175909a9 /source4/lib/popt | |
parent | 45e446248d36087dd53c341051424beb058bd99d (diff) | |
download | samba-e46d297083c6e656774d94bb8153334836a27937.tar.gz samba-e46d297083c6e656774d94bb8153334836a27937.tar.xz samba-e46d297083c6e656774d94bb8153334836a27937.zip |
move the -lpopt replacement to a LIBPOPT subsystem
metze
(This used to be commit 9eb593a7c065326dafbba896ed723d0ea5cb00ed)
Diffstat (limited to 'source4/lib/popt')
-rw-r--r-- | source4/lib/popt/config.m4 | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/source4/lib/popt/config.m4 b/source4/lib/popt/config.m4 index 7532c5826e7..0be7d308c7d 100644 --- a/source4/lib/popt/config.m4 +++ b/source4/lib/popt/config.m4 @@ -1,31 +1,40 @@ ################################################# -# Check to see if we should use the included popt +# Check to see if we should use the included popt +INCLUDED_POPT=auto AC_ARG_WITH(included-popt, [ --with-included-popt use bundled popt library, not from system], [ - case "$withval" in +case "$withval" in yes) INCLUDED_POPT=yes ;; no) - INCLUDED_POPT=no - ;; - esac ], + INCLUDED_POPT=no + ;; +esac ], ) if test x"$INCLUDED_POPT" != x"yes"; then - AC_CHECK_LIB(popt, poptGetContext, - INCLUDED_POPT=no, INCLUDED_POPT=yes) + AC_CHECK_HEADERS(popt.h) + AC_CHECK_LIB_EXT(popt, TMP_LIBPOPT_LIBS, poptGetContext, [], [], INCLUDED_POPT=no) + if test x"$ac_cv_header_popt_h" = x"no"; then + INCLUDED_POPT=yes + TMP_LIBPOPT_LIBS="" + fi fi AC_MSG_CHECKING(whether to use included popt) -if test x"$INCLUDED_POPT" = x"yes"; then - AC_MSG_RESULT(yes) - BUILD_POPT='$(POPT_OBJS)' - FLAGS1="-I$srcdir/popt" +if test x"$INCLUDED_POPT" != x"no"; then + TMP_LIBPOPT_OBJS="popt/findme.o popt/popt.o popt/poptconfig.o \ + popt/popthelp.o popt/poptparse.o" + CPPFLAGS="$CPPFLAGS -I$srcdir/popt" + AC_MSG_RESULT(yes) else - AC_MSG_RESULT(no) - LIBS="$LIBS -lpopt" + AC_MSG_RESULT(no) fi -AC_SUBST(BUILD_POPT) -AC_SUBST(FLAGS1) + +SMB_SUBSYSTEM(LIBPOPT,[], + [${TMP_LIBPOPT_OBJS}], + [], + [], + [${TMP_LIBPOPT_LIBS}]) |