-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
92 lines (76 loc) · 2.7 KB
/
configure.ac
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
dnl configure.in script for mod_proctitle
dnl Author: Stanislav Sedov <[email protected]>
dnl ------------------- Initialization -----------------------------------
dnl autoconf
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2007-2011 Stanislav Sedov <[email protected]>])
AC_INIT([mod_proctitle], [0.4.1], [[email protected]])
AC_CONFIG_SRCDIR([src/])
AC_CONFIG_HEADER([config.h])
AC_ISC_POSIX
dnl automake
dnl AMU_PACKAGE_NAME($PACKAGE_NAME)
dnl AMU_PACKAGE_VERSION($PACKAGE_VERSION)
dnl AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT)
AM_INIT_AUTOMAKE([mod_proctitle], [0.4.1])
dnl ------------------ Check for programs --------------------------------
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CPP
AC_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_LIBTOOL
dnl AC_PROG_PKG_CONFIG
AC_TYPE_SIZE_T
AC_TYPE_UID_T
dnl disable mainatiner mode
AM_MAINTAINER_MODE
dnl ------------------- Check for programs --------------------------
AC_PATH_PROG(APXS, apxs, no)
if test x"${APXS}" = x"no"; then
AC_MSG_ERROR([Cannot find apxs, check your path.])
fi
AC_PATH_PROGS(APR_CONFIG, [apr-config apr-1-config apr-2-config], no)
if test x"${APR_CONFIG}" = x"no"; then
AC_MSG_ERROR([Cannot find apr-config, check your path.])
fi
AC_PATH_PROGS(APU_CONFIG, [apu-config apu-1-config apu-2-config], no)
if test x"${APU_CONFIG}" = x"no"; then
AC_MSG_ERROR([Cannot find apu-config, check your path.])
fi
APACHE_INCLUDEDIR=`${APXS} -q INCLUDEDIR`
APACHE_MODULEDIR=`${APXS} -q LIBEXECDIR`
APR_INCLUDES=`${APR_CONFIG} --includes`
APR_CFLAGS=`${APR_CONFIG} --cflags`
APR_CPPFLAGS=`${APR_CONFIG} --cppflags`
APR_LIBS=`${APR_CONFIG} --libs`
APR_LDFLAGS=`${APR_CONFIG} --ldflags`
APU_INCLUDES=`${APU_CONFIG} --includes`
APU_LIBS=`${APU_CONFIG} --libs`
APU_LDFLAGS=`${APU_CONFIG} --ldflags`
AC_SUBST(APACHE_INCLUDEDIR)
AC_SUBST(APACHE_MODULEDIR)
AC_SUBST(APR_INCLUDES)
AC_SUBST(APR_LIBS)
AC_SUBST(APR_LDFLAGS)
AC_SUBST(APU_INCLUDES)
AC_SUBST(APU_LIBS)
AC_SUBST(APU_LDFLAGS)
CFLAGS="${CFLAGS} -I${APACHE_INCLUDEDIR} ${APR_INCLUDES} ${APU_INCLUDES}"
CFLAGS="${CFLAGS} ${APR_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${APR_CPPFLAGS}"
dnl ------------------- Check for headers --------------------------------
AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h stdint.h sys/types.h])
AC_CONFIG_FILES([Makefile
src/Makefile
])
AC_MSG_RESULT([])
AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully!])
AC_MSG_RESULT([/******************************************************/])
AC_MSG_RESULT([/* Now type make/gmake */])
AC_MSG_RESULT([/******************************************************/])
AC_MSG_RESULT([])
AC_OUTPUT