I like --enable-developer, but I find it rather usless when all it gets me is a
[ira/wip.git] / source3 / configure.in
index a70f35ae0dafb3611fb38b35de6f07bcf9d7caa8..9bf64384e16525ce5360940f6457e333a18652bf 100644 (file)
@@ -33,6 +33,11 @@ AC_ARG_ENABLE(developer, [  --enable-developer      turn on developer warnings a
        CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
     fi])
 
+AC_ARG_ENABLE(krb5developer, [  --enable-krb5developer      turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]],
+    [if eval "test x$enable_krb5developer = xyes"; then
+       CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
+    fi])
+
 AC_ARG_ENABLE(dmalloc, [  --enable-dmalloc          enable heap debugging [default=no]])
 
 if test "x$enable_dmalloc" = xyes
@@ -563,7 +568,7 @@ else
     RUNPROG=""
 fi
 
-AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot)
+AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
 AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid)
 AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
@@ -690,6 +695,7 @@ case "$host_os" in
                        BLDSHARED="true"
                        LDSHFLAGS="-shared" 
                        PICFLAG="-fPIC"
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                ;;
                *solaris*) AC_DEFINE(SUNOS5)
                        BLDSHARED="true"
@@ -701,6 +707,7 @@ case "$host_os" in
                                POBAD_CC=""
                                PICSUFFIX="po.o"
                        fi
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                ;;
                *sunos*) AC_DEFINE(SUNOS4)
                        BLDSHARED="true"
@@ -710,6 +717,7 @@ case "$host_os" in
                *bsd*)  BLDSHARED="true"
                        LDSHFLAGS="-Wl,-soname,\$@ -shared"
                        PICFLAG="-fPIC"
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                ;;
                *irix*) AC_DEFINE(IRIX)
                        case "$host_os" in
@@ -724,11 +732,13 @@ case "$host_os" in
                        else 
                                PICFLAG="-KPIC"
                        fi
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                ;;
                *aix*) AC_DEFINE(AIX)
                        BLDSHARED="true"
                        LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
                        PICFLAG="-O2 -qmaxmem=6000"
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE)
                ;;
                *hpux*) AC_DEFINE(HPUX)
                        SHLIBEXT="sl"
@@ -738,6 +748,7 @@ case "$host_os" in
                                LDSHFLAGS="-b -z +h \$@"
                                PICFLAG="+z"
                        fi
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,8192)
                ;;
                *qnx*) AC_DEFINE(QNX);;
                *osf*) AC_DEFINE(OSF1)
@@ -867,6 +878,19 @@ if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
     AC_DEFINE(HAVE_INO64_T)
 fi
 
+AC_CACHE_CHECK([for dev64_t],samba_cv_HAVE_DEV64_T,[
+AC_TRY_RUN([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <sys/stat.h>
+main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }],
+samba_cv_HAVE_DEV64_T=yes,samba_cv_HAVE_DEV64_T=no,samba_cv_HAVE_DEV64_T=cross)])
+if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
+    AC_DEFINE(HAVE_DEV64_T)
+fi
+
 AC_CACHE_CHECK([for struct dirent64],samba_cv_HAVE_STRUCT_DIRENT64,[
 AC_TRY_COMPILE([
 #if defined(HAVE_UNISTD_H)
@@ -880,6 +904,30 @@ if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
     AC_DEFINE(HAVE_STRUCT_DIRENT64)
 fi
 
+AC_CACHE_CHECK([for major macro],samba_cv_HAVE_DEVICE_MAJOR_FN,[
+AC_TRY_RUN([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+main() { dev_t dev; int i = major(dev); return 0; }],
+samba_cv_HAVE_DEVICE_MAJOR_FN=yes,samba_cv_HAVE_DEVICE_MAJOR_FN=no,samba_cv_HAVE_DEVICE_MAJOR_FN=cross)])
+if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
+    AC_DEFINE(HAVE_DEVICE_MAJOR_FN)
+fi
+
+AC_CACHE_CHECK([for minor macro],samba_cv_HAVE_DEVICE_MINOR_FN,[
+AC_TRY_RUN([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+main() { dev_t dev; int i = minor(dev); return 0; }],
+samba_cv_HAVE_DEVICE_MINOR_FN=yes,samba_cv_HAVE_DEVICE_MINOR_FN=no,samba_cv_HAVE_DEVICE_MINOR_FN=cross)])
+if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
+    AC_DEFINE(HAVE_DEVICE_MINOR_FN)
+fi
+
 AC_CACHE_CHECK([for unsigned char],samba_cv_HAVE_UNSIGNED_CHAR,[
 AC_TRY_RUN([#include <stdio.h>
 main() { char c; c=250; exit((c > 0)?0:1); }],
@@ -1549,6 +1597,15 @@ exit(1);
   fi
 fi
 
+AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>],
+[struct stat st;  st.st_blocks = 0;],
+samba_cv_HAVE_STAT_ST_BLOCKS=yes,samba_cv_HAVE_STAT_ST_BLOCKS=no,samba_cv_HAVE_STAT_ST_BLOCKS=cross)])
+if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
+    AC_DEFINE(HAVE_STAT_ST_BLOCKS)
+fi 
 
 case "$host_os" in
 *linux*)
@@ -2540,7 +2597,6 @@ fi
 
 # Display test results
 
-
 WINBIND_TARGETS=""
 WINBIND_STARGETS=""
 WINBIND_LTARGETS=""
@@ -2617,6 +2673,6 @@ AC_OUTPUT(include/stamp-h Makefile)
 # Print very concise instructions on building/use
 if test "x$enable_dmalloc" = xyes
 then
-       AC_MSG_RESULT([Note: The dmalloc debug library will be included.])
-       AC_MSG_RESULT([      Use the \"dmalloc\" command to turn it on.])
-fi
\ No newline at end of file
+       AC_MSG_RESULT([Note: The dmalloc debug library will be included.  To turn it on use])
+       AC_MSG_RESULT([      \$ eval \`dmalloc samba\`.])
+fi