-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
91 lines (71 loc) · 2.07 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([libfolia],[2.21],[[email protected]]) #also adapt in codemeta.json!
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX_17])
# Checks for programs.
AC_PROG_CXX( [g++ clang++] )
AX_CXX_COMPILE_STDCXX_17
# use libtool
LT_INIT
# when running tests, use CXX
AC_LANG([C++])
# check OpenMP support
AC_OPENMP
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([netdb.h sys/socket.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([localtime_r])
AC_CHECK_FUNCS([gethostname memset select])
AX_PTHREAD([],[AC_MSG_ERROR([We need pthread support!])])
LIBS="$PTHREAD_LIBS $LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
PKG_PROG_PKG_CONFIG
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_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
AC_MSG_WARN([Doxygen not found - continue without Doxygen support])
else
AC_CHECK_PROGS([DOT], [dot])
if test -z "$DOT"; then
AC_MSG_ERROR([Doxygen needs dot, please install dot first])
fi
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AC_OSX_PKG( [icu4c] )
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.9.4] )
CXXFLAGS="$CXXFLAGS $XML2_CFLAGS"
LIBS="$XML2_LIBS $LIBS"
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.34] )
CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
LIBS="$ticcutils_LIBS $LIBS"
PKG_CHECK_MODULES([ICU], [icu-uc >= 50 icu-io] )
CXXFLAGS="$CXXFLAGS $ICU_CFLAGS"
LIBS="$ICU_LIBS $LIBS"
AC_CONFIG_FILES([
Makefile
folia.pc
m4/Makefile
src/Makefile
docs/Makefile
include/Makefile
include/libfolia/Makefile
])
AC_OUTPUT