From 721ca9c56ad1864576757cc06d6b5f058f47285e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 30 Nov 2007 13:43:12 +0000 Subject: added compile-time switches for -pthread --- Makefile.am | 4 ++-- configure.ac | 6 ++++-- plugins/ommysql/Makefile.am | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index b8c19c1c..b3bca98c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -62,8 +62,8 @@ rsyslogd_SOURCES = \ gss-misc.c \ gss-misc.h -rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" -rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) $(gss_libs) -ldl +rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" $(pthreads_cflags) +rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) -ldl rsyslogd_LDFLAGS = -export-dynamic man_MANS = rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5 diff --git a/configure.ac b/configure.ac index 20fee5c7..90d684dd 100644 --- a/configure.ac +++ b/configure.ac @@ -164,8 +164,10 @@ if test "x$enable_pthreads" != "xno"; then [pthread_create], [ AC_DEFINE([USE_PTHREADS], [1], [Multithreading support enabled.]) - pthreads_libs="-lpthread" - AC_SUBST(pthreads_libs) + pthreads_libs="-lpthread" + pthreads_cflags="-pthread" + AC_SUBST(pthreads_libs) + AC_SUBST(pthreads_cflags) ], [AC_MSG_FAILURE([pthread is missing])], [-lpthread] diff --git a/plugins/ommysql/Makefile.am b/plugins/ommysql/Makefile.am index ee4b12bf..7a8909ce 100644 --- a/plugins/ommysql/Makefile.am +++ b/plugins/ommysql/Makefile.am @@ -2,7 +2,7 @@ pkglibdir = $(libdir)/rsyslog pkglib_LTLIBRARIES = ommysql.la ommysql_la_SOURCES = ommysql.c ommysql.h ../../module-template.h -ommysql_la_CPPFLAGS = $(mysql_cflags) -I$(srcdir)/../.. +ommysql_la_CPPFLAGS = $(mysql_cflags) -I$(srcdir)/../.. $(pthreads_cflags) ommysql_la_LDFLAGS = -module -avoid-version ommysql_la_LIBADD = $(mysql_libs) -- cgit v1.2.3