diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2011-05-02 20:13:14 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2011-05-02 20:13:14 -0400 |
commit | 91af8f14863a516ff9aa80b703d8a34583e6e107 (patch) | |
tree | 552390f62fd0a060625a65f53006378c2a3eb2c3 /configure.in | |
parent | 2fb05c7c4516d1ae3f0ad46df50043bbaa17ccb7 (diff) | |
parent | 647e4ca02ad06939dea2e6b1dcf71ee510867cd4 (diff) | |
download | duser-91af8f14863a516ff9aa80b703d8a34583e6e107.tar.gz |
Merge pull request #4 from extrarius/master.
Additional Cleaning
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 32 |
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]) |