r15321: Reduce the size of rewrite.m4 a bit more
authorJelmer Vernooij <jelmer@samba.org>
Sat, 29 Apr 2006 12:39:19 +0000 (12:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:15 +0000 (14:05 -0500)
source/build/m4/check_ld.m4
source/build/m4/rewrite.m4
source/configure.in
source/include/system/config.m4 [new file with mode: 0644]
source/lib/appweb/config.m4 [new file with mode: 0644]
source/lib/charset/util_unistr.c
source/lib/netif/config.m4
source/lib/replace/config.m4
source/lib/replace/replace.c
source/main.mk
source/nsswitch/config.m4 [new file with mode: 0644]

index 3840459894f3b3427cabfcb7609124537f34321b..b98c2dab3c6f2e91f84acc7dddfa2fc6aee280e5 100644 (file)
@@ -1,6 +1,7 @@
 dnl SMB Build Environment LD Checks
 dnl -------------------------------------------------------
 dnl  Copyright (C) Stefan (metze) Metzmacher 2004
+dnl  Copyright (C) Jelmer Vernooij 2006
 dnl  Released under the GNU GPL
 dnl -------------------------------------------------------
 dnl
@@ -8,3 +9,198 @@ dnl Check if we use GNU ld
 AC_PATH_PROG(LD, ld)
 AC_PROG_LD_GNU
 AC_PATH_PROG(AR, ar)
+
+AC_SUBST(SHLIBEXT)
+AC_SUBST(LDSHFLAGS)
+AC_SUBST(SONAMEFLAG)
+AC_SUBST(DYNEXP)
+AC_SUBST(PICFLAG)
+
+AC_SUBST(BLDSHARED)
+# Assume non-shared by default and override below
+BLDSHARED="false"
+
+# these are the defaults, good for lots of systems
+DYNEXP=
+HOST_OS="$host_os"
+LDSHFLAGS="-shared"
+SONAMEFLAG=""
+SHLD="\${CC}"
+PICFLAG=""
+PICSUFFIX="po"
+SHLIBEXT="so"
+
+AC_MSG_CHECKING([ability to build shared libraries])
+
+# and these are for particular systems
+case "$host_os" in
+       *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
+               BLDSHARED="true"
+               LDSHFLAGS="-shared" 
+               DYNEXP="-Wl,--export-dynamic"
+               PICFLAG="-fPIC"
+               SONAMEFLAG="-Wl,-soname="
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
+               BLDSHARED="true"
+               LDSHFLAGS="-G"
+               if test "${GCC}" = "yes"; then
+                       PICFLAG="-fPIC"
+                       if test "${ac_cv_prog_gnu_ld}" = "yes"; then
+                               DYNEXP="-Wl,-E"
+                       fi
+               else
+                       PICFLAG="-KPIC"
+                       ## ${CFLAGS} added for building 64-bit shared 
+                       ## libs using Sun's Compiler
+                       LDSHFLAGS="-G \${CFLAGS}"
+                       PICSUFFIX="po.o"
+               fi
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+               ;;
+       *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
+               BLDSHARED="true"
+               LDSHFLAGS="-G"
+               PICFLAG="-KPIC"   # Is this correct for SunOS
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *netbsd* | *freebsd*)  BLDSHARED="true"
+               LDSHFLAGS="-shared"
+               DYNEXP="-Wl,--export-dynamic"
+               PICFLAG="-fPIC -DPIC"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+               ;;
+       *openbsd*)  BLDSHARED="true"
+               LDSHFLAGS="-shared"
+               DYNEXP="-Wl,-Bdynamic"
+               PICFLAG="-fPIC"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+               ;;
+       *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
+               ATTEMPT_WRAP32_BUILD=yes
+               BLDSHARED="true"
+               LDSHFLAGS="-set_version sgi1.0 -shared"
+               SONAMEFLAG="-soname "
+               SHLD="\${LD}"
+               if test "${GCC}" = "yes"; then
+                       PICFLAG="-fPIC"
+               else 
+                       PICFLAG="-KPIC"
+               fi
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
+               ;;
+       *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
+               BLDSHARED="true"
+               LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry,-berok"
+               DYNEXP="-Wl,-brtl,-bexpall,-bbigtoc"
+               PICFLAG="-O2"
+               if test "${GCC}" != "yes"; then
+                       ## for funky AIX compiler using strncpy()
+                       CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
+               fi
+
+               AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
+               ;;
+       *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
+               SHLIBEXT="sl"
+               # Use special PIC flags for the native HP-UX compiler.
+               if test $ac_cv_prog_cc_Ae = yes; then
+                       BLDSHARED="true"
+                       SHLD="/usr/bin/ld"
+                       LDSHFLAGS="-B symbolic -b -z"
+                       SONAMEFLAG="+h "
+                       PICFLAG="+z"
+               fi
+               DYNEXP="-Wl,-E"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
+               ;;
+       *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
+               BLDSHARED="true"
+               LDSHFLAGS="-shared"
+               SONAMEFLAG="-Wl,-soname,"
+               PICFLAG="-fPIC"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
+               BLDSHARED="true"
+               LDSHFLAGS="-shared"
+               SONAMEFLAG="-Wl,-soname,"
+               PICFLAG="-KPIC"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
+               case "$host" in
+                       *-univel-*)     if [ test "$GCC" != yes ]; then
+                                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
+                               fi
+                               LDSHFLAGS="-G"
+                                       DYNEXP="-Bexport"
+                       ;;
+                       *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
+               esac
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+
+       *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
+               if [ test "$GCC" != yes ]; then
+                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
+               fi
+               LDSHFLAGS="-G"
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+       *-vms)
+               BLDSHARED="false"
+               LDSHFLAGS=""
+               ;;
+       *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
+               BLDSHARED="false"
+               LDSHFLAGS=""
+               ;;
+       *)
+               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+               ;;
+esac
+AC_MSG_RESULT($BLDSHARED)
+AC_MSG_CHECKING([linker flags for shared libraries])
+AC_MSG_RESULT([$LDSHFLAGS])
+AC_MSG_CHECKING([compiler flags for position-independent code])
+AC_MSG_RESULT([$PICFLAGS])
+
+#######################################################
+# test whether building a shared library actually works
+if test $BLDSHARED = true; then
+AC_CACHE_CHECK([whether building shared libraries actually works], 
+               [ac_cv_shlib_works],[
+   ac_cv_shlib_works=no
+   # try building a trivial shared library
+   if test "$PICSUFFIX" = "po"; then
+     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/build/tests/shlib.c &&
+       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+       ac_cv_shlib_works=yes
+   else
+     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/build/tests/shlib.c &&
+       mv shlib.$PICSUFFIX shlib.po &&
+       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
+       ac_cv_shlib_works=yes
+   fi
+   rm -f shlib.so shlib.po
+])
+if test $ac_cv_shlib_works = no; then
+   BLDSHARED=false
+fi
+fi
+
+
index deac542e2bdf8df49ee48939d7c00c86398148d8..cca933b8dab45a7eeb8a2382442d8dcf922c0770 100644 (file)
@@ -1,12 +1,6 @@
 dnl Checks for programs.
 dnl Unique-to-Samba variables we'll be playing with.
 
-AC_SUBST(SHLIBEXT)
-AC_SUBST(LDSHFLAGS)
-AC_SUBST(SONAMEFLAG)
-AC_SUBST(DYNEXP)
-AC_SUBST(PICFLAG)
-
 AC_SYS_LARGEFILE
 
 #
@@ -46,21 +40,7 @@ case "$host_os" in
 
 esac
 
-
-AC_HEADER_DIRENT
-AC_HEADER_TIME
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
-AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h compat.h math.h)
-AC_CHECK_HEADERS(ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
-AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
-AC_CHECK_HEADERS(sys/fs/s5param.h sys/filsys.h termios.h termio.h)
-AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h)
-AC_CHECK_HEADERS(locale.h shadow.h)
-AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h)
-AC_CHECK_HEADERS(sys/acl.h)
-
-AC_CHECK_HEADERS(sys/capability.h)
+AC_CHECK_HEADERS(stdarg.h string.h )
 
 
 AC_TYPE_SIGNAL
@@ -76,20 +56,6 @@ AC_CHECK_TYPE(loff_t,off_t)
 AC_CHECK_TYPE(offset_t,loff_t)
 AC_CHECK_TYPES(long long)
 
-
-AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [
-    AC_TRY_COMPILE([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#include <signal.h>],[sig_atomic_t i = 0],
-       samba_cv_sig_atomic_t=yes,samba_cv_sig_atomic_t=no)])
-if test x"$samba_cv_sig_atomic_t" = x"yes"; then
-   AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
-fi
-
 AC_FUNC_MEMCMP
 
 AC_CHECK_FUNCS(setsid pipe crypt16 getauthuid)
@@ -97,193 +63,6 @@ AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction)
 AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep)
 AC_CHECK_FUNCS(backtrace setbuffer)
 
-AC_SUBST(BLDSHARED)
-# Assume non-shared by default and override below
-BLDSHARED="false"
-
-# these are the defaults, good for lots of systems
-DYNEXP=
-HOST_OS="$host_os"
-LDSHFLAGS="-shared"
-SONAMEFLAG=""
-SHLD="\${CC}"
-PICFLAG=""
-PICSUFFIX="po"
-SHLIBEXT="so"
-
-AC_MSG_CHECKING([ability to build shared libraries])
-
-# and these are for particular systems
-case "$host_os" in
-       *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
-               BLDSHARED="true"
-               LDSHFLAGS="-shared" 
-               DYNEXP="-Wl,--export-dynamic"
-               PICFLAG="-fPIC"
-               SONAMEFLAG="-Wl,-soname="
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
-               BLDSHARED="true"
-               LDSHFLAGS="-G"
-               if test "${GCC}" = "yes"; then
-                       PICFLAG="-fPIC"
-                       if test "${ac_cv_prog_gnu_ld}" = "yes"; then
-                               DYNEXP="-Wl,-E"
-                       fi
-               else
-                       PICFLAG="-KPIC"
-                       ## ${CFLAGS} added for building 64-bit shared 
-                       ## libs using Sun's Compiler
-                       LDSHFLAGS="-G \${CFLAGS}"
-                       PICSUFFIX="po.o"
-               fi
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-               ;;
-       *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
-               BLDSHARED="true"
-               LDSHFLAGS="-G"
-               PICFLAG="-KPIC"   # Is this correct for SunOS
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *netbsd* | *freebsd*)  BLDSHARED="true"
-               LDSHFLAGS="-shared"
-               DYNEXP="-Wl,--export-dynamic"
-               PICFLAG="-fPIC -DPIC"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-               ;;
-       *openbsd*)  BLDSHARED="true"
-               LDSHFLAGS="-shared"
-               DYNEXP="-Wl,-Bdynamic"
-               PICFLAG="-fPIC"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-               ;;
-       *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
-               ATTEMPT_WRAP32_BUILD=yes
-               BLDSHARED="true"
-               LDSHFLAGS="-set_version sgi1.0 -shared"
-               SONAMEFLAG="-soname "
-               SHLD="\${LD}"
-               if test "${GCC}" = "yes"; then
-                       PICFLAG="-fPIC"
-               else 
-                       PICFLAG="-KPIC"
-               fi
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
-               ;;
-       *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
-               BLDSHARED="true"
-               LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry,-berok"
-               DYNEXP="-Wl,-brtl,-bexpall,-bbigtoc"
-               PICFLAG="-O2"
-               if test "${GCC}" != "yes"; then
-                       ## for funky AIX compiler using strncpy()
-                       CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
-               fi
-
-               AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
-               ;;
-       *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
-               SHLIBEXT="sl"
-               # Use special PIC flags for the native HP-UX compiler.
-               if test $ac_cv_prog_cc_Ae = yes; then
-                       BLDSHARED="true"
-                       SHLD="/usr/bin/ld"
-                       LDSHFLAGS="-B symbolic -b -z"
-                       SONAMEFLAG="+h "
-                       PICFLAG="+z"
-               fi
-               DYNEXP="-Wl,-E"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
-               ;;
-       *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
-               BLDSHARED="true"
-               LDSHFLAGS="-shared"
-               SONAMEFLAG="-Wl,-soname,"
-               PICFLAG="-fPIC"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
-               BLDSHARED="true"
-               LDSHFLAGS="-shared"
-               SONAMEFLAG="-Wl,-soname,"
-               PICFLAG="-KPIC"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
-               case "$host" in
-                       *-univel-*)     if [ test "$GCC" != yes ]; then
-                                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
-                               fi
-                               LDSHFLAGS="-G"
-                                       DYNEXP="-Bexport"
-                       ;;
-                       *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
-               esac
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-
-       *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
-               if [ test "$GCC" != yes ]; then
-                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
-               fi
-               LDSHFLAGS="-G"
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-       *-vms)
-               BLDSHARED="false"
-               LDSHFLAGS=""
-               ;;
-       *vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
-               BLDSHARED="false"
-               LDSHFLAGS=""
-               ;;
-       *)
-               AC_DEFINE(STAT_ST_BLOCKSIZE,512)
-               ;;
-esac
-AC_MSG_RESULT($BLDSHARED)
-AC_MSG_CHECKING([linker flags for shared libraries])
-AC_MSG_RESULT([$LDSHFLAGS])
-AC_MSG_CHECKING([compiler flags for position-independent code])
-AC_MSG_RESULT([$PICFLAGS])
-
-#######################################################
-# test whether building a shared library actually works
-if test $BLDSHARED = true; then
-AC_CACHE_CHECK([whether building shared libraries actually works], 
-               [ac_cv_shlib_works],[
-   ac_cv_shlib_works=no
-   # try building a trivial shared library
-   if test "$PICSUFFIX" = "po"; then
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/build/tests/shlib.c &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
-       ac_cv_shlib_works=yes
-   else
-     $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.$PICSUFFIX ${srcdir-.}/build/tests/shlib.c &&
-       mv shlib.$PICSUFFIX shlib.po &&
-       $CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.so shlib.po &&
-       ac_cv_shlib_works=yes
-   fi
-   rm -f shlib.so shlib.po
-])
-if test $ac_cv_shlib_works = no; then
-   BLDSHARED=false
-fi
-fi
-
 AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[
 AC_TRY_RUN([
 #include <sys/types.h>
@@ -369,24 +148,6 @@ if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
     AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
 fi
 
-case "$host_os" in
-*linux*)
-AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
-AC_TRY_COMPILE([
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-#ifdef HAVE_SYS_CAPABILITY_H
-#include <sys/capability.h>
-#endif
-],[int i;],
-   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes)])
-if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
-   AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
-fi
-;;
-esac
-
 AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[
 AC_TRY_COMPILE([
 #include <unistd.h>
index 1dedd148f5779a2a7a4556be11c81a9ed9e63474..bec62f5b0a0a6feee48146a506717ec86ffca45a 100644 (file)
@@ -11,10 +11,11 @@ AC_CONFIG_HEADER(include/config_tmp.h)
 
 # Configuration rules.
 sinclude(build/m4/env.m4)
-sinclude(build/m4/rewrite.m4)
 sinclude(lib/replace/config.m4)
 sinclude(lib/replace/win32/config.m4)
 sinclude(lib/replace/repdir/config.m4)
+sinclude(include/system/config.m4)
+sinclude(build/m4/rewrite.m4)
 sinclude(heimdal_build/config.m4)
 sinclude(lib/util/fsusage.m4)
 sinclude(lib/util/capability.m4)
@@ -45,6 +46,8 @@ sinclude(web_server/config.m4)
 sinclude(auth/config.m4)
 sinclude(kdc/config.m4)
 sinclude(ntvfs/sysdep/config.m4)
+sinclude(lib/appweb/config.m4)
+sinclude(nsswitch/config.m4)
 
 AC_ARG_ENABLE(dso,
 [  --enable-dso                Enable building internal libraries as DSO's (experimental)],
diff --git a/source/include/system/config.m4 b/source/include/system/config.m4
new file mode 100644 (file)
index 0000000..2c62b57
--- /dev/null
@@ -0,0 +1,43 @@
+# filesys
+AC_HEADER_DIRENT 
+AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/acl.h sys/resource.h sys/ioctl.h sys/mode.h sys/filio.h sys/fs/s5param.h sys/filsys.h )
+
+# select
+AC_CHECK_HEADERS(sys/select.h)
+
+# time
+AC_CHECK_HEADERS(sys/time.h utime.h)
+AC_HEADER_TIME
+
+# wait
+AC_HEADER_SYS_WAIT
+AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <signal.h>],[sig_atomic_t i = 0],
+       samba_cv_sig_atomic_t=yes,samba_cv_sig_atomic_t=no)])
+if test x"$samba_cv_sig_atomic_t" = x"yes"; then
+   AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
+fi
+
+# capability
+AC_CHECK_HEADERS(sys/capability.h)
+
+# passwd
+AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h)
+
+# iconv
+AC_CHECK_HEADERS(ctype.h locale.h)
+
+# glob
+AC_CHECK_HEADERS(fnmatch.h)
+
+# shmem
+AC_CHECK_HEADERS(sys/ipc.h sys/mman.h sys/shm.h )
+
+# terminal
+AC_CHECK_HEADERS(termios.h termio.h sys/termio.h )
diff --git a/source/lib/appweb/config.m4 b/source/lib/appweb/config.m4
new file mode 100644 (file)
index 0000000..69b4048
--- /dev/null
@@ -0,0 +1 @@
+AC_CHECK_HEADERS(math.h)
index f55e39085667713bf3b56e8c4c45eae24ef47278..1eb198d6f9cffe02f651bb287d41a95f0aa1c08c 100644 (file)
@@ -268,7 +268,7 @@ _PUBLIC_ BOOL strcsequal_w(const char *s1,const char *s2)
 **/
 _PUBLIC_ void string_replace_w(char *s, char oldc, char newc)
 {
-       while (*s) {
+       for (; s && *s; s++) {
                size_t size;
                codepoint_t c = next_codepoint(s, &size);
                if (c == oldc) {
index 76d1bfa9d5086080595db610c964ae0f676a0e54..9880440f21662d22acc66bf550e594cb4819b368 100644 (file)
@@ -1,4 +1,4 @@
-AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h)
+AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h)
 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
 
 ##################
index bf46bdcc58d78fa4400021f76b80e504df7dd156..12e3607bb4c38be8eaebcc856a841842edabc0c0 100644 (file)
@@ -81,6 +81,7 @@ AC_HAVE_DECL(vasprintf, [#include <stdio.h>])
 AC_HAVE_DECL(vsnprintf, [#include <stdio.h>])
 AC_HAVE_DECL(snprintf, [#include <stdio.h>])
 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf)
+AC_CHECK_HEADERS(strings.h)
 
 AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
 AC_TRY_RUN([
@@ -177,4 +178,4 @@ else
     fi
 fi
 
-AC_CHECK_HEADERS([sys/param.h])
+AC_CHECK_HEADERS([sys/param.h limits.h])
index 5d3ef529872675a15f2c598d76586f39f06b1f45..90f05d6c907bdce9761c6b4357f938024bbb1f0f 100644 (file)
@@ -22,6 +22,7 @@
 #include "system/wait.h"
 #include "system/time.h"
 #include "system/network.h"
+#include "system/filesys.h"
 #include "system/iconv.h"
 
  void replace_dummy(void);
index 13a39d8e781ff0ba1820ddcba36009304db2ec3e..b47428bdf57d871083cf4eee2ad6dc2602c59976 100644 (file)
@@ -233,6 +233,7 @@ clean:: clean_pch
        @echo Removing libraries
        @-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES)
        @-rm -f bin/*.$(SHLIBEXT)*
+       @-rm -f bin/*.a
        @echo Removing modules
        @-rm -f bin/modules/*/*.$(SHLIBEXT)
        @-rm -f bin/*_init_module.c
diff --git a/source/nsswitch/config.m4 b/source/nsswitch/config.m4
new file mode 100644 (file)
index 0000000..ab8e2b9
--- /dev/null
@@ -0,0 +1 @@
+AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h )