summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-12-21 14:00:17 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-12-21 14:00:17 +0000
commit513442f6c073b101a6ba2da924ba9562dfd50adf (patch)
treeb80f195a8634261d3cf47e957217c43e6062da78
parentd96583847854d9bcaa25f5184e07c2983b6e3fa7 (diff)
downloadlasso-513442f6c073b101a6ba2da924ba9562dfd50adf.tar.gz
lasso-513442f6c073b101a6ba2da924ba9562dfd50adf.tar.xz
lasso-513442f6c073b101a6ba2da924ba9562dfd50adf.zip
only exports symbols declared with LASSO_EXPORT (experimental)
-rw-r--r--configure.ac2
-rw-r--r--lasso/.cvsignore1
-rw-r--r--lasso/Makefile.am13
-rw-r--r--lasso/extract_symbols.py12
4 files changed, 21 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 90662b86..bf18fe5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,8 +123,6 @@ AC_PATH_PROGS(PHP_PATH, php)
AC_CHECK_PROG(PHP_CONFIG, php-config, php-config)
AC_CHECK_PROGS(SWIG, swig)
-LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[^_].*"'
-
dnl Make sure we have an ANSI compiler
AM_C_PROTOTYPES
test "z$U" != "z" && AC_MSG_ERROR(Compiler not ANSI compliant)
diff --git a/lasso/.cvsignore b/lasso/.cvsignore
index 6176f5b3..55ffea53 100644
--- a/lasso/.cvsignore
+++ b/lasso/.cvsignore
@@ -9,4 +9,5 @@ version.h
.libs
.deps
types.c
+symbols.Sym
diff --git a/lasso/Makefile.am b/lasso/Makefile.am
index 49871098..6a09388e 100644
--- a/lasso/Makefile.am
+++ b/lasso/Makefile.am
@@ -17,17 +17,20 @@ lasso.rc.lo: $(top_srcdir)/win32/lasso.rc
lib_LTLIBRARIES = liblasso.la
liblassoinclude_HEADERS = export.h lasso.h lasso_config.h
-BUILT_SOURCES = types.c
+BUILT_SOURCES = types.c symbols.sym
liblasso_la_SOURCES = lasso.c
types.c:
python extract_types.py
+symbols.sym:
+ python extract_symbols.py > symbols.sym
+
clean-local:
- -rm types.c
+ -rm types.c symbols.sym
-EXTRA_DIST = extract_types.py
+EXTRA_DIST = extract_types.py extract_symbols.py
if MINGW
liblasso_la_LIBADD = \
@@ -50,7 +53,7 @@ liblasso_la_LIBADD = \
# Just make damn sure the ABI stays the same between
# upgrades.
# Obviously if you don't, fixing the situation up again can be painful.
-liblasso_la_LDFLAGS = -no-undefined -version-info @LASSO_VERSION_INFO@
+liblasso_la_LDFLAGS = -no-undefined -version-info @LASSO_VERSION_INFO@ \
+ -export-symbols symbols.sym
endif
-
diff --git a/lasso/extract_symbols.py b/lasso/extract_symbols.py
new file mode 100644
index 00000000..da8192a0
--- /dev/null
+++ b/lasso/extract_symbols.py
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+
+import glob
+import re
+
+symbols = []
+for header_file in glob.glob('*/*.h') + glob.glob('*.h'):
+ symbols.extend(re.findall('LASSO_EXPORT.*(lasso_[a-zA-Z_]+)', file(header_file).read()))
+
+for s in symbols:
+ print s
+