summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/aclocal.m42
-rw-r--r--source4/build/m4/check_cc.m412
-rw-r--r--source4/configure.ac2
-rw-r--r--source4/lib/ldb/aclocal.m42
-rw-r--r--source4/lib/ldb/configure.ac3
-rw-r--r--source4/lib/replace/aclocal.m42
-rw-r--r--source4/lib/replace/configure.ac2
-rw-r--r--source4/lib/replace/libreplace.m44
-rw-r--r--source4/lib/replace/libreplace_macros.m43
-rw-r--r--source4/lib/replace/samba.m42
-rw-r--r--source4/lib/talloc/aclocal.m42
-rw-r--r--source4/lib/talloc/configure.ac3
-rw-r--r--source4/lib/tdb/aclocal.m42
-rw-r--r--source4/lib/tdb/configure.ac2
14 files changed, 17 insertions, 26 deletions
diff --git a/source4/aclocal.m4 b/source4/aclocal.m4
index f5437e6683..df29bf1995 100644
--- a/source4/aclocal.m4
+++ b/source4/aclocal.m4
@@ -34,7 +34,7 @@ AC_DEFUN(LIB_REMOVE_USR_LIB,[
$1=[$]ac_new_flags
])
-m4_include(lib/replace/libreplace_macros.m4)
+m4_include(lib/replace/libreplace.m4)
m4_include(build/m4/ax_cflags_gcc_option.m4)
m4_include(build/m4/ax_cflags_irix_option.m4)
m4_include(build/m4/public.m4)
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index 311caa342e..d8dd407891 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -5,14 +5,7 @@ dnl Released under the GNU GPL
dnl -------------------------------------------------------
dnl
-# don't let the AC_PROG_CC macro auto set the CFLAGS
-OLD_CFLAGS="${CFLAGS}"
-AC_PROG_CC
-CFLAGS="${OLD_CFLAGS}"
-if test x"$CC" = x""; then
- AC_MSG_WARN([No c compiler was not found!])
- AC_MSG_ERROR([Please Install gcc from http://gcc.gnu.org/])
-fi
+AC_LIBREPLACE_CC_CHECKS
if test x"$GCC" = x"yes" ; then
AC_MSG_CHECKING([for version of gcc])
@@ -29,9 +22,6 @@ if test x$ac_cv_prog_cc_g = xyes -a x$debug = xyes; then
CFLAGS="${CFLAGS} -g"
fi
-dnl needed before AC_TRY_COMPILE
-AC_ISC_POSIX
-
############################################
# check if the compiler handles c99 struct initialization
LIBREPLACE_C99_STRUCT_INIT(samba_cv_c99_struct_initialization=yes,
diff --git a/source4/configure.ac b/source4/configure.ac
index 6c238aeb13..548db4d720 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -11,8 +11,8 @@ AC_CONFIG_HEADER(include/config_tmp.h)
AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h])
# Configuration rules.
-m4_include(lib/replace/samba.m4)
m4_include(build/m4/env.m4)
+m4_include(lib/replace/samba.m4)
m4_include(lib/smbreadline/readline.m4)
m4_include(heimdal_build/config.m4)
m4_include(lib/util/fault.m4)
diff --git a/source4/lib/ldb/aclocal.m4 b/source4/lib/ldb/aclocal.m4
index 2a7ad94963..5605e476ba 100644
--- a/source4/lib/ldb/aclocal.m4
+++ b/source4/lib/ldb/aclocal.m4
@@ -1 +1 @@
-m4_include(libreplace_macros.m4)
+m4_include(libreplace.m4)
diff --git a/source4/lib/ldb/configure.ac b/source4/lib/ldb/configure.ac
index 1666a94de1..70a4100451 100644
--- a/source4/lib/ldb/configure.ac
+++ b/source4/lib/ldb/configure.ac
@@ -13,7 +13,8 @@ AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/ldb.h)
AC_CONFIG_SRCDIR([common/ldb.c])
-m4_include(libreplace.m4)
+
+AC_LIBREPLACE_ALL_CHECKS
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
diff --git a/source4/lib/replace/aclocal.m4 b/source4/lib/replace/aclocal.m4
index 2a7ad94963..5605e476ba 100644
--- a/source4/lib/replace/aclocal.m4
+++ b/source4/lib/replace/aclocal.m4
@@ -1 +1 @@
-m4_include(libreplace_macros.m4)
+m4_include(libreplace.m4)
diff --git a/source4/lib/replace/configure.ac b/source4/lib/replace/configure.ac
index cf1fe8defc..48fb7ce259 100644
--- a/source4/lib/replace/configure.ac
+++ b/source4/lib/replace/configure.ac
@@ -3,7 +3,7 @@ AC_INIT(replace.c)
AC_CONFIG_SRCDIR([replace.c])
AC_CONFIG_HEADER(config.h)
-m4_include(libreplace.m4)
+AC_LIBREPLACE_ALL_CHECKS
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall"
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index 293b2380a8..53655e6544 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -303,4 +303,6 @@ AC_LIBREPLACE_BROKEN_CHECKS
AC__LIBREPLACE_ALL_CHECKS_END
])
-AC_LIBREPLACE_ALL_CHECKS
+m4_include(libreplace_cc.m4)
+m4_include(libreplace_macros.m4)
+m4_include(autoconf-2.60.m4)
diff --git a/source4/lib/replace/libreplace_macros.m4 b/source4/lib/replace/libreplace_macros.m4
index 67a770c9e2..6c1110dc4b 100644
--- a/source4/lib/replace/libreplace_macros.m4
+++ b/source4/lib/replace/libreplace_macros.m4
@@ -251,6 +251,3 @@ define(AC_ADD_INCLUDE,
EOF
])
-m4_include(libreplace_cc.m4)
-m4_include(autoconf-2.60.m4)
-
diff --git a/source4/lib/replace/samba.m4 b/source4/lib/replace/samba.m4
index c6c5e63b7f..3769c7f50e 100644
--- a/source4/lib/replace/samba.m4
+++ b/source4/lib/replace/samba.m4
@@ -1,4 +1,4 @@
-m4_include(lib/replace/libreplace.m4)
+AC_LIBREPLACE_BROKEN_CHECKS
SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL}])
SMB_ENABLE(LIBREPLACE_EXT)
diff --git a/source4/lib/talloc/aclocal.m4 b/source4/lib/talloc/aclocal.m4
index 2a7ad94963..5605e476ba 100644
--- a/source4/lib/talloc/aclocal.m4
+++ b/source4/lib/talloc/aclocal.m4
@@ -1 +1 @@
-m4_include(libreplace_macros.m4)
+m4_include(libreplace.m4)
diff --git a/source4/lib/talloc/configure.ac b/source4/lib/talloc/configure.ac
index acde824b87..51e7256bf8 100644
--- a/source4/lib/talloc/configure.ac
+++ b/source4/lib/talloc/configure.ac
@@ -4,7 +4,8 @@ AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
-m4_include(libreplace.m4)
+AC_LIBREPLACE_ALL_CHECKS
+
m4_include(libtalloc.m4)
AC_PATH_PROG(XSLTPROC,xsltproc)
diff --git a/source4/lib/tdb/aclocal.m4 b/source4/lib/tdb/aclocal.m4
index 2a7ad94963..5605e476ba 100644
--- a/source4/lib/tdb/aclocal.m4
+++ b/source4/lib/tdb/aclocal.m4
@@ -1 +1 @@
-m4_include(libreplace_macros.m4)
+m4_include(libreplace.m4)
diff --git a/source4/lib/tdb/configure.ac b/source4/lib/tdb/configure.ac
index 9da1d85ae2..bf73b12450 100644
--- a/source4/lib/tdb/configure.ac
+++ b/source4/lib/tdb/configure.ac
@@ -5,6 +5,6 @@ AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/tdb.h)
AC_CONFIG_SRCDIR([common/tdb.c])
AC_CONFIG_HEADER(include/config.h)
-m4_include(libreplace.m4)
+AC_LIBREPLACE_ALL_CHECKS
m4_include(libtdb.m4)
AC_OUTPUT(Makefile tdb.pc)