-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure.ac
95 lines (74 loc) · 2.29 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
AC_INIT([tscan], [0.10.0], [[email protected]]) #also change in webservice/setup.py and codemeta.json!
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/tscan.cxx])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX( [g++ c++] )
#force to C++ when running tests
AC_LANG([C++])
# libtool stuff
AC_PROG_LIBTOOL
LT_INIT
# Check for OpenMP support
AC_OPENMP
if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
if test "x$ac_cv_prog_cxx_openmp" != "x"; then
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
AC_DEFINE(HAVE_OPENMP, 1 , Define to 1 if you have OpenMP )
fi
else
AC_MSG_NOTICE(We don't have OpenMP. Multithreaded operation is disabled)
fi
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([mkdir])
PKG_PROG_PKG_CONFIG
# ugly hack when PKG_CONFIG_PATH isn't defined.
# couldn't get it to work otherwise
if test "x$prefix" = "xNONE"; then
prefix="/usr/local"
fi
if test "x$PKG_CONFIG_PATH" = x
then
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
else
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_OSX_PKG( [icu4c] )
AC_MSG_NOTICE([pkg-config: PATH=$PKG_CONFIG_PATH])
PKG_CHECK_MODULES([ICU], [icu-uc >= 50 icu-io] )
CXXFLAGS="$CXXFLAGS $ICU_CFLAGS"
LIBS="$ICU_LIBS $LIBS"
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.22] )
CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
LIBS="$ticcutils_LIBS $LIBS"
PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.16] )
CXXFLAGS="$CXXFLAGS $XML2_CFLAGS"
LIBS="$LIBS $XML2_LIBS"
PKG_CHECK_MODULES([folia], [folia >= 1.10] )
CXXFLAGS="$folia_CFLAGS $CXXFLAGS"
LIBS="$folia_LIBS $LIBS"
PKG_CHECK_MODULES([frog], [frog >= 0.13.6] )
CXXFLAGS="$frog_CFLAGS $CXXFLAGS"
LIBS="$frog_LIBS $LIBS"
PKG_CHECK_MODULES([timbl], [timbl >= 6.4.4] )
CXXFLAGS="$CXXFLAGS $timbl_CFLAGS"
LIBS="$timbl_LIBS $LIBS"
AC_CONFIG_FILES([Makefile
include/Makefile
include/tscan/Makefile
src/Makefile
data/Makefile
webservice/Makefile
docs/Makefile])
AC_OUTPUT