From c61089219b82ff94f83e1fb428e8b47ad778c868 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 2 Feb 2004 13:43:03 +0000 Subject: - we now specify the object files in the subsystems config.m4 file I plan to convert all objectfile group to use SMB_SUBSYSTEM later I'll add a SMB_BINARY() and SMB_LIBRARY(), then there will be no more need to touch Makefile.in, because all make rules will be autogenerated by configure - convert the PROCESS_MODEL subsystem to this new scheme and move the pthread test to smbd/process_model.m4 - convert the CHARSET subsystem to this new scheme and move the iconv test to lib/iconv.m4 (This used to be commit 2e57ee884ebea194ee79ac20e84e385481b56aa2) --- source4/configure.in | 89 ++-------------------------------------------------- 1 file changed, 3 insertions(+), 86 deletions(-) (limited to 'source4/configure.in') diff --git a/source4/configure.in b/source4/configure.in index 4c95e7e2a2..12998b1727 100644 --- a/source4/configure.in +++ b/source4/configure.in @@ -1248,70 +1248,6 @@ if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then AC_DEFINE(HAVE_UTIMBUF,1,[Whether struct utimbuf is available]) fi -ICONV_LOCATION=standard -LOOK_DIRS="/usr /usr/local /sw" -AC_ARG_WITH(libiconv, -[ --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) ], -[ - if test "$withval" = "no" ; then - AC_MSG_ERROR(I won't take no for an answer) - else - if test "$withval" != "yes" ; then - LOOK_DIRS="$withval $LOOK_DIRS" - fi - fi -]) - -ICONV_FOUND="no" -for i in $LOOK_DIRS ; do - save_LIBS=$LIBS - save_LDFLAGS=$LDFLAGS - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-I$i/include" - LDFLAGS="-L$i/lib" - LIBS= - export LDFLAGS LIBS CPPFLAGS -dnl Try to find iconv(3) - jm_ICONV($i) - - CPPFLAGS=$save_CPPFLAGS - if test -n "$ICONV_FOUND" ; then - LDFLAGS=$save_LDFLAGS - LIB_ADD_DIR(LDFLAGS, "$i/lib") - CFLAGS_ADD_DIR(CPPFLAGS, "$i/include") - LIBS="$save_LIBS $LIBS" - ICONV_LOCATION=$i - export LDFLAGS LIBS CPPFLAGS - break - else - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - export LDFLAGS LIBS CPPFLAGS - fi -done - -############ -# check for iconv in libc -AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[ -AC_TRY_RUN([ -#include -main() { - iconv_t cd = iconv_open("ASCII", "UCS-2LE"); - if (cd == 0 || cd == (iconv_t)-1) return -1; - return 0; -} -], -samba_cv_HAVE_NATIVE_ICONV=yes,samba_cv_HAVE_NATIVE_ICONV=no,samba_cv_HAVE_NATIVE_ICONV=cross)]) -if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then - AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv]) -fi - -if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then - AC_MSG_WARN([Sufficient support for iconv function was not found. - Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!]) -fi - - AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[ AC_TRY_RUN([ #include @@ -1778,25 +1714,6 @@ if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES,1,[Whether the nisplus include files are broken]) fi -################################################# -# check for pthread support -AC_MSG_CHECKING(whether to use pthreads) -AC_ARG_WITH(pthreads, -[ --with-pthreads Include pthreads (default=no) ], -[ case "$withval" in - yes) - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_PTHREADS,1,[Whether to use pthreads]) - SMBD_EXTRA_OBJS="smbd/process_thread.o" - SMBD_EXTRA_LIBS="-lpthread" - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], - AC_MSG_RESULT(no) -) - AC_SUBST(SMBD_EXTRA_OBJS) AC_SUBST(SMBD_EXTRA_LIBS) @@ -2067,8 +1984,8 @@ AC_ARG_WITH(static-modules, done fi ]) -SMB_SUBSYSTEM(CHARSET,lib/iconv.o) - +sinclude(lib/iconv.m4) +sinclude(smbd/process_model.m4) sinclude(ntvfs/config.m4) sinclude(rpc_server/config.m4) @@ -2101,4 +2018,4 @@ dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS CFLAGS_REMOVE_USR_INCLUDE(CFLAGS) CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS) -AC_OUTPUT(include/stamp-h Makefile script/findsmb) +AC_OUTPUT(include/stamp-h Makefile) -- cgit