configure.ac   configure.ac 
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61]) AC_PREREQ([2.61])
AC_INIT([libqb], AC_INIT([libqb],
m4_esyscmd([build-aux/git-version-gen .tarball-version]), m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[quarterback-devel@fedorahosted.org]) [quarterback-devel@fedorahosted.org])
AM_INIT_AUTOMAKE([-Wno-portability])
AC_CONFIG_SRCDIR([lib/ringbuffer.c]) AC_CONFIG_SRCDIR([lib/ringbuffer.c])
AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_HEADERS([include/config.h include/qb/qbconfig.h])
AM_INIT_AUTOMAKE([-Wno-portability dist-xz color-tests parallel-tests])
dnl automake >= 1.11 offers --enable-silent-rules for suppressing the outpu
t from
dnl normal compilation. When a failure occurs, it will then display the fu
ll
dnl command line
dnl Wrap in m4_ifdef to avoid breaking on older platforms
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
LT_PREREQ([2.2.6]) LT_PREREQ([2.2.6])
LT_INIT LT_INIT
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_LANG([C]) AC_LANG([C])
dnl Fix default variables - "prefix" variable if not specified dnl Fix default variables - "prefix" variable if not specified
if test "$prefix" = "NONE"; then if test "$prefix" = "NONE"; then
prefix="/usr" prefix="/usr"
if test "$localstatedir" = "\${prefix}/var"; then if test "$localstatedir" = "\${prefix}/var"; then
localstatedir="/var" localstatedir="/var"
fi fi
if test "$sysconfdir" = "\${prefix}/etc"; then if test "$sysconfdir" = "\${prefix}/etc"; then
sysconfdir="/etc" sysconfdir="/etc"
skipping to change at line 57 skipping to change at line 57
AC_MSG_NOTICE([building out of tree srcdir:$srcdir]) AC_MSG_NOTICE([building out of tree srcdir:$srcdir])
fi fi
# Checks for programs. # Checks for programs.
# check stolen from gnulib/m4/gnu-make.m4 # check stolen from gnulib/m4/gnu-make.m4
if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
AC_MSG_ERROR([you don't seem to have GNU make; it is required]) AC_MSG_ERROR([you don't seem to have GNU make; it is required])
fi fi
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX AC_PROG_CXX
AC_PROG_AWK AC_PROG_AWK
AC_PROG_LN_S AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_CHECK_PROGS([PKGCONFIG], [pkg-config]) AC_CHECK_PROGS([PKGCONFIG], [pkg-config])
AC_CHECK_PROGS([DOXYGEN], [doxygen]) AC_CHECK_PROGS([DOXYGEN], [doxygen])
AM_CONDITIONAL(HAVE_DOXYGEN, test -n "${DOXYGEN}") AM_CONDITIONAL(HAVE_DOXYGEN, test -n "${DOXYGEN}")
AC_CHECK_PROGS([SPLINT], [splint]) AC_CHECK_PROGS([SPLINT], [splint])
AM_CONDITIONAL(HAVE_SPLINT, test -n "${SPLINT}") AM_CONDITIONAL(HAVE_SPLINT, test -n "${SPLINT}")
## local helper functions ## local helper functions
# this function checks if CC support options passed as # this function checks if CC support options passed as
# args. Global CFLAGS are ignored during this test. # args. Global CFLAGS are ignored during this test.
cc_supports_flag() { cc_supports_flag() {
local CFLAGS="$@" local CPPFLAGS="$CPPFLAGS $@"
AC_MSG_CHECKING([whether $CC supports "$@"]) AC_MSG_CHECKING([whether $CC supports "$@"])
AC_COMPILE_IFELSE([int main(){return 0;}] , AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
[RC=0; AC_MSG_RESULT([yes])], [RC=0; AC_MSG_RESULT([yes])],
[RC=1; AC_MSG_RESULT([no])]) [RC=1; AC_MSG_RESULT([no])])
return $RC return $RC
} }
## cleanup ## cleanup
AC_MSG_NOTICE(Sanitizing prefix: ${prefix}) AC_MSG_NOTICE(Sanitizing prefix: ${prefix})
case $prefix in case $prefix in
NONE) prefix=/usr/local;; NONE) prefix=/usr/local;;
esac esac
AC_MSG_NOTICE(Sanitizing exec_prefix: ${exec_prefix}) AC_MSG_NOTICE(Sanitizing exec_prefix: ${exec_prefix})
case $exec_prefix in case $exec_prefix in
NONE) exec_prefix=$prefix;; NONE) exec_prefix=$prefix;;
prefix) exec_prefix=$prefix;; prefix) exec_prefix=$prefix;;
esac esac
# Checks for libraries. # Checks for libraries.
AC_CHECK_LIB([rt], [mq_open]) AC_CHECK_LIB([rt], [mq_open])
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([socket], [socket]) AC_CHECK_LIB([socket], [socket])
# look for testing harness "check" # look for testing harness "check"
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],[with_check=yes],[with_check=no ]) PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],[with_check=yes],[with_check=no ])
AM_CONDITIONAL(HAVE_CHECK, test "${with_check}" = "yes") AM_CONDITIONAL(HAVE_CHECK, test "${with_check}" = "yes")
# look for GLIB (used for testing integration) # look for GLIB (used for testing integration)
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0, have_glib=yes, have_glib=no) PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0, have_glib=yes, have_glib=no)
AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes) AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_LIBS)
if test x"$have_glib" = xyes; then if test x"$have_glib" = xyes; then
AC_DEFINE_UNQUOTED([HAVE_GLIB], [1], [We have glib]) AC_DEFINE_UNQUOTED([HAVE_GLIB], [1], [We have glib])
fi fi
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netinet/in.h stdi AC_CHECK_HEADERS([arpa/inet.h link.h fcntl.h inttypes.h limits.h netinet/in
nt.h \ .h stdint.h \
time.h sys/time.h stdlib.h string.h strings.h sys/types.h dlfcn.h time.h sys/time.h stdlib.h string.h strings.h sys/
sys/stat.h \ types.h sys/stat.h \
sys/param.h sys/socket.h sys/time.h sys/timerfd.h sys/epol sys/param.h sys/socket.h sys/time.h sys/timerfd.h sys/poll
l.h \ .h sys/epoll.h sys/uio.h \
sys/sockio.h sys/un.h syslog.h errno.h unistd.h]) sys/sockio.h sys/un.h sys/resource.h syslog.h errno.h unis
td.h sys/mman.h \
sys/sem.h sys/ipc.h sys/msg.h mqueue.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T AC_TYPE_UID_T
AC_C_INLINE AC_C_INLINE
AC_TYPE_INT32_T AC_TYPE_INT32_T
AC_TYPE_INT64_T AC_TYPE_INT64_T
AC_TYPE_INT8_T AC_TYPE_INT8_T
AC_TYPE_MODE_T AC_TYPE_MODE_T
AC_TYPE_PID_T AC_TYPE_PID_T
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T AC_TYPE_SSIZE_T
AC_TYPE_UINT32_T AC_TYPE_UINT32_T
AC_TYPE_UINT64_T AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions. # Checks for library functions.
AC_FUNC_CHOWN AC_FUNC_CHOWN
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK AC_FUNC_FORK
AC_FUNC_MALLOC AC_FUNC_MALLOC
AC_FUNC_MMAP AC_FUNC_MMAP
AC_FUNC_REALLOC AC_FUNC_REALLOC
AC_FUNC_STRERROR_R AC_CHECK_FUNCS([alarm clock_gettime ftruncate gettimeofday localtime localt
AC_CHECK_FUNCS([alarm clock_gettime ftruncate gettimeofday memset munmap \ ime_r \
socket strchr strerror strstr epoll_create epoll_create1 \ memset munmap socket strchr strrchr strchrnul strdup strerro
pthread_spin_lock timerfd_create]) r strstr \
poll epoll_create epoll_create1 random rand getrlimit syscon
f \
pthread_spin_lock timerfd_create pthread_setschedparam \
sched_get_priority_max sched_setscheduler])
## local defines ## local defines
PACKAGE_FEATURES="" PACKAGE_FEATURES=""
if test $ac_cv_func_timerfd_create = yes; then if test x$ac_cv_func_timerfd_create = xyes; then
PACKAGE_FEATURES="$PACKAGE_FEATURES timerfd" PACKAGE_FEATURES="$PACKAGE_FEATURES timerfd"
fi fi
if test $ac_cv_func_epoll_create = yes; then if test x$ac_cv_func_epoll_create = xyes; then
PACKAGE_FEATURES="$PACKAGE_FEATURES epoll" PACKAGE_FEATURES="$PACKAGE_FEATURES epoll"
fi fi
# Check for atomic support nongcc_memory_barrier_needed=no
gcc_has_builtin_atomic_operations=no arch_force_shmlba=no
if test x"$GCC" = xyes; then AC_MSG_CHECKING([for architecture in ${host_cpu}])
AC_MSG_CHECKING([whether GCC supports build-in atomic intrinsics]) case $host_cpu in
AC_TRY_LINK([], sparc*)
[int i; AC_MSG_RESULT([sparc])
__sync_synchronize (); AC_DEFINE_UNQUOTED([QB_ARCH_SPARC], [1], [sparc])
__sync_bool_compare_and_swap (&i, 0, 1); nongcc_memory_barrier_needed=yes
__sync_fetch_and_add (&i, 1); arch_force_shmlba=yes
], ;;
[gcc_has_builtin_atomic_operations=yes], alpha*)
[gcc_has_builtin_atomic_operations=no]) AC_MSG_RESULT([alpha])
AC_DEFINE_UNQUOTED([QB_ARCH_ALPHA], [1], [alpha])
nongcc_memory_barrier_needed=yes
;;
powerpc*)
AC_MSG_RESULT([powerpc])
AC_DEFINE_UNQUOTED([QB_ARCH_POWERPC], [1], [powerpc])
nongcc_memory_barrier_needed=yes
arch_force_shmlba=yes
;;
ia64)
AC_MSG_RESULT([ia64])
AC_DEFINE_UNQUOTED([QB_ARCH_IA64], [1], [ia64])
nongcc_memory_barrier_needed=yes
;;
arm*)
AC_MSG_RESULT([ia64])
AC_DEFINE_UNQUOTED([QB_ARCH_ARM], [1], [arm])
arch_force_shmlba=yes
;;
mips*)
AC_MSG_RESULT([ia64])
AC_DEFINE_UNQUOTED([QB_ARCH_MIPS], [1], [mips])
arch_force_shmlba=yes
;;
*)
AC_MSG_RESULT([${host_cpu}])
;;
esac
AC_MSG_RESULT($gcc_has_builtin_atomic_operations) if test $arch_force_shmlba = yes; then
if test $gcc_has_builtin_atomic_operations = yes; then AC_DEFINE_UNQUOTED([QB_FORCE_SHM_ALIGN], [1],
memory_barrier_needed=yes [shared and fixed mmap must align on 16k])
PACKAGE_FEATURES="$PACKAGE_FEATURES gcc__sync"
else
case $host_cpu in
sparc*)
AC_MSG_RESULT([sparcv9])
AC_DEFINE_UNQUOTED([QB_ARCH_SPARCV9], [1], [sparcv9]
)
memory_barrier_needed=yes
;;
alpha*)
AC_MSG_RESULT([alpha])
AC_DEFINE_UNQUOTED([QB_ARCH_ALPHA], [1], [alpha])
memory_barrier_needed=yes
;;
powerpc*)
AC_MSG_RESULT([powerpc])
AC_DEFINE_UNQUOTED([QB_ARCH_POWERPC], [1], [powerpc]
)
memory_barrier_needed=yes
;;
ia64)
AC_MSG_RESULT([ia64])
AC_DEFINE_UNQUOTED([QB_ARCH_IA64], [1], [ia64])
memory_barrier_needed=yes
;;
*)
AC_MSG_RESULT([none])
memory_barrier_needed=no
;;
esac
AC_MSG_WARN([-----------------------------])
AC_MSG_WARN([You have gcc but not __sync_bool_compare_and_sw
ap])
AC_MSG_WARN([try CFLAGS="-march=<your arch> -mtune=native" .
/configure])
AC_MSG_WARN([-----------------------------])
fi
fi fi
if test x"$memory_barrier_needed" != xno; then
AC_DEFINE_UNQUOTED(QB_ATOMIC_OP_MEMORY_BARRIER_NEEDED, 1,
[need atomic memory barrier])
fi
AM_CONDITIONAL(HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS,
[test $gcc_has_builtin_atomic_operations = yes])
LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \
-badflag -D__gnuc_va_list=va_list -D__attribute\(x\)= \
-warnposix +matchanyintegral"
# local options
AC_ARG_ENABLE([ansi],
[ --enable-ansi : force to build with ANSI standards. ],
[ default="no" ])
AC_ARG_ENABLE([fatal-warnings],
[ --enable-fatal-warnings : enable fatal warnings. ],
[ default="no" ])
AC_ARG_ENABLE([debug],
[ --enable-debug : enable debug build. ],
[ default="no" ])
AC_ARG_ENABLE([coverage],
[ --enable-coverage : coverage analysis of the codebase. ],
[ default="no" ])
AC_ARG_WITH([socket-dir],
[ --with-socket-dir=DIR : socket dir. ],
[ SOCKETDIR="$withval" ],
[ SOCKETDIR="$localstatedir/run" ])
# OS detection # OS detection
# THIS SECTION MUST DIE! # THIS SECTION MUST DIE!
CP=cp CP=cp
LIB_RT=-lrt
supports_sysv_mq="yes"
supports_posix_mq="yes"
AC_MSG_CHECKING([for os in ${host_os}])
case "$host_os" in case "$host_os" in
*linux*) *linux*)
AC_DEFINE_UNQUOTED([QB_LINUX], [1], AC_DEFINE_UNQUOTED([QB_LINUX], [1],
[Compiling for Linux platform]) [Compiling for Linux platform])
AC_MSG_RESULT([Linux])
;; ;;
darwin*) darwin*)
AC_DEFINE_UNQUOTED([QB_DARWIN], [1], AC_DEFINE_UNQUOTED([QB_DARWIN], [1],
[Compiling for Darwin platform]) [Compiling for Darwin platform])
CP=rsync CP=rsync
LIB_RT=
supports_sysv_mq="no"
supports_posix_mq="no"
ac_cv_link_attribute_section=no
dnl Attribute section appears to work here but fails later w
ith:
dnl cc1: error in backend: Global variable 'descriptor.4902'
has an invalid section specifier '__verbose': mach-o section specifier req
uires a segment and section separated by a comma
AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON], AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON],
[Shared memory define for Darwin platform ]) [Shared memory define for Darwin platform ])
AC_DEFINE_UNQUOTED([PATH_MAX], [4096], AC_DEFINE_UNQUOTED([PATH_MAX], [4096],
[Number of chars in a path name including nul]) [Number of chars in a path name including nul])
AC_DEFINE_UNQUOTED([NAME_MAX], [255], AC_DEFINE_UNQUOTED([NAME_MAX], [255],
[Number of chars in a file name]) [Number of chars in a file name])
AC_DEFINE_UNQUOTED([DISABLE_POSIX_THREAD_PROCESS_SHARED], [1 ], AC_DEFINE_UNQUOTED([DISABLE_POSIX_THREAD_PROCESS_SHARED], [1 ],
[Disable _POSIX_THREAD_PROCESS_SHARED]) [Disable _POSIX_THREAD_PROCESS_SHARED])
AC_MSG_RESULT([Dawin])
;; ;;
*bsd*) *bsd*)
AC_DEFINE_UNQUOTED([QB_BSD], [1], AC_DEFINE_UNQUOTED([QB_BSD], [1],
[Compiling for BSD platform]) [Compiling for BSD platform])
AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON], AC_DEFINE_UNQUOTED([MAP_ANONYMOUS], [MAP_ANON],
[Shared memory define for Darwin platform ]) [Shared memory define for Darwin platform ])
case "$host_os" in case "$host_os" in
*freebsd[[234567]]*) *freebsd[[234567]]*)
;; ;;
*freebsd*) *freebsd*)
AC_DEFINE_UNQUOTED([QB_FREEBSD_GE_8], [1], AC_DEFINE_UNQUOTED([QB_FREEBSD_GE_8], [1],
[Compiling for FreeBSD >= 8 platf orm]) [Compiling for FreeBSD >= 8 platf orm])
;; ;;
esac esac
AC_MSG_RESULT([BSD])
;; ;;
*solaris*) *solaris*)
AC_DEFINE_UNQUOTED([QB_SOLARIS], [1], AC_DEFINE_UNQUOTED([QB_SOLARIS], [1],
[Compiling for Solaris platform]) [Compiling for Solaris platform])
AC_DEFINE_UNQUOTED([TS_CLASS], [1], AC_DEFINE_UNQUOTED([TS_CLASS], [1],
[Prevent being scheduled RR]) [Prevent being scheduled RR])
AC_DEFINE_UNQUOTED([_SEM_SEMUN_UNDEFINED], [1], AC_DEFINE_UNQUOTED([_SEM_SEMUN_UNDEFINED], [1],
[The semun structure is undefined]) [The semun structure is undefined])
CP=rsync CP=rsync
AC_MSG_RESULT([Solaris])
;; ;;
*) *)
AC_MSG_ERROR([Unsupported OS? hmmmm]) AC_MSG_ERROR([Unsupported OS? hmmmm])
;; ;;
esac esac
AC_MSG_CHECKING([whether GCC supports build-in atomic intrinsics])
if test -z "$gcc_has_builtin_atomic_operations"; then
gcc_has_builtin_atomic_operations=no
if test x"$GCC" = xyes && test x$have_mingw != xyes; then
AC_TRY_LINK([],
[int i;
__sync_synchronize ();
__sync_bool_compare_and_swap (&i, 0, 1);
__sync_fetch_and_add (&i, 1);
],
[gcc_has_builtin_atomic_operations=yes],
[gcc_has_builtin_atomic_operations=no])
fi
fi
AC_MSG_RESULT($gcc_has_builtin_atomic_operations)
AM_CONDITIONAL(HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS,
[test "x$gcc_has_builtin_atomic_operations" = xyes])
if test "x$gcc_has_builtin_atomic_operations" = xyes; then
AC_DEFINE_UNQUOTED(HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS, 1,
[have builtin atomic operations])
fi
AC_MSG_CHECKING([whether atomics need memory barrier])
if test -n "$ac_cv_atomic_need_memory_barrier"; then
memory_barrier_needed=$ac_cv_atomic_need_memory_barrier
else
if test x$gcc_has_builtin_atomic_operations = xyes; then
memory_barrier_needed=yes
PACKAGE_FEATURES="$PACKAGE_FEATURES gcc__sync"
else
memory_barrier_needed=$nongcc_memory_barrier_needed
AC_MSG_WARN([-----------------------------])
AC_MSG_WARN([You have gcc but not __sync_bool_compare_and_sw
ap])
AC_MSG_WARN([try CFLAGS="-march=<your arch> -mtune=native" .
/configure])
AC_MSG_WARN([-----------------------------])
fi
fi
AC_MSG_RESULT($memory_barrier_needed)
if test x"$memory_barrier_needed" != xno; then
AC_DEFINE_UNQUOTED(QB_ATOMIC_OP_MEMORY_BARRIER_NEEDED, 1,
[need atomic memory barrier])
fi
LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \
-badflag -D__gnuc_va_list=va_list -D__attribute\(x\)= \
-warnposix +matchanyintegral"
# local options
AC_ARG_ENABLE([ansi],
[ --enable-ansi : force to build with ANSI standards. ],
[ default="no" ])
AC_ARG_ENABLE([fatal-warnings],
[ --enable-fatal-warnings : enable fatal warnings. ],
[ default="no" ])
AC_ARG_ENABLE([debug],
[ --enable-debug : enable debug build. ],
[ default="no" ])
AC_ARG_ENABLE([coverage],
[ --enable-coverage : coverage analysis of the codebase. ],
[ default="no" ])
AC_ARG_ENABLE([slow-tests],
[ --enable-slow-tests : build and run slow tests. ],
[ default="no" ])
AC_ARG_WITH([socket-dir],
[ --with-socket-dir=DIR : socket dir. ],
[ SOCKETDIR="$withval" ],
[ SOCKETDIR="$localstatedir/run" ])
AC_SUBST(CP) AC_SUBST(CP)
AC_SUBST(LIB_RT)
# *FLAGS handling goes here # *FLAGS handling goes here
ENV_CFLAGS="$CFLAGS" ENV_CFLAGS="$CFLAGS"
ENV_CPPFLAGS="$CPPFLAGS" ENV_CPPFLAGS="$CPPFLAGS"
ENV_LDFLAGS="$LDFLAGS" ENV_LDFLAGS="$LDFLAGS"
# debug build stuff # debug build stuff
if test "x${enable_debug}" = xyes; then if test "x${enable_debug}" = xyes; then
AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code]) AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code])
OPT_CFLAGS="-O0" OPT_CFLAGS="-O0"
skipping to change at line 326 skipping to change at line 383
missing-declarations missing-declarations
strict-prototypes strict-prototypes
declaration-after-statement declaration-after-statement
pointer-arith pointer-arith
write-strings write-strings
cast-align cast-align
bad-function-cast bad-function-cast
missing-format-attribute missing-format-attribute
format=2 format=2
format-security format-security
format-nonliteral no-format-nonliteral
no-long-long no-long-long
unsigned-char unsigned-char
gnu89-inline gnu89-inline
no-strict-aliasing no-strict-aliasing
" "
for j in $WARNLIST; do for j in $WARNLIST; do
if cc_supports_flag -W$j; then if cc_supports_flag -W$j; then
EXTRA_WARNINGS="$EXTRA_WARNINGS -W$j"; EXTRA_WARNINGS="$EXTRA_WARNINGS -W$j";
fi fi
skipping to change at line 353 skipping to change at line 410
AC_MSG_NOTICE([Enabling Coverage (enable -O0 by default)]) AC_MSG_NOTICE([Enabling Coverage (enable -O0 by default)])
OPT_CFLAGS="-O0" OPT_CFLAGS="-O0"
COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs" COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs" COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
PACKAGE_FEATURES="$PACKAGE_FEATURES coverage" PACKAGE_FEATURES="$PACKAGE_FEATURES coverage"
else else
COVERAGE_CFLAGS="" COVERAGE_CFLAGS=""
COVERAGE_LDFLAGS="" COVERAGE_LDFLAGS=""
fi fi
if test "x${enable_slow_tests}" = xyes ; then
AC_DEFINE([HAVE_SLOW_TESTS], 1,[have slow tests])
AC_MSG_NOTICE([Enabling Slow tests])
fi
AM_CONDITIONAL(HAVE_SLOW_TESTS, [test "x${enable_slow_tests}" = xyes])
if test -n "$ac_cv_supports_sysv_mq"; then
supports_sysv_mq=$ac_cv_supports_sysv_mq
fi
if test "x${supports_sysv_mq}" = xyes ; then
AC_DEFINE([HAVE_SYSV_MQ], [1],
[have sysv message queues])
PACKAGE_FEATURES="$PACKAGE_FEATURES sysv_mq"
AC_MSG_NOTICE([Enabling SYSV Message Queues])
fi
AM_CONDITIONAL(HAVE_SYSV_MQ, [test "x${supports_sysv_mq}" = xyes])
if test -n "$ac_cv_supports_posix_mq"; then
supports_posix_mq=$ac_cv_supports_posix_mq
fi
if test "x${supports_posix_mq}" = xyes ; then
AC_DEFINE([HAVE_POSIX_MQ], [1],
[have posix message queues])
PACKAGE_FEATURES="$PACKAGE_FEATURES posix_mq"
AC_MSG_NOTICE([Enabling POSIX Message Queues])
fi
AM_CONDITIONAL(HAVE_POSIX_MQ, [test "x${supports_posix_mq}" = xyes])
AM_CONDITIONAL(USE_TIMERFD, [test "x$ac_cv_func_timerfd_create" = xyes]) AM_CONDITIONAL(USE_TIMERFD, [test "x$ac_cv_func_timerfd_create" = xyes])
# --- callsite sections ---
if test "x${GCC}" = xyes; then
AC_MSG_CHECKING([whether GCC supports __attribute__((section())])
if test "x${ac_cv_link_attribute_section}" = x ; then
AC_TRY_LINK([],
[static int my_var __attribute__((section("__ver
bose"))) = 5;
if (my_var == 5) return 0;
else return -1;
],
[gcc_has_attribute_section=yes],
[gcc_has_attribute_section=no])
else
gcc_has_attribute_section=${ac_cv_link_attribute_section}
fi
AC_MSG_RESULT($gcc_has_attribute_section)
if test $gcc_has_attribute_section = yes; then
AC_DEFINE([QB_HAVE_ATTRIBUTE_SECTION], 1,
[Enabling code using __attribute__((section))])
PACKAGE_FEATURES="$PACKAGE_FEATURES attribute-section"
fi
fi
# --- ansi --- # --- ansi ---
if test "x${enable_ansi}" = xyes && \ if test "x${enable_ansi}" = xyes && \
cc_supports_flag -std=iso9899:199409 ; then cc_supports_flag -std=iso9899:199409 ; then
AC_MSG_NOTICE([Enabling ANSI Compatibility]) AC_MSG_NOTICE([Enabling ANSI Compatibility])
ANSI_CPPFLAGS="-ansi -D_GNU_SOURCE -DANSI_ONLY" ANSI_CPPFLAGS="-ansi -D_GNU_SOURCE -DANSI_ONLY"
PACKAGE_FEATURES="$PACKAGE_FEATURES ansi" PACKAGE_FEATURES="$PACKAGE_FEATURES ansi"
else else
ANSI_CPPFLAGS="" ANSI_CPPFLAGS=""
fi fi
skipping to change at line 381 skipping to change at line 489
else else
WERROR_CFLAGS="" WERROR_CFLAGS=""
fi fi
# final build of *FLAGS # final build of *FLAGS
CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS \ CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS \
$COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS" $COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS"
CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS" CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS"
LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS" LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS"
if test -f /usr/share/dict/words ; then
HAVE_DICT_WORDS=yes
AC_DEFINE([HAVE_DICT_WORDS], 1, "Have /usr/share/dict/words")
fi
AM_CONDITIONAL([HAVE_DICT_WORDS], [test "x$HAVE_DICT_WORDS" = xyes])
# substitute what we need: # substitute what we need:
AC_SUBST([SOCKETDIR]) AC_SUBST([SOCKETDIR])
AC_SUBST([LINT_FLAGS]) AC_SUBST([LINT_FLAGS])
AC_DEFINE_UNQUOTED([SOCKETDIR], "$(eval echo ${SOCKETDIR})", [Socket direct ory]) AC_DEFINE_UNQUOTED([SOCKETDIR], "$(eval echo ${SOCKETDIR})", [Socket direct ory])
AC_DEFINE_UNQUOTED([LOCALSTATEDIR], "$(eval echo ${localstatedir})", [local state directory]) AC_DEFINE_UNQUOTED([LOCALSTATEDIR], "$(eval echo ${localstatedir})", [local state directory])
AC_DEFINE_UNQUOTED([PACKAGE_FEATURES], "${PACKAGE_FEATURES}", [quarterback built-in features]) AC_DEFINE_UNQUOTED([PACKAGE_FEATURES], "${PACKAGE_FEATURES}", [quarterback built-in features])
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
include/Makefile include/Makefile
include/qb/Makefile include/qb/Makefile
lib/Makefile lib/Makefile
lib/libqb.pc lib/libqb.pc
tests/Makefile tests/Makefile
examples/Makefile
docs/Makefile docs/Makefile
docs/man.dox docs/man.dox
docs/html.dox]) docs/html.dox])
AC_OUTPUT AC_OUTPUT
AC_MSG_RESULT([]) AC_MSG_RESULT([])
AC_MSG_RESULT([$PACKAGE configuration:]) AC_MSG_RESULT([$PACKAGE configuration:])
AC_MSG_RESULT([ Version = ${VERSION}]) AC_MSG_RESULT([ Version = ${VERSION}])
AC_MSG_RESULT([ Prefix = ${prefix}]) AC_MSG_RESULT([ Prefix = ${prefix}])
 End of changes. 32 change blocks. 
112 lines changed or deleted 235 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/