Change the use of CFLAGS WRT ACX_PTHREAD. Thread libs/cflags are
authorAdam Dickmeiss <adam@indexdata.dk>
Sun, 25 Feb 2007 14:46:50 +0000 (14:46 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Sun, 25 Feb 2007 14:46:50 +0000 (14:46 +0000)
always returned in yaz-config, i.e. 'thread' option for yaz-config is
a no-op.

client/Makefile.am
configure.ac
src/Makefile.am
test/Makefile.am
yaz-config.in
ztest/Makefile.am

index fb0e32d..1611803 100644 (file)
@@ -1,6 +1,6 @@
 ## Copyright (C) 1995-2007, Index Data
 ## All rights reserved.
 ## 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 
 
 
 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)
 
 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) 
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS)
 
 yaz_client_LDADD = ../src/libyaz.la $(READLINE_LIBS) 
index 9c5372c..1c5c06b 100644 (file)
@@ -1,6 +1,6 @@
 dnl YAZ Toolkit, Index Data 1995-2007
 dnl See the file LICENSE for details.
 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)
 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
     fi
 fi
 dnl
-AC_SUBST(THREAD_CFLAGS)
+AC_SUBST(YAZ_CONFIG_CFLAGS)
+dnl
 HAVETHREADS=0
 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
 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
     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 
            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([
 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"
            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)
            ])
 fi
 
 dnl ----- libXSLT/libEXLT/libXML2
 AC_SUBST(XML2_CFLAGS)
-AC_SUBST(YAZ_CONFIG_CFLAGS)
-YAZ_CONFIG_CFLAGS=""
 
 YAZ_LIBXML2(
     [
 
 YAZ_LIBXML2(
     [
index 41c84ff..f33d245 100644 (file)
@@ -1,6 +1,6 @@
 ## This file is part of the YAZ toolkit.
 ## Copyright (C) 1995-2007, Index Data, All rights reserved.
 ## 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
 
 
 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
 
 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_
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS) 
 
 AM_YFLAGS=-p cql_
index cec9bb1..95129f5 100644 (file)
@@ -1,6 +1,6 @@
 ## Copyright (C) 1995-2007, Index Data ApS
 ## All rights reserved.
 ## 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 \
 
 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)
 
 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:
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS)
 
 dist-hook:
index e4d99da..59bdb1d 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #!/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
 yazprefix=@prefix@
 yaz_echo_cflags=no
 yaz_echo_libs=no
@@ -98,10 +98,6 @@ else
     fi
 fi
 
     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
 if test "$yaz_echo_help" = "yes"; then
     usage 1 1>&2
 fi
index a9fd6e8..c47aa8b 100644 (file)
@@ -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
 
 
 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
 
 
 yaz_ztest_LDADD=../src/libyaz.la
 
-AM_CFLAGS=$(THREAD_CFLAGS)
-
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS)
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS)