forked from LanguageMachines/ticcltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
105 lines (86 loc) · 2.57 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([ticcltools],[0.7],[lamasoftware@science.ru.nl])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([.])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])
if test x"${CXXFLAGS+set}" = xset; then
# the user set CXXFLAGS; don't override it.
cxx_flags_were_set=true
else
cxx_flags_were_set=false
fi
if $cxx_flags_were_set; then
CXXFLAGS=$CXXFLAGS
fi
# Checks for programs.
AC_PROG_CXX( [g++] )
# when running tests, use CXX
AC_LANG([C++])
# check OpenMP support
AC_OPENMP
if test "x$ac_cv_prog_cxx_openmp" != "x"; then
if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
AC_DEFINE([HAVE_OPENMP], [1] , [Define to 1 if you have OpenMP] )
else
AC_MSG_NOTICE([We don't have OpenMP. Multithreaded operation is disabled])
fi
fi
# use libtool
AC_PROG_LIBTOOL
LT_INIT
#checks for libraries.
# Checks for header files.
AC_HEADER_STDBOOL
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_INT8_T
AC_C_INLINE
# Checks for library functions.
if test "x$prefix" = "xNONE"; then
prefix="/usr/local"
fi
AC_ARG_WITH(roaring,
[ --with-roaring=DIR use CRoaring installed in <DIR>;
note that you can install roaring in a non-default directory],
[CXXFLAGS="$CXXFLAGS -I $withval"
LIBS="$LIBS -L$withval/lib"],
[LIBS="$LIBS -L$prefix/lib"] )
AC_SEARCH_LIBS( [roaring_bitmap_create],
[roaring],
[AC_DEFINE(HAVE_ROARING, 1 , Define to 1 if you have roaring stuff )
AM_CONDITIONAL([ROAR], [test 1 = 1])
LIBS="$LIBS -lroaring"
],
[AC_MSG_NOTICE([No CRoaring library found. Roaring versions of some programs disabled])
AC_DEFINE(HAVE_ROARING, 0 , Define to 1 if you have roaring stuff )
AM_CONDITIONAL([ROAR], [test 1 = 0])]
)
PKG_PROG_PKG_CONFIG
if test "x$PKG_CONFIG_PATH" = x; then
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:$prefix/lib/pkgconfig"
else
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
AC_OSX_PKG( [icu4c] )
PKG_CHECK_MODULES([ICU], [icu-uc >= 50 icu-io] )
CXXFLAGS="$CXXFLAGS $ICU_CFLAGS"
LIBS="$ICU_LIBS $LIBS"
PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.16] )
CXXFLAGS="$CXXFLAGS $XML2_CFLAGS"
LIBS="$XML2_LIBS $LIBS"
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.20] )
CXXFLAGS="$ticcutils_CFLAGS $CXXFLAGS"
LIBS="$ticcutils_LIBS $LIBS"
AC_CONFIG_FILES([
Makefile
m4/Makefile
src/Makefile
include/Makefile
include/ticcl/Makefile
docs/Makefile
])
AC_OUTPUT