-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
136 lines (122 loc) · 4.65 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([libbeato],[1.0])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([beato/metaBig.c])
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_LANG([C])
AM_PROG_CC_C_O
AM_MAINTAINER_MODE([disable])
# Stuff for the -DCOLOR32 define. This is library-independent so just having the define
# is enough
AC_ARG_ENABLE([color-32],
[AS_HELP_STRING([--disable-color-32],[disable 32-bit color in PNG etc (default enabled)])],
[color32=${enableval}],
[color32=yes])
# to catch that one scenario where some does --disable-color-32=no which makes no sense
if test "x${color32}" = xno; then
color32=yes
fi
# finally define the variable to put in config.h
if test "x${color32}" = xyes; then
AC_DEFINE([COLOR32],[1],[Use 32-bit color in PNG etc])
fi
# Stuff for MACHTYPE_
case $host in
*x86_64*) AC_DEFINE([MACHTYPE_x86_64],[],[Used in some rare cases.]) ;;
*i386*) AC_DEFINE([MACHTYPE_i386],[],[Used in some rare cases.]) ;;
*ppc*) AC_DEFINE([MACHTYPE_ppc],[],[Used in some rare cases.]) ;;
*alpha*) AC_DEFINE([MACHTYPE_alpha],[],[Used in some rare cases.]) ;;
*sparc*) AC_DEFINE([MACHTYPE_sparc],[],[Used in some rare cases.]) ;;
*) AC_DEFINE([MACHTYPE_unknown],[],[Used in some rare cases.]) ;;
esac
# Stuff for warnings
case $host in
*ppc*) AC_SUBST([MACHTYPE_WARN],["-Wall -Wno-unused-variable"]) ;;
*) AC_SUBST([MACHTYPE_WARN],["-Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized"]) ;;
esac
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h netdb.h math.h netinet/in.h pthread.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/statvfs.h sys/time.h syslog.h termios.h unistd.h utime.h zlib.h])
# REQUIRED headers, with some additional checks for libraries
AC_SEARCH_LIBS([pthread_create], [pthread], [has_pthread=yes], [has_pthread=no])
if test "x${has_pthread}" != xyes; then
AC_MSG_ERROR([
---------------------------------------------
Unable to find libpthread required for compiling
libjkweb.a. Install this and run ./configure
with the appropriate LDFLAGS/CFLAGS/etc.
See the INSTALL for examples.
---------------------------------------------])
fi
AC_SEARCH_LIBS([pow], [m], [has_math=yes], [has_math=no])
if test "x${has_math}" != xyes; then
AC_MSG_ERROR([
---------------------------------------------
Unable to find libm (math) required for compiling
bambed. Install this and run ./configure
with the appropriate LDFLAGS/CFLAGS/etc.
See the INSTALL for examples.
---------------------------------------------])
fi
AC_SEARCH_LIBS([pow], [m], [has_math=yes], [has_math=no])
if test "x${has_math}" != xyes; then
AC_MSG_ERROR([
---------------------------------------------
Unable to find libm (math) required for compiling
bambed. Install this and run ./configure
with the appropriate LDFLAGS/CFLAGS/etc.
See the INSTALL for examples.
---------------------------------------------])
fi
AC_SEARCH_LIBS([zlibVersion], [z], [has_zlib=yes], [has_zlib=no])
if test "x${has_zlib}" != xyes; then
AC_MSG_ERROR([
---------------------------------------------
Unable to find zlib required for compiling
bambed. Install this and run ./configure
with the appropriate LDFLAGS/CFLAGS/etc.
See the INSTALL for examples.
---------------------------------------------])
fi
AC_CHECK_HEADERS([png.h],[has_png=yes],[has_png=no],[])
if test "x${has_png}" = xyes; then
AC_DEFINE([USE_PNG],[1],[Turn on PNG support.])
fi
AC_CHECK_HEADERS([openssl/ssl.h openssl/err.h],[has_ssl=yes],[has_ssl=no],[])
if test "x${has_ssl}" = xyes; then
AC_DEFINE([USE_SSL],[1],[Turn on SSL support in https.c])
fi
AC_SEARCH_LIBS([hts_version],[hts],[has_htslib=yes],[has_htslib=no])
if test "x${has_htslib}" = xyes; then
AC_DEFINE([USE_HTSLIB],[1],[Turn on htslib support])
fi
# Large file support
AC_SYS_LARGEFILE
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UID_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_MKTIME
AC_FUNC_MMAP
AC_FUNC_STRTOD
AC_CHECK_FUNCS([bzero dup2 floor getcwd gettimeofday memmove memset mkdir munmap pow putenv regcomp rint select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strrchr strspn strstr strtol tzset uname utime])
AC_CONFIG_FILES([Makefile beato/Makefile jkweb/Makefile])
AC_OUTPUT