-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
119 lines (95 loc) · 3.17 KB
/
configure.ac
File metadata and controls
119 lines (95 loc) · 3.17 KB
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
AC_PREREQ([2.61])
AC_INIT([dlvhex-xpathplugin],[1.7.0],[gamsta@gmx.net])
AC_CONFIG_SRCDIR([src/xpathplugin.cpp])
AC_CONFIG_HEADER([src/config.h])
MAJOR=`echo $PACKAGE_VERSION | sed "s,^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*,\1,"`
MINOR=`echo $PACKAGE_VERSION | sed "s,^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*,\2,"`
MICRO=`echo $PACKAGE_VERSION | sed "s,^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*,\3,"`
# user corresponding names and texts here
AC_DEFINE_UNQUOTED([XPATH_MAJOR], [$MAJOR], [Major version number of the XPath-plugin])
AC_DEFINE_UNQUOTED([XPATH_MINOR], [$MINOR], [Minor version number of the XPath-plugin])
AC_DEFINE_UNQUOTED([XPATH_MICRO], [$MICRO], [Micro version number of the XPath-plugin])
AM_INIT_AUTOMAKE([color-tests])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP
# Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS([sys/param.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
# Checks for libtool library functions.
AC_LIBTOOL_WIN32_DLL # enable win32 dll-building support
AC_LIBTOOL_DLOPEN # we build a module library
AC_DISABLE_STATIC # we don't need a static library
AC_PROG_LIBTOOL
#
# check for other libraries here
#
#
# check for libcurl
#
LIBCURL_CHECK_CONFIG([], [], [], [AC_MSG_ERROR([could not find CURL library. Download it at http://curl.haxx.se/.])])
#
# of course we need dlvhex itself!
#
PKG_CHECK_MODULES([DLVHEX], [dlvhex >= 1.7])
# we want libxml2
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 0.25])
# cppunit is optional -> give warning in ACTION-IF-NOT-FOUND
#PKG_CHECK_MODULES([CPPUNIT], [cppunit >= 1.12.0], [have_cppunit=true], [have_cppunit=false])
#if test x$have_cppunit = xfalse; then
# AC_MSG_WARN([could not find cppunit >= 1.12.0, `make check' will fail. Please download it from http://cppunit.sourceforge.net/ and setup PKG_CONFIG_PATH appropriately.])
#fi
# checking for boost libs
BOOST_REQUIRE([1.41.0])
BOOST_SMART_PTR
BOOST_STRING_ALGO
BOOST_TOKENIZER
BOOST_TEST
#
# where the plugin will be installed by default.
# running configure will take sysplugindir from dlvhex.pc,
# running configure --enable-userinstall will take homeplugindir.
#
AC_ARG_ENABLE(userinstall,
[ --enable-userinstall Install plugin into home directory],
[plugindir=$HOME/`pkg-config dlvhex --variable=userplugindir`],
[plugindir=`pkg-config dlvhex --variable=sysplugindir`]
)
AC_SUBST([plugindir])
# doxygen stuff
#
# these are the defaults, can be overridden by --enable-doxygen-...
DX_HTML_FEATURE([ON])
DX_CHM_FEATURE([OFF])
DX_CHI_FEATURE([OFF])
DX_MAN_FEATURE([OFF])
DX_RTF_FEATURE([OFF])
DX_XML_FEATURE([OFF])
DX_PDF_FEATURE([OFF])
DX_PS_FEATURE([OFF])
DX_INIT_DOXYGEN([dlvhexxpathplugin], [doxygen.cfg], [documentation])
#
# set system-wide plugin dir
#
CPPFLAGS="$CPPFLAGS -DPLUGIN_DIR='\"\$(dlvhexlibdir)\"'"
# substitute EXAMPLESDIR in examples
EXAMPLESDIR=../$srcdir/examples
AC_SUBST([EXAMPLESDIR])
#
# all needed makefiles
#
AC_CONFIG_FILES([
Makefile
examples/Makefile
examples/keywords.hex
examples/nobelprice.hex
examples/scientists.hex
testsuite/Makefile
include/Makefile
src/Makefile
])
AC_OUTPUT