forked from apache/apr-iconv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
104 lines (86 loc) · 2.31 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
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
104
dnl
dnl Process this file with autoconf to produce a configure script
dnl
AC_PREREQ(2.13)
AC_INIT(Makefile.in)
AC_CONFIG_AUX_DIR(build)
AC_CONFIG_HEADER(lib/apr_iconv_private.h)
AC_PREFIX_DEFAULT(/usr/local/apache2)
sinclude(build/apr-iconv.m4)
sinclude(build/apr_common.m4)
sinclude(build/find_apr.m4)
dnl This is required by autoconf!
AC_PROG_AWK
AC_PROG_INSTALL
dnl compute the top directory of the build
# Absolute source/build directory
api_srcdir=`(cd $srcdir && pwd)`
api_builddir=`pwd`
AC_SUBST(api_srcdir)
AC_SUBST(api_builddir)
if test "$api_builddir" != "$api_srcdir"; then
USE_VPATH=1
fi
dnl Default prefix path if none was specified
test "x$prefix" = xNONE && prefix=$ac_default_prefix
dnl check for APR
API_FIND_APR
dnl copy apr's rules.mk into our build directory.
if test ! -d $api_builddir/build ; then
mkdir $api_builddir/build
fi
cp $APR_BUILD_DIR/apr_rules.mk $api_builddir/build/rules.mk
dnl
dnl set up the compilation flags and stuff
dnl
API_INCLUDES="-I$api_builddir/lib -I$api_builddir/include"
if test -n "$USE_VPATH"; then
API_INCLUDES="$API_INCLUDES -I$api_srcdir/lib -I$api_srcdir/include"
fi
AC_SUBST(API_INCLUDES)
AC_SUBST(APR_SO_EXT)
dnl Adds in config *.h file
AC_DEFINE_UNQUOTED(ICONV_DEFAULT_PATH,"$prefix/lib/iconv",
[ Directory where the *.so tables are stored ] )
iconv_libdir=$prefix/lib/iconv
AC_SUBST(iconv_libdir)
dnl
dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
dnl
case "$host_alias" in
*bsdi*)
INCLUDE_RULES=".include \"$api_builddir/build/rules.mk\""
;;
*)
INCLUDE_RULES="include $api_builddir/build/rules.mk"
;;
esac
AC_SUBST(INCLUDE_RULES)
dnl supportes MinGW
case "$host_alias" in
*mingw*)
API_CPPFLAGS="-DAPI_DECLARE_EXPORT"
;;
esac
AC_SUBST(API_CPPFLAGS)
dnl Absolute source/build directory
abs_srcdir=`(cd $srcdir && pwd)`
dnl get our version information
get_version="$abs_srcdir/build/get-version.sh"
version_hdr="$abs_srcdir/include/api_version.h"
API_MAJOR_VERSION="`$get_version major $version_hdr API`"
API_LIBNAME="apriconv-${API_MAJOR_VERSION}"
AC_SUBST(API_LIBNAME)
API_INCPATH="apr-${API_MAJOR_VERSION}"
AC_SUBST(API_INCPATH)
LT_VERSION="-version-info `$get_version libtool $version_hdr API`"
AC_SUBST(LT_VERSION)
dnl
dnl everthing is done.
AC_OUTPUT([
Makefile
ccs/Makefile
ces/Makefile
lib/Makefile
util/Makefile
])