summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in70
1 files changed, 27 insertions, 43 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 381ad4e3a6..bc5ad59c00 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5,6 +5,8 @@ AC_PREREQ(2.53)
AC_INIT(include/includes.h)
AC_CONFIG_HEADER(include/config.h)
+AC_LIBREPLACE_LOCATION_CHECKS
+
AC_DISABLE_STATIC
AC_ENABLE_SHARED
@@ -228,6 +230,7 @@ done
])
SAMBA_CPPFLAGS="-Iinclude -I${srcdir-.}/include -I. -I${srcdir-.}"
+SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/lib/replace"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/tdb/include"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns"
SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc"
@@ -303,6 +306,19 @@ AC_SUBST(EXTRA_ALL_TARGETS)
AC_SUBST(CONFIG_LIBS)
AC_SUBST(NSCD_LIBS)
+# compile with optimization and without debugging by default, but
+# allow people to set their own preference.
+# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
+# if it has no value. This prevent *very* large debug binaries from occurring
+# by default.
+if test "x$CFLAGS" = x; then
+ CFLAGS="-O"
+fi
+
+CFLAGS="${CFLAGS} -D_SAMBA_BUILD_"
+
+AC_LIBREPLACE_CC_CHECKS
+
# Set defaults
PIE_CFLAGS=""
PIE_LDFLAGS=""
@@ -371,17 +387,6 @@ AC_ARG_WITH(smbtorture4_path,
esac
])
-# compile with optimization and without debugging by default, but
-# allow people to set their own preference.
-# do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2"
-# if it has no value. This prevent *very* large debug binaries from occurring
-# by default.
-if test "x$CFLAGS" = x; then
- CFLAGS="-O"
-fi
-
-CFLAGS="${CFLAGS} -D_SAMBA_BUILD_"
-
AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
[if eval "test x$enable_developer = xyes"; then
developer=yes
@@ -441,18 +446,6 @@ AC_ARG_WITH(profiling-data,
dnl Checks for programs.
-##
-## for some reason this macro resets the CFLAGS
-## so save and restore
-##
-OLD_CFLAGS=${CFLAGS}
-AC_PROG_CC
-CFLAGS=${OLD_CFLAGS}
-
-OLD_CFLAGS=${CFLAGS}
-AC_PROG_CPP
-CFLAGS=${OLD_CFLAGS}
-
AC_PROG_INSTALL
AC_PROG_AWK
AC_PATH_PROG(PERL, perl)
@@ -495,9 +488,6 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
fi
fi
-dnl needed before AC_TRY_COMPILE
-AC_ISC_POSIX
-
dnl look for executable suffix
AC_EXEEXT
@@ -562,12 +552,10 @@ UNAME_P=`(uname -p) 2>/dev/null` || UNAME_P="unknown"
AC_MSG_CHECKING(uname -p)
AC_MSG_RESULT(${UNAME_P})
-AC_CANONICAL_SYSTEM
-
dnl Add #include for broken IRIX header files
case "$host_os" in
*irix6*)
- AC_ADD_INCLUDE(<standards.h>)
+ #TODO add to libreplace
if test x"$ac_cv_prog_gcc" != x"yes" ; then
dnl Fix sensible defaults for MIPSPro compilers. The
dnl error numbers are valid for the 7.3 compilers,
@@ -585,8 +573,6 @@ dnl Add #include for broken IRIX header files
;;
esac
-AC_VALIDATE_CACHE_SYSTEM_TYPE
-
DYNEXP=
dnl Add modules that have to be built by default here
@@ -609,13 +595,6 @@ fi
case "$host_os" in
# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
*hpux*)
-
- AC_PROG_CC_FLAG(Ae)
- # mmap on HPUX is completely broken...
- AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
- if test $ac_cv_prog_cc_Ae = yes; then
- CPPFLAGS="$CPPFLAGS -Ae"
- fi
#
# Defines needed for HPUX support.
# HPUX has bigcrypt but (sometimes?) doesn't use it for
@@ -860,11 +839,16 @@ exit(1);
esac
-AC_INLINE
-AC_HEADER_STDC
-AC_HEADER_DIRENT
-AC_HEADER_TIME
-AC_HEADER_SYS_WAIT
+AC_LIBREPLACE_BROKEN_CHECKS
+
+LIBREPLACE_DIR=`echo ${libreplacedir} |sed -e 's/^\.\///g'`
+
+LIBREPLACE_OBJS=""
+for obj in ${LIBREPLACEOBJ}; do
+ LIBREPLACE_OBJS="${LIBREPLACE_OBJS} ${LIBREPLACE_DIR}/${obj}"
+done
+AC_SUBST(LIBREPLACE_OBJS)
+
AC_CHECK_HEADERS(aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h)
AC_CHECK_HEADERS(limits.h float.h)