summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2010-01-11 22:57:34 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2010-01-11 22:57:34 +0000
commitad707a2e74070089dd6f5a7cfe0574dbcc0f1ed4 (patch)
tree659665dc552ddd21124289aff3ecc078b2fb2d53
parenta1919fac4d4db02b32208d927cd484d4bcae88ec (diff)
downloadneon-ad707a2e74070089dd6f5a7cfe0574dbcc0f1ed4.tar.gz
Merge r1777 from trunk:
* src/ne_defs.h: Only define NE_PRIVATE if undefined. * configure.in: Define NE_PRIVATE to 'extern' for a static build. git-svn-id: http://svn.webdav.org/repos/projects/neon/branches/0.29.x@1786 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r--configure.in10
-rw-r--r--src/ne_defs.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 368e6e7..65985ce 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ m4_define(ne_version, [m4_translit(m4_include(.version), [
AC_INIT(neon, ne_version, [neon@lists.manyfish.co.uk])
-AC_COPYRIGHT([Copyright 2000-2009 Joe Orton and others
+AC_COPYRIGHT([Copyright 2000-2010 Joe Orton and others
This configure script may be copied, distributed and modified under the
terms of the GNU Library General Public license; see src/COPYING.LIB for
more details.])
@@ -162,6 +162,14 @@ if test x${enable_shared}${pic_mode}z = xnodefaultz; then
AC_MSG_NOTICE([Using PIC for static library build])
fi
+if test x${enable_shared} = xno; then
+ # Defining NE_PRIVATE as the empty string would work; using a
+ # non-empty but redundant string 'extern' avoids any possible cpp
+ # confusion with from an empty macro.
+ CPPFLAGS="$CPPFLAGS -DNE_PRIVATE=extern"
+ AC_MSG_NOTICE([Private symbol suppression disabled for static library build])
+fi
+
# Bundled language catalogs
ALL_LINGUAS="cs de fr ja nn pl ru tr zh_CN"
AC_SUBST(ALL_LINGUAS)
diff --git a/src/ne_defs.h b/src/ne_defs.h
index c02be93..e902e3a 100644
--- a/src/ne_defs.h
+++ b/src/ne_defs.h
@@ -1,6 +1,6 @@
/*
Standard definitions for neon headers
- Copyright (C) 2003-2008, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 2003-2008, 2010, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -51,7 +51,9 @@ typedef off_t ne_off_t;
#ifdef __GNUC__
#if __GNUC__ >= 3
+#ifndef NE_PRIVATE
#define NE_PRIVATE __attribute__((visibility ("hidden")))
+#endif
#define ne_attribute_malloc __attribute__((malloc))
#else
#define ne_attribute_malloc