diff options
author | Alan Brault <alan.brault@incruentatus.net> | 2011-05-02 18:47:10 -0400 |
---|---|---|
committer | Alan Brault <alan.brault@incruentatus.net> | 2011-05-02 18:47:10 -0400 |
commit | c14ecfe452046c00ffe83171ec7f9b64ff374795 (patch) | |
tree | 605a01281d2227d85048e0fe6875de5635170a71 /configure.in | |
parent | 817b384592e730f4f832bfbe92a948970840ee33 (diff) | |
download | duser-c14ecfe452046c00ffe83171ec7f9b64ff374795.tar.gz |
Make strcasestr() and strchrnul() into separate compat files
Force everyone to use compat functions not just Solaris
Remove libsysfs from buildconf
Add libtool support (needed for libdusercompat.a)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/configure.in b/configure.in index 9705e98..212f199 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. @@ -27,20 +35,13 @@ AC_TYPE_SIZE_T AC_FUNC_MALLOC AC_CHECK_FUNCS_ONCE([memset strcasecmp strdup strerror strncasecmp strstr strchrnul strcasestr]) -# 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]) |