File: configure.in

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (80 lines) | stat: -rw-r--r-- 1,566 bytes parent folder | download
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
70
71
72
73
74
75
76
77
78
79
80
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 2.8 2007/07/30 00:25:54 mrsam Exp $
dnl
dnl Copyright 1998 - 1999 Double Precision, Inc.  See COPYING for
dnl distribution information.

AC_INIT(afx,1.60, [courier-users@lists.sourceforge.net])
AC_CONFIG_SRCDIR(afx.h)
AM_INIT_AUTOMAKE([foreign no-define])
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_ISC_POSIX
AC_AIX
AC_MINIX
AC_PROG_RANLIB
AC_PROG_CXX
AC_PROG_INSTALL

if test x$GXX = xyes
then
	CXXFLAGS="-Wall $CXXFLAGS"
fi

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h strings.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T

AC_ARG_WITH(testmode, [ ],
	testmode="$withval", testmode="N")

case "$testmode" in
y*|y*|1)
	testmode=1
	CFLAGS=`echo "$CFLAGS" | sed 's/-O2//'`
	CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'`
	;;
*)
	testmode=0
	;;
esac

CFLAGS="-I.. -I${srcdir}/.. $CFLAGS"
CXXFLAGS="-I.. -I${srcdir}/.. $CXXFLAGS"

dnl Checks for library functions.
AC_CHECK_FUNCS(regcomp)

AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions],
	ac_cxx_need_handlexceptions,

AC_TRY_COMPILE([],
[
throw;
], ac_cxx_need_handlexceptions=no,
ac_cxx_need_handlexceptions=yes)
)

if test "$ac_cxx_need_handlexceptions" = "yes"
then
	case "$CXXFLAGS" in
	*handle-exceptions*)
		;;
	*)
		CXXFLAGS="-fhandle-exceptions $CXXFLAGS"
		CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'`
		;;
	esac
fi

AC_OUTPUT(Makefile)