-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.in
47 lines (37 loc) · 1.09 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
# Required initializer
AC_INIT
# Automake initialization
AM_INIT_AUTOMAKE(mod_qr, 1.0)
# Add a test for a compiler.
AC_PROG_CC
AM_PROG_LIBTOOL
# Define a macro that is used to parse a --with-apache parameter
# The macro is named "APACHE_DIR"
AC_DEFUN([APACHE_DIR],[
AC_ARG_WITH(
apache,
[ --with-apache[=DIR] Apache server directory],
,
[with_apache="no"]
)
AC_MSG_CHECKING(for Apache directory)
if test "$with_apache" = "no"; then
AC_MSG_ERROR( You need to specify the apache directory using --with-apache)
else
# make sure that a well known include file exists
if test -e $with_apache/include/httpd.h; then
apache_dir=$with_apache
AC_MSG_RESULT(APACHE found!)
else
AC_MSG_ERROR( $with_apache not found. Check the value you specified with --with-apache)
fi
fi
])
# Now call the APACHE_DIR macro that was just specified
APACHE_DIR
# Save the location of apache into the "apache_dir" variable.
# The AC_SUBST macro causes the variable to be saved in config.status
AC_SUBST(apache_dir)
# Write config.status and the Makefile
AC_OUTPUT(Makefile)
AC_CONFIG_MACRO_DIR([m4])