diff -ur liboil-0.3.16/liboil/Makefile.am liboil/liboil/Makefile.am
--- liboil-0.3.16/liboil/Makefile.am	2009-02-26 19:35:39.000000000 +0000
+++ liboil/liboil/Makefile.am	2009-04-10 12:52:54.000000000 +0100
@@ -207,25 +207,38 @@
 build_trampolines_LDADD = $(LIBOIL_LIBS)
 
 liboilarray.c: liboiltmp1.la Makefile
+	../libtool --config > .libs/libtoolcfg
 	echo '/* This file is autogenerated.  Do not edit */' >liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo '#include <liboil/liboilfunction.h>' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
-	grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ DATA$$//' -e 's/ .*//' -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_class_ \
+	 | sed -e 's/.*/extern OilFunctionClass &;/' \
+	 >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo 'OilFunctionClass *_oil_function_class_array[] = {' >>liboilarray.c.tmp
-	grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/  \&&,/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_class_ \
+	 | sed -e 's/.*/  \&&,/' \
+	 >>liboilarray.c.tmp
 	echo '  NULL' >>liboilarray.c.tmp
 	echo '};' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
-	grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_impl_ \
+	 | sed -e 's/.*/extern OilFunctionImpl &;/' \
+	 >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo 'OilFunctionImpl *_oil_function_impl_array[] = {' >>liboilarray.c.tmp
-	grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/  \&&,/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_impl_ \
+	 | sed -e 's/.*/  \&&,/' \
+	 >>liboilarray.c.tmp
 	echo '  NULL' >>liboilarray.c.tmp
 	echo '};' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
diff -ur liboil-0.3.16/liboil/Makefile.in liboil/liboil/Makefile.in
--- liboil-0.3.16/liboil/Makefile.in	2009-03-19 05:41:32.000000000 +0000
+++ liboil/liboil/Makefile.in	2009-04-10 12:51:19.000000000 +0100
@@ -1218,25 +1218,38 @@
 
 
 liboilarray.c: liboiltmp1.la Makefile
+	../libtool --config > .libs/libtoolcfg
 	echo '/* This file is autogenerated.  Do not edit */' >liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo '#include <liboil/liboilfunction.h>' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
-	grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ DATA$$//' -e 's/ .*//' -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_class_ \
+	 | sed -e 's/.*/extern OilFunctionClass &;/' \
+	 >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo 'OilFunctionClass *_oil_function_class_array[] = {' >>liboilarray.c.tmp
-	grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/  \&&,/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_class_ \
+	 | sed -e 's/.*/  \&&,/' \
+	 >>liboilarray.c.tmp
 	echo '  NULL' >>liboilarray.c.tmp
 	echo '};' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
-	grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_impl_ \
+	 | sed -e 's/.*/extern OilFunctionImpl &;/' \
+	 >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
 	echo 'OilFunctionImpl *_oil_function_impl_array[] = {' >>liboilarray.c.tmp
-	grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
-	  sed -e 's/ .*//' -e 's/.*/  \&&,/' >>liboilarray.c.tmp
+	. .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " \
+	 | sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' \
+	 | grep ^_oil_function_impl_ \
+	 | sed -e 's/.*/  \&&,/' \
+	 >>liboilarray.c.tmp
 	echo '  NULL' >>liboilarray.c.tmp
 	echo '};' >>liboilarray.c.tmp
 	echo >>liboilarray.c.tmp
