File: configure.ac

package info (click to toggle)
libcgicc 3.2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 8,540 kB
  • ctags: 778
  • sloc: sh: 10,424; cpp: 4,977; makefile: 159; sed: 1
file content (103 lines) | stat: -rw-r--r-- 2,825 bytes parent folder | download | duplicates (2)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
dnl -*-m4-*-
dnl $Id: configure.ac,v 1.12 2008/05/18 19:42:41 sebdiaz Exp $

dnl Process this file with autoconf to produce a configure script.
AC_INIT(cgicc, 3.2.9, bug-cgicc@gnu.org)
AC_CONFIG_SRCDIR(cgicc/Cgicc.cpp)
AC_REVISION([$Revision: 1.12 $])
AC_CONFIG_AUX_DIR(support)
AC_PREFIX_DEFAULT(/usr)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(cgicc/config.h)
AC_CONFIG_MACRO_DIR([m4])

AC_LANG_CPLUSPLUS

dnl Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, /bin/echo)



dnl Determine host system type


dnl Checks for libraries.

dnl setup for networking functions
AC_CHECK_LIB(nsl, gethostbyaddr, LIB_NET="-lnsl")
AC_SUBST(LIB_NET)

dnl check whether to link against libstdc++
dnl CGICC_CHECK_LINK_STDCPP

dnl Checks for header files
AC_CHECK_HEADERS([sys/time.h sys/utsname.h])

dnl Determine host system type
AC_DEFINE_UNQUOTED(HOST, "$host", [The host system cgicc was configured for])

dnl Check whether we're using aCC
CGICC_CHECK_ACC
if test "$cgicc_cv_acc" = yes; then
  CXXFLAGS="-AA $CXXFLAGS"
  DEMO_LIBS="-lstd_v2 -lCsup_v2"
fi
AC_SUBST(DEMO_LIBS)

dnl verify namespace support
AC_CXX_NAMESPACES

dnl verify STL support
AC_CXX_HAVE_STL

dnl Enable maximum compiler warnings for g++
AC_MSG_CHECKING(maximum C++ compiler warning level)
if test "$GXX" = yes; then
  CXXFLAGS_WARN="-Wall -W -pedantic"
  CXXFLAGS="$CXXFLAGS_WARN $CXXFLAGS"
fi
AC_MSG_RESULT($CXXFLAGS_WARN)
unset CXXFLAGS_WARN

dnl Checks for library functions.
AC_CHECK_FUNCS(gettimeofday uname)

dnl enable/disable the demos, if specified
AC_ARG_ENABLE(demos, 
  [  --enable-demos          build demos [[default=yes]]],
  [case "${enableval}" in
    yes) cgicc_demos=yes ;;
    no)  cgicc_demos=no ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-demos) ;;
  esac], cgicc_demos=yes)
AC_MSG_CHECKING(whether to build the cgicc demos)
AC_MSG_RESULT($cgicc_demos)
AM_CONDITIONAL(DEMOS, test "$cgicc_demos" = yes)

dnl enable/disable the FastCgi demos, if specified
AC_ARG_ENABLE(fcgi-demos, 
  [  --enable-fcgi-demos     build FastCgi demos [[default=no]]],
  [case "${enableval}" in
    yes) cgicc_fcgi_demos=yes ;;
    no)  cgicc_fcgi_demos=no ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-fcgi-demos) ;;
  esac], cgicc_fcgi_demos=no)
AC_MSG_CHECKING(whether to build the cgicc fcgi demos)
AC_MSG_RESULT($cgicc_fcgi_demos)
AM_CONDITIONAL(FCGI_DEMOS, test "$cgicc_fcgi_demos" = yes)

if test "$cgicc_fcgi_demos" = yes; then
  AC_CHECK_LIB(fcgi, FCGX_Accept, FCGI_LIBS="-lfcgi++ -lfcgi",
	AC_MSG_ERROR([FastCGI libraries not found]))
fi
AC_SUBST(FCGI_LIBS)

dnl Always output certain files
AC_CONFIG_FILES([Makefile cgicc/Makefile cgicc/CgiDefs.h 
  support/Makefile support/cgicc-config doc/Makefile doc/Doxyfile
	demo/Makefile contrib/Makefile support/cgicc.pc])

AC_OUTPUT