summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/configure.ac')
-rw-r--r--src/core/configure.ac55
1 files changed, 42 insertions, 13 deletions
diff --git a/src/core/configure.ac b/src/core/configure.ac
index e22d9ae..1528b38 100644
--- a/src/core/configure.ac
+++ b/src/core/configure.ac
@@ -36,31 +36,60 @@ dnl Checks for library functions.
AC_FUNC_FORK
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_TYPE_SIGNAL
AC_FUNC_STAT
+AC_CHECK_FUNCS([remove])
+
+dnl Check if gcc provides va_copy or __va_copy
+AC_MSG_CHECKING([for va_copy])
+AC_TRY_COMPILE([
+ #include <stdarg.h>
+ ], [
+ va_list ap, aq;
+ va_copy(ap, aq);
+ ],
+ [va_copy="va_copy"],
+ [AC_TRY_COMPILE([
+ #include <stdarg.h>
+ ], [
+ va_list ap, aq;
+ __va_copy(ap, aq);
+ ],
+ [va_copy="__va_copy"],
+ [AC_MSG_ERROR([Unable to determine name of va_copy macro])]
+ )]
+)
+AC_MSG_RESULT([$va_copy])
+if test x"$va_copy" != xva_copy ; then
+ AC_DEFINE_UNQUOTED([va_copy], [$va_copy],
+ [va_copy macro proviced by gcc (undefined if its va_copy, else defined
+ to proper name)]
+ )
+fi
dnl check if we have 32bit or 64bit output
AC_ARG_ENABLE([debug],
- AS_HELP_STRING([--enable-debug],
- [enable debugging - very verbose (default=disabled)]),
- [enable_debug="$enableval"],
- [enable_debug="no"]
+ AS_HELP_STRING([--enable-debug],
+ [enable debugging - very verbose (default=disabled)]),
+ [enable_debug="$enableval"],
+ [enable_debug="no"]
)
if test x"$enable_debug" != xno ; then
- CFLAGS="$CFLAGS -ggdb -DRC_DEBUG"
+ CFLAGS="$CFLAGS -ggdb -DRC_DEBUG -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"
fi
+CFLAGS="$CFLAGS -Wall"
+
RCSCRIPTS_DEFINES='-DETCDIR="\"$(sysconfdir)\"" -DLIBDIR="\"$(libdir)\"" -DBINDIR="\"$(bindir)\"" -DSBINDIR="\"$(sbindir)\""'
AC_SUBST([RCSCRIPTS_DEFINES])
AC_OUTPUT([
- Makefile
- scripts/Makefile
- data/Makefile
- librcscripts/Makefile
- src/Makefile
- tests/Makefile
+ Makefile
+ scripts/Makefile
+ data/Makefile
+ librcscripts/Makefile
+ src/Makefile
+ tests/Makefile
])
+