aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2011-09-16 13:04:03 -0400
committerJoseph Hunkeler <jhunk@stsci.edu>2011-09-16 13:04:03 -0400
commit4af2842fc43143d76020b8cc3f4ece4a9922aa55 (patch)
tree9c6519a45cf7e2fd523a2c5baa95b4e0d531adc7 /configure.in
parentb5a75739bb208be9dadcf87beda8ccd33f73f2a1 (diff)
downloadduser-4af2842fc43143d76020b8cc3f4ece4a9922aa55.tar.gz
Instead of detecting the host type, you may use --enable-compat instead.
Enabling compat will build and link against a static library containing string functions not found in older version of glibc.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 13 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index bcf5ee2..033acf0 100644
--- a/configure.in
+++ b/configure.in
@@ -7,8 +7,10 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.11.1)
+AC_CONFIG_FILES([Makefile compat/Makefile src/Makefile])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_SRCDIR([src/duser.c])
+CFLAGS=""
# Checks for programs.
AC_PROG_CC
@@ -35,14 +37,16 @@ AC_TYPE_SIZE_T
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strcasecmp strdup strerror strncasecmp strstr])
-# Detect if the host operating system is SunOS/Solaris as it behaves slightly different
-# than GNU/Linux
-case "$host_os" in
- *sunos*|solaris*)
- AC_DEFINE([HAVE_SOLARIS], 1, [host operating system is solaris])
- ;;
- *)
-esac
+AC_ARG_ENABLE([compat],
+[ --enable-compat Enables built-in glibc string functions],
+ [case "${enableval}" in
+ yes) compat=true ;;
+ no) compat=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-compat]) ;;
+ esac],[compat=false])
+ AM_CONDITIONAL([HAVE_COMPAT], [test x$compat = xtrue])
+
+
# Figure out where everything goes in the filesystem
AC_ARG_WITH(config-path,
@@ -53,9 +57,4 @@ AC_SUBST(CONFIGDIR)
AC_DEFINE_UNQUOTED([CFG_PATH], "$CFGPATH", [duser configuration path])
-# 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])
+AC_OUTPUT