-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
144 lines (124 loc) · 3.92 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
## -*- Autoconf -*-
## Process this file with autoconf to produce a configure script.
# Autoconf and automake setup
AC_PREREQ([2.69])
AC_INIT([metaproxy],[m4_esyscmd([. ./IDMETA; printf $VERSION])],[[email protected]])
AC_CONFIG_HEADERS([src/config.hpp])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR([config])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.9])
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
LT_INIT
AC_CHECK_PROGS([TRANG], [trang], [echo])
# Default language to use for tests (some tests may switch to C++)
AC_LANG([C])
if test "$enable_shared" = "yes"; then
AC_DEFINE([HAVE_DL_SUPPORT],[1],
[Define to 1 if you have shared module support])
fi
# Checks for libraries.
AC_CHECK_LIB([dl],[dlopen])
AC_CHECK_LIB([m],[main])
AC_CHECK_FUNCS([localtime_r getrlimit])
USEMARCON_INIT
## YAZPP checks
YAZPP_INIT([threads],[1.8.0])
if test -z "$YAZPPLIB"; then
AC_MSG_ERROR([YAZ++ development libraries missing])
fi
LIBS="$LIBS -lpthread"
CPPFLAGS="$YAZPPINC $CPPFLAGS"
AC_MSG_CHECKING([if YAZ is version 5.30.0 or later])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <yaz/yaz-version.h>]],
[[
#if YAZ_VERSIONL < 0x51E00
#error too old
#endif
]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([newer version of YAZ required])]
)
YAZ_DOC
ID_BOOST([system thread test regex],[1.34])
if test -z "${BOOST_THREAD_LIB}"; then
AC_MSG_ERROR([Boost thread development libraries required])
fi
if test -z "${BOOST_TEST_LIB}"; then
AC_MSG_ERROR([Boost unit test framework libraries required])
fi
if test -z "${BOOST_REGEX_LIB}"; then
AC_MSG_ERROR([Boost regex development libraries required])
fi
case $YAZPPINC in
*YAZ_HAVE_XSLT=1*) ;;
*) AC_MSG_ERROR([YAZ not compiled with Libxslt support]) ;;
esac
AC_CHECK_HEADERS([sys/select.h sys/socket.h])
if test -d ${srcdir}/.git; then
SHA1=`git show --pretty=format:%H|head -1`
else
SHA1=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'`
fi
AC_DEFINE_UNQUOTED([VERSION_SHA1], "$SHA1", [SHA-1 from Git])
AC_CONFIG_FILES([
metaproxy-config
Doxyfile
Makefile
include/Makefile include/metaproxy/Makefile
src/Makefile
xml/Makefile
xml/schema/Makefile
xml/xslt/Makefile
doc/Makefile
doc/local0.ent
doc/common/Makefile
doc/common/print.dsl
etc/Makefile
metaproxy.pc
])
AC_CONFIG_COMMANDS([default],[
sed -e 's%echo_source=yes%echo_source=no%g; s%src_root=.*$%%g; s%build_root=.*%%g' \
< metaproxy-config > src/metaproxy-config && chmod +x metaproxy-config src/metaproxy-config
diff doc/local.ent doc/local0.ent >/dev/null 2>/dev/null \
|| cp doc/local0.ent doc/local.ent
],[])
AC_OUTPUT
echo \
"------------------------------------------------------------------------
Package: ${PACKAGE}
Version: ${VERSION}
Source code location: ${srcdir}
CPP Preprocessor: ${CPP}
CPP Preprocessor flags: ${CPPFLAGS}
CXX Compiler: ${CXX}
CXX Compiler flags: ${CXXFLAGS}
Linker flags: ${LDFLAGS}
Linked libs: ${LIBS}
Host System Type: ${host}
Install path: ${prefix}
Automake: ${AUTOMAKE}
Archiver: ${AR}
Ranlib: ${RANLIB}
Boost Version: ${BOOST_VERSION}
Boost Include: ${BOOST_CPPFLAGS}
Boost linker flags: ${BOOST_LDFLAGS}
Boost Libs: ${BOOST_DATE_TIME_LIB} ${BOOST_THREAD_LIB}
YAZPP Version: ${YAZPPVERSION}
YAZPP Include: ${YAZPPINC}
YAZPP La Lib: ${YAZPPLALIB}
YAZPP Lib: ${YAZPPLIB}
Bugreport: ${PACKAGE_BUGREPORT}
------------------------------------------------------------------------"
dnl Local Variables:
dnl mode:shell-script
dnl sh-indentation: 2
dnl sh-basic-offset: 4
dnl End: