1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(src/dbi_main.c)
5
AM_INIT_AUTOMAKE(libdbi, 0.8.4)
6
AM_CONFIG_HEADER(config.h)
7
AC_CONFIG_MACRO_DIR([m4])
14
AC_SUBST(LIB_REVISION)
22
dnl ====================================
23
dnl Check for programs
24
dnl ====================================
32
dnl ====================================
33
dnl Set some general compile options
34
dnl ====================================
36
if test -z "$GCC"; then
39
if test -z "$CC"; then
43
CFLAGS="-O2 -w -signed"
44
PROFILE="-p -g3 -O2 -signed" ;;
47
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
48
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
58
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
59
CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99"
60
PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99";;
62
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99"
63
CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99"
64
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99" ;;
66
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
67
CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
68
PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char -std=gnu99" ;;
77
dlopen_flag="RTLD_LAZY" ;;
79
dlopen_flag="RTLD_NOW" ;;
82
AC_DEFINE_UNQUOTED(DLOPEN_FLAG, $dlopen_flag, [ Specifies the mode of dlopen behavior ])
84
dnl ==============================
85
dnl Check for libraries
86
dnl ==============================
88
dnl functions to load dynamic libraries
91
[ --with-ltdl Use libtool's libltdl to load runtime modules [no]],
92
[ use_ltdl=$withval ])
94
if test "x$use_ltdl" = xyes; then
95
AC_CHECK_HEADERS([ltdl.h], [AC_CHECK_LIB([ltdl],[lt_dlopen],[LIBADD_DL=-lltdl])])
97
AC_CHECK_HEADERS([mach-o/dyld.h],[AC_CHECK_FUNCS([NSLinkModule], [
102
AC_CHECK_HEADERS([dlfcn.h])
103
AC_CHECK_FUNCS([dlopen],[LIBADD_DL=],
104
[AC_CHECK_LIB([dl],[dlopen],[LIBADD_DL=-ldl],[])])])
107
dnl ==============================
108
dnl Check for functions
109
dnl ==============================
124
AC_ARG_WITH(shlib-ext,
125
[ --with-shlib-ext Specifies the filename extension of loadable modules (usually not necessary).],
126
[ shlib_ext=$withval ])
127
AC_ARG_WITH(dlsym-prefix,
128
[ --with-dlsym-prefix Specifies a required prefix for symbol names of dynamically loaded modules (usually not necessary).],
129
[ dlsym_prefix=$withval ])
131
AC_DEFINE_UNQUOTED(DRIVER_EXT, "$shlib_ext", [ Specifies the filename extension of loadable modules ])
132
AC_DEFINE_UNQUOTED(DLSYM_PREFIX, "$dlsym_prefix", [ Specifies a required prefix for symbol names of dynamically loaded modules ])
135
AC_CHECK_FUNCS(strtoll)
136
AC_REPLACE_FUNCS(atoll timegm)
137
AC_CHECK_FUNCS(vasprintf)
138
AC_REPLACE_FUNCS(asprintf)
140
dnl ==============================
141
dnl Checks for header files
142
dnl ==============================
144
AC_CHECK_HEADERS(string.h strings.h)
146
dnl ==============================
147
dnl See whether to build the docs
148
dnl ==============================
152
[ --disable-docs do not build and install the documentation.],
153
[ if test "$enable_docs" = "no"; then
157
if test "$ac_docs" = "YES"; then
158
dnl AC_PATH_PROGS(myjade, openjade jade)
159
dnl if test "x$myjade" != "x"; then
168
AC_SUBST(docs_subdirs)
170
dnl ==============================
171
dnl Write output files
172
dnl ==============================
174
AC_CONFIG_FILES([include/dbi/dbi.h])