diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2011-05-02 13:51:46 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2011-05-02 13:51:46 -0400 |
commit | 124dfc3dcfb1a8322e8563a813f8c18dd059c524 (patch) | |
tree | 167b9cd13df9c869af3575f21b2ed77f334c5948 /configure.in | |
parent | e3d75a13af695720397f0b28e745e2e48edbeede (diff) | |
parent | d538d7194beef487985a5082ac63b672c3930ffe (diff) | |
download | duser-124dfc3dcfb1a8322e8563a813f8c18dd059c524.tar.gz |
Merge pull request #1 from extrarius/master.
autotools conversion, 80% complete still needs more checking work
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..300a44b --- /dev/null +++ b/configure.in @@ -0,0 +1,49 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.63]) +AC_INIT([duser], [1.0.0], [jhunkeler@stsci.edu], [duser], [https://github.com/jhunkeler/duser.git]) +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE(1.11.1) + +AC_CONFIG_SRCDIR([config.h.in]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_INSTALL + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_CHECK_FUNCS([memset strcasecmp strdup strerror strncasecmp strstr]) + +# Set compiler options based on platform. +case "$host_os" in + *linux*) + echo "===========================================================" + echo "Setting up build environment for ${target_cpu}${target_os}" + echo "===========================================================" + CFLAGS="-O2 -Wall -Wextra -I../include" + ;; + *solaris*) + echo "===========================================================" + echo "Setting up build environment for ${target_cpu}${target_os}" + echo "===========================================================" + CFLAGS="-O2 -Wall -D_NLINUX_" + ;; + *) + AC_MSG_ERROR([duser does not currently support your platform]) + ;; +esac + +AC_OUTPUT([Makefile src/Makefile]) |