-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
59 lines (50 loc) · 2.04 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(libsstbl, 0.0.1)
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_CYGWIN
AC_PROG_LIBTOOL
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for functions.
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
AC_CHECK_FUNCS([memmove memset select socket strchr strdup posix_fadvise madvise])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/param.h sys/socket.h unistd.h])
AC_CHECK_HEADERS([malloc.h])
# Checks for system libraries.
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([sendfile], [sendfile])
AC_CHECK_LIB([socket], [socket])
AC_CHECK_LIB([nsl], [gethostbyname])
AC_CHECK_LIB([kstat], [kstat_open])
AC_CHECK_LIB([z], [gzopen])
#------------------------------------------------------------------------------
# Compiler
#------------------------------------------------------------------------------
# Default Compiler Option
if test "x$CC" = "xgcc" -o "x$CC" = "xccache gcc"; then
CFLAGS="$CFLAGS -O2 -g -Wswitch-enum -Wall -Wextra -D_REENTRANT -Wformat=2 -pipe -D_FORTIFY_SOURCE=1 -Wcast-qual -Wcast-align -Wpointer-arith -Wwrite-strings -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64"
fi
if test "x$CXX" = "xg++" -o "x$CXX" = "xccache g++"; then
CXXFLAGS="$CXXFLAGS -O2 -g -Wswitch-enum -Wall -Wextra -D_REENTRANT -Wformat=2 -pipe -D_FORTIFY_SOURCE=1 -Wcast-qual -Wcast-align -Wpointer-arith -Wwrite-strings -Woverloaded-virtual -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64"
fi
#------------------------------------------------------------------------------
# Generate Makefiles
#------------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile
src/Makefile
])
AC_OUTPUT