diff options
author | Alan Brault <alan.brault@incruentatus.net> | 2011-05-02 12:55:38 -0400 |
---|---|---|
committer | Alan Brault <alan.brault@incruentatus.net> | 2011-05-02 12:55:38 -0400 |
commit | d538d7194beef487985a5082ac63b672c3930ffe (patch) | |
tree | 167b9cd13df9c869af3575f21b2ed77f334c5948 /configure.in | |
parent | fbb16d344dd56b46c6579078cb53d749c689f88d (diff) | |
download | duser-d538d7194beef487985a5082ac63b672c3930ffe.tar.gz |
Add platform detection for Linux vs Solaris
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 4ab0207..300a44b 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,9 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) +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]) @@ -25,5 +27,23 @@ AC_TYPE_SIZE_T AC_FUNC_MALLOC AC_CHECK_FUNCS([memset strcasecmp strdup strerror strncasecmp strstr]) -AC_CONFIG_FILES([Makefile src/Makefile]) -AC_OUTPUT +# 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]) |