From: Adam Dickmeiss Date: Sun, 25 Feb 2007 14:46:50 +0000 (+0000) Subject: Change the use of CFLAGS WRT ACX_PTHREAD. Thread libs/cflags are X-Git-Tag: YAZ.2.1.52~4 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=8d133ab04af9cc1fe4d2463fb2a0139644ecd6e2 Change the use of CFLAGS WRT ACX_PTHREAD. Thread libs/cflags are always returned in yaz-config, i.e. 'thread' option for yaz-config is a no-op. --- diff --git a/client/Makefile.am b/client/Makefile.am index fb0e32d..1611803 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -1,6 +1,6 @@ ## Copyright (C) 1995-2007, Index Data ## All rights reserved. -## $Id: Makefile.am,v 1.29 2007-01-24 11:50:18 adam Exp $ +## $Id: Makefile.am,v 1.30 2007-02-25 14:46:50 adam Exp $ bin_PROGRAMS=yaz-client @@ -11,8 +11,6 @@ EXTRA_DIST = default.bib COMMON=admin.c admin.h tabcomplete.c tabcomplete.h fhistory.c fhistory.h yaz_client_SOURCES=client.c $(COMMON) -AM_CFLAGS=$(THREAD_CFLAGS) - AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS) yaz_client_LDADD = ../src/libyaz.la $(READLINE_LIBS) diff --git a/configure.ac b/configure.ac index 9c5372c..1c5c06b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1995-2007 dnl See the file LICENSE for details. -dnl $Id: configure.ac,v 1.63 2007-02-24 13:35:23 adam Exp $ +dnl $Id: configure.ac,v 1.64 2007-02-25 14:46:50 adam Exp $ AC_PREREQ(2.59) AC_INIT([yaz],[2.1.51],[yaz-help@indexdata.dk]) AC_CONFIG_SRCDIR(configure.ac) @@ -311,42 +311,41 @@ if test "$enable_tcpd" -a "$enable_tcpd" != "no"; then fi fi dnl -AC_SUBST(THREAD_CFLAGS) +AC_SUBST(YAZ_CONFIG_CFLAGS) +dnl HAVETHREADS=0 -THREAD_CFLAGS="" -LIBTHREAD="" dnl dnl ------ GNU threads AC_ARG_ENABLE(pth, [ --enable-pth enable GNU threads],[enable_pth=$enableval],[enable_pth=no]) AC_SUBST(LIBPTH) if test "$enable_pth" = "yes"; then + PTH_LIBS="" OLIBS=$LIBS AC_CHECK_LIB(pth,main) if test "$ac_cv_lib_pth_main" = "yes"; then AC_CHECK_HEADERS(pth.h) if test "$ac_cv_header_pth_h" = "yes"; then - LIBTHREAD="-lpth" - THREAD_CFLAGS="-DYAZ_GNU_THREADS=1" + PTH_LIBS="-lpth" + CFLAGS="$CFLAGS -DYAZ_GNU_THREADS=1" HAVETHREADS=1 fi fi - LIBS="$OLIBS $LIBTHREAD" + LIBS="$OLIBS $PTH_LIBS" fi dnl dnl ------ POSIX Threads AC_ARG_ENABLE(threads, [ --disable-threads disable POSIX threads],[enable_threads=$enableval],[enable_threads=yes]) if test "$enable_threads" = "yes" -a "$HAVETHREADS" = "0"; then ACX_PTHREAD([ - THREAD_CFLAGS="$PTHREAD_CFLAGS -DYAZ_POSIX_THREADS=1" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + AC_DEFINE(YAZ_POSIX_THREADS) LIBS="$PTHREAD_LIBS $LIBS" - HAVETHREADS=1 + YAZ_CONFIG_CFLAGS="$YAZ_CONFIG_CFLAGS $PTHREAD_CFLAGS -DYAZ_POSIX_THREADS=1" ]) fi dnl ----- libXSLT/libEXLT/libXML2 AC_SUBST(XML2_CFLAGS) -AC_SUBST(YAZ_CONFIG_CFLAGS) -YAZ_CONFIG_CFLAGS="" YAZ_LIBXML2( [ diff --git a/src/Makefile.am b/src/Makefile.am index 41c84ff..f33d245 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## This file is part of the YAZ toolkit. ## Copyright (C) 1995-2007, Index Data, All rights reserved. -## $Id: Makefile.am,v 1.52 2007-02-23 10:15:01 adam Exp $ +## $Id: Makefile.am,v 1.53 2007-02-25 14:46:50 adam Exp $ YAZ_VERSION_INFO=2:1:0 @@ -26,7 +26,6 @@ YAZCOMP=$(top_srcdir)/util/yaz-asncomp YAZCOMP_Z = $(YAZCOMP) -d $(srcdir)/z.tcl -i yaz -I$(top_srcdir)/include YAZCOMP_I = $(YAZCOMP) -d $(srcdir)/ill.tcl -i yaz -I$(top_srcdir)/include -AM_CFLAGS=$(THREAD_CFLAGS) AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS) AM_YFLAGS=-p cql_ diff --git a/test/Makefile.am b/test/Makefile.am index cec9bb1..95129f5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,6 +1,6 @@ ## Copyright (C) 1995-2007, Index Data ApS ## All rights reserved. -## $Id: Makefile.am,v 1.32 2007-01-18 14:46:58 adam Exp $ +## $Id: Makefile.am,v 1.33 2007-02-25 14:46:51 adam Exp $ check_PROGRAMS = tsticonv tstnmem tstmatchstr tstwrbuf tstodr tstccl tstlog \ tstsoap1 tstsoap2 tstodrstack tstlogthread tstxmlquery tstpquery \ @@ -28,8 +28,6 @@ EXTRA_DIST = tstodr.asn tstodrcodec.c tstodrcodec.h cqlsample \ YAZCOMP = ../util/yaz-asncomp YAZCOMPLINE = $(YAZCOMP) -d z.tcl -i yaz -I../include $(YCFLAGS) -AM_CFLAGS=$(THREAD_CFLAGS) - AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) dist-hook: diff --git a/yaz-config.in b/yaz-config.in index e4d99da..59bdb1d 100644 --- a/yaz-config.in +++ b/yaz-config.in @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yaz-config.in,v 1.25 2006-07-06 10:17:51 adam Exp $ +# $Id: yaz-config.in,v 1.26 2007-02-25 14:46:50 adam Exp $ yazprefix=@prefix@ yaz_echo_cflags=no yaz_echo_libs=no @@ -98,10 +98,6 @@ else fi fi -if test "$lib_thread" = "yes"; then - YAZINC="$YAZINC @THREAD_CFLAGS@" -fi - if test "$yaz_echo_help" = "yes"; then usage 1 1>&2 fi diff --git a/ztest/Makefile.am b/ztest/Makefile.am index a9fd6e8..c47aa8b 100644 --- a/ztest/Makefile.am +++ b/ztest/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.20 2005-09-09 10:34:09 adam Exp $ +## $Id: Makefile.am,v 1.21 2007-02-25 14:46:51 adam Exp $ bin_PROGRAMS=yaz-ztest @@ -8,6 +8,4 @@ EXTRA_DIST=dummy-records dummy-words dummy-grs ztest.pem config1.xml yaz_ztest_LDADD=../src/libyaz.la -AM_CFLAGS=$(THREAD_CFLAGS) - AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS)