-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
137 lines (108 loc) · 3.17 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
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([ccfinderx],[10.2.8],[[email protected]])
#Use tar-pax format to allow unlimited length file names
AM_INIT_AUTOMAKE([1.9 tar-pax foreign subdir-objects -Wall -Werror])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_CC_C_O
AC_PROG_AWK
AC_PROG_SED
AC_OPENMP
AM_PROG_AR
#Check for version of GCC
AX_CHECK_COMPILE_FLAG([-std=c++0x], [CXXFLAGS="$CXXFLAGS -std=c++0x -DSTD_CPP_0X"])
# Configure libtool
AC_ENABLE_SHARED
AC_DISABLE_STATIC
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
# Checks for optional programs.
# Checks for libraries
AC_CHECK_LIB([gomp], [omp_get_num_threads])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([stddef.h stdlib.h string.h strings.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([rmdir strcasecmp strchr strdup strerror])
STD_INC_PATH="-I/usr/include -I/usr/local/include"
STD_LIB_PATH="-L/usr/local/lib"
dnl ---------------------------------------------------------------------------
dnl Check if boost library is available
dnl ---------------------------------------------------------------------------
BOOST_REQUIRE(1.53)
BOOST_SYSTEM
BOOST_THREADS
dnl ---------------------------------------------------------------------------
dnl Check if icu library is available
dnl ---------------------------------------------------------------------------
AC_CHECK_ICU([52],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([
libicu must bee installed on your system.
Please install libicu development package.])
]
)
# Check for java development kit
AX_JNI_INCLUDE_DIR
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
done
# Check for python version
AX_PYTHON_DEVEL([>= '2.7.0'])
# Check for presence of ant to compile java packages
AC_CHECK_PROG(ANT, ant, ant, no)
if test "$ANT" = "no"; then
AC_MSG_ERROR([ant is not installed.])
fi
#Check for presence of icu4j.jar
AC_CHECK_FILE(/usr/share/java/icu4j.jar,
[ ],
[AC_MSG_ERROR([
icu4j.jar must bee installed on your system.
Please install libicu4j-java development package.])
]
)
#Check for presence of swt.jar
AC_CHECK_FILE(/usr/share/java/swt.jar,
[ ],
[AC_MSG_ERROR([
swt.jar must bee installed on your system.
Please install libswt-gtk-3-java development package.])
]
)
#Check for presence of swt.jar
AC_CHECK_FILE(/usr/share/java/trove.jar,
[ ],
[AC_MSG_ERROR([
trove.jar must bee installed on your system.
Please install libtrove-java development package.])
]
)
#Check for presence of swt-cairo-gtk.so
AC_CHECK_FILE(/usr/lib/jni/libswt-cairo-gtk-3836.so,
[ ],
[AC_MSG_ERROR([
libswt-cairo-gtk-3836.so must bee installed on your system.
Please install libswt-cairo-gtk-3-jni development package.])
]
)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT