[patch] Don't add PTH include path to gpgme's CFLAGS globally
Michael Nottebrock <[email protected]> Mon, 8 Aug 2005 19:54:11 +0200
| Newsgroups | gmane.comp.encryption.gpg.gpa.devel |
|---|---|
| Message-ID | <[email protected]> |
In FreeBSD 6 and later, sys/types.h now also defines the basic pthread types in order to comply with IEEE Std 1003.1-2004. This causes a compile error in gpgme due to conflicting types for pthread_* if pth-support is enabled, since the pth include directory is globally added to CFLAGS and ath-pthread.c picks up the pth-supplied pthread.h header instead of the system include. The attached patch changes gpgme's global configure template and the Makefile template in gpgme/gpgme so that PTH_CFLAGS are only added to the include path where needed. The patch should apply to both the latest gpgme in CVS and gpgme 1.0.x. Cheers, -- ,_, | Michael Nottebrock | [email protected] (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org _______________________________________________ Gpa-dev mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gpa-dev
gpgme-pth-cflags.diff
(text/plain, 1.5 KB)
Index: configure.ac
===================================================================
RCS file: /cvs/gnupg/gpgme/configure.ac,v
retrieving revision 1.98
diff -u -r1.98 configure.ac
--- configure.ac 24 Mar 2005 13:09:54 -0000 1.98
+++ configure.ac 8 Aug 2005 14:37:09 -0000
@@ -120,7 +120,6 @@
AC_CHECK_PTH(1.2.0,,,no,have_pth=yes)
if test "$have_pth" = yes; then
AC_DEFINE(HAVE_PTH, ,[Define if we have Pth.])
- CFLAGS="$CFLAGS $PTH_CFLAGS"
fi
AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
if test "$have_pthread" = yes; then
Index: gpgme/Makefile.am
===================================================================
RCS file: /cvs/gnupg/gpgme/gpgme/Makefile.am,v
retrieving revision 1.56
diff -u -r1.56 Makefile.am
--- gpgme/Makefile.am 24 Mar 2005 13:05:12 -0000 1.56
+++ gpgme/Makefile.am 8 Aug 2005 14:37:10 -0000
@@ -99,6 +99,7 @@
AM_CPPFLAGS = $(assuan_cppflags) @GPG_ERROR_CFLAGS@
+libgpgme_la_CFLAGS= ${CFLAGS} @PTH_CFLAGS@
libgpgme_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \
@LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
libgpgme_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \
@@ -113,6 +114,7 @@
libgpgme_pthread_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \
-lpthread @GPG_ERROR_LIBS@
+libgpgme_pth_la_CFLAGS = ${CFLAGS} @PTH_CFLAGS@
libgpgme_pth_la_CPPFLAGS = $(AM_CPPFLAGS) @PTH_CPPFLAGS@
libgpgme_pth_la_LDFLAGS = @PTH_LDFLAGS@ \
$(libgpgme_version_script_cmd) -version-info \