From f1d6d57b100b334e635f56437c5a9748a97a232a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 26 Feb 2007 13:30:59 +0000 Subject: [PATCH] Move YAZ tests before Boost thread tests so we set some options right WRT threading. Use AC_LANG(C) instead of AC_LANG(C++) so that tests by default are in C mode . If not, checks such as AC_CHECK_LIB($ax_lib, main) fails on Sun Studio C which complains about retursive calls to main. --- configure.ac | 18 ++++++++++-------- src/Makefile.am | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index bba803d..35a5d01 100644 --- a/configure.ac +++ b/configure.ac @@ -23,8 +23,8 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB AM_PROG_LIBTOOL -# Use C++ compilers only for tests -AC_LANG(C++) +# Default language to use for tests (some tests may switch to C++) +AC_LANG(C) if test "$enable_shared" = "yes"; then AC_DEFINE([HAVE_DL_SUPPORT],[1], @@ -33,7 +33,15 @@ fi # Checks for libraries. AC_CHECK_LIB(dl,dlopen) +AC_CHECK_LIB(m,main) +## YAZPP checks +YAZPP_INIT(threads,1.0.2) +if test -z "$YAZPPLIB"; then + AC_MSG_ERROR([YAZ++ development libraries missing]) +fi +YAZ_DOC +CPPFLAGS="$YAZPPINC $CPPFLAGS" # check for Boost C++ development libs and headers @@ -55,12 +63,6 @@ if test "$ax_cv_boost_unit_test_framework" = "no"; then fi -## YAZPP checks -YAZPP_INIT(threads,1.0.2) -if test -z "$YAZPPLIB"; then - AC_MSG_ERROR([YAZ++ development libraries missing]) -fi -YAZ_DOC # Checks for header files. ##AC_HEADER_STDC diff --git a/src/Makefile.am b/src/Makefile.am index 2fd4fba..881230f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ -## $Id: Makefile.am,v 1.63 2007-02-26 11:40:03 marc Exp $ +## $Id: Makefile.am,v 1.64 2007-02-26 13:31:00 adam Exp $ MAINTAINERCLEANFILES = Makefile.in config.in config.hpp -AM_CXXFLAGS = $(YAZPPINC) $(BOOST_CPPFLAGS) +AM_CXXFLAGS = $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) \ $(BOOST_DATE_TIME_LIB) \ -- 1.7.10.4