This repository has been archived by the owner on Sep 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure.in
70 lines (55 loc) · 1.5 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
dnl this files has to be processed by autoconf
AC_PREREQ(2.61)
AC_INIT([libiz],[0.0.1])
AC_CONFIG_SRCDIR([README])
AC_CONFIG_HEADERS(iz_config.h)
AM_INIT_AUTOMAKE([no-define])
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LD
AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_CHECK_FUNCS([mmap])
DEFAULT_INSTALL_PREFIX="/usr/local"
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],[enable debugging symbols and compile flags])
],
[
if test x"$enableval" = xyes ; then
debug="yes"
else
debug="no"
fi
]
)
if test x"$debug" = xyes ; then
AC_DEFINE([IZ_DEBUG], [], [debug build])
if test x"$GCC" = xyes; then
dnl Remove any optimization flags from CFLAGS
changequote({,})
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9s]*//g'`
CFLAGS=`echo "$CFLAGS" | sed -e 's/-g[0-2]\? //g'`
CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-O[0-9s]*//g'`
CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-g[0-2]\? //g'`
changequote([,])
CFLAGS="$CFLAGS -g3 -Wall -O0"
CXXFLAGS="$CXXFLAGS -g3 -Wall -O0"
fi
dnl Do not strip symbols from developer object files.
INSTALL_STRIP_FLAG=""
else
CXXFLAGS="$CXXFLAGS -O2 -mmmx -Winline -fomit-frame-pointer -fno-rtti -fno-exceptions"
dnl Make sure to strip symbols from non-developer object files.
INSTALL_STRIP_FLAG="-s"
fi
dnl Disable MinGW32 build for now
case $host_alias in
*mingw*)
AC_MSG_ERROR([mmap needs to be ported to MinGW32.])
;;
esac
AC_SUBST(INSTALL_STRIP_FLAG)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT