forked from torognes/vsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
105 lines (83 loc) · 2.78 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.63])
AC_INIT([vsearch], [2.8.0], [[email protected]])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C++])
AC_CONFIG_SRCDIR([src/vsearch.cc])
AC_CONFIG_HEADERS([config.h])
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
MACOSX_DEPLOYMENT_TARGET="10.7"
# Set default gcc and g++ options
CFLAGS='-g'
CXXFLAGS='-g'
# Checks for programs.
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_INSTALL
# Checks for libraries.
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([dl], [dlopen])
#AC_CHECK_LIB([regex], [regexec])
AC_CHECK_LIB([psapi], [GetProcessMemoryInfo])
# Checks for header files.
AC_CHECK_HEADERS([getopt.h fcntl.h float.h regex.h ctype.h locale.h limits.h string.h sys/time.h dlfcn.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STRTOD
AC_FUNC_ALLOCA
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memcpy posix_memalign gettimeofday localtime_r memchr memset pow regcomp strcasecmp strchr strcspn sysinfo])
have_pthreads=no
have_bzip2=no
have_zlib=no
AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthreads=yes])
AC_ARG_ENABLE(bzip2, AS_HELP_STRING([--disable-bzip2], [Disable bzip2 support]))
AS_IF([test "x$enable_bzip2" != "xno"], [
have_bzip2=yes
])
AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable zlib support]))
AS_IF([test "x$enable_zlib" != "xno"], [
have_zlib=yes
])
have_ps2pdf=no
AC_ARG_ENABLE(pdfman, AS_HELP_STRING([--disable-pdfman], [Disable PDF manual creation]))
AS_IF([test "x$enable_pdfman" != "xno"], [
have_ps2pdf=yes
AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no)
if test "x$HAVE_PS2PDF" = "xno"; then
AC_MSG_WARN([*** ps2pdf is required to build a PDF version of the manual])
have_ps2pdf=no
fi
])
if test "x${have_pthreads}" = "xyes"; then
AC_CHECK_HEADERS([pthread.h], [], [have_pthreads=no])
fi
if test "x${have_bzip2}" = "xyes"; then
AC_CHECK_HEADERS([bzlib.h], [], [have_bzip2=no])
fi
if test "x${have_zlib}" = "xyes"; then
AC_CHECK_HEADERS([zlib.h], [], [have_zlib=no])
fi
case $target in
powerpc64*) target_ppc="yes" ;;
esac
AC_CHECK_HEADERS([windows.h], [AM_CONDITIONAL(TARGET_WIN, true)], [AM_CONDITIONAL(TARGET_WIN, false)])
AM_CONDITIONAL(HAVE_BZLIB, test "x${have_bzip2}" = "xyes")
AM_CONDITIONAL(HAVE_ZLIB, test "x${have_zlib}" = "xyes")
AM_CONDITIONAL(HAVE_PTHREADS, test "x${have_pthreads}" = "xyes")
AM_CONDITIONAL(HAVE_PS2PDF, test "x${have_ps2pdf}" = "xyes")
AM_CONDITIONAL(TARGET_PPC, test "x${target_ppc}" = "xyes")
AM_PROG_CC_C_O
AC_CONFIG_FILES([Makefile
src/Makefile
man/Makefile])
AC_OUTPUT