aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in32
1 files changed, 19 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 9705e98..63a1747 100644
--- a/configure.in
+++ b/configure.in
@@ -14,6 +14,14 @@ AC_CONFIG_SRCDIR([src/duser.c])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+# Initializing libtool.
+AC_DISABLE_SHARED
+AC_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+LIBTOOL="$LIBTOOL --silent"
# Checks for libraries.
@@ -25,22 +33,15 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
-AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr strchrnul strcasestr])
+AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr])
-# Checks for currently used operating system.
+# Detect if the host operating system is SunOS/Solaris as it behaves slightly different
+# than GNU/Linux
case "$host_os" in
- *linux*)
- CFLAGS="-O2 -Wall -Wextra -I../include"
- AC_DEFINE([__NLINUX__], 1, [host operating system is linux])
- ;;
- *solaris*)
- # The STSCI Build of GNU GCC has a broken -Wextra handler
- CFLAGS="-O2 -Wall -I../include"
- AC_DEFINE([__NSOLARIS__], 1, [host operating system is solaris])
+ *sunos*|solaris*)
+ AC_DEFINE([HAVE_SOLARIS], 1, [host operating system is solaris])
;;
*)
- AC_MSG_ERROR([duser does not currently support your platform])
- ;;
esac
# Figure out where everything goes in the filesystem
@@ -52,4 +53,9 @@ AC_SUBST(CONFIGDIR)
AC_DEFINE_UNQUOTED([CFG_PATH], "$CFGPATH", [duser configuration path])
-AC_OUTPUT([Makefile src/Makefile])
+# Compiler Warnings Options
+AC_ARG_ENABLE(warnings,
+AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]),
+[CFLAGS="$CFLAGS -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wredundant-decls -Wshadow -Wwrite-strings -W -Wno-unused"],[])
+
+AC_OUTPUT([Makefile compat/Makefile src/Makefile])