112
116
# renamed to gnashconfig,h to be unique. As the files libtoolize copies insist
113
117
# on using config.h, we just edit the name, rather than adding a fixed copy to
115
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
116
if test -z "$NO_LIBTOOLIZE" ; then
117
echo "Running libtoolize --force --ltdl --copy ..."
118
if ${LIBTOOLIZE:-libtoolize} --force --ltdl --copy; then
119
mv libltdl/ltdl.c libltdl/ltdl.c.orig
120
sed -e 's/include <config.h>/include <gnashconfig.h>/' libltdl/ltdl.c.orig > libltdl/ltdl.c
121
#rm libltdl/ltdl.c.orig
122
chmod a+w libltdl/config-h.in # Darwin needs this
125
echo "**Error**: libtoolize failed, do you have libtool and libltdl3-dev packages installed?"
120
# This gets more interesting with libtool 2.x, which heavily changed how everything
121
# worked. Where libtool 1.5 installed only a header and had a single source file,
122
# libtool 2.x has an entire sub directory tree of headers and source files.
123
# So for libtool 1.5.x, we do everything the way this has always worked for Gnash.
124
# For libtool 2.x, we install in a subdirectory of libbase, because we have to
125
# hack the build directory, and everything configures tottally differernt than 1.5.x
126
# used to. For more fun, libtoolize has different command line arguments, but one thing
127
# that got fixed is for libtool 2.x there is an #define for the config file name, but
128
# for libtool 1.5 it expects config.h always, so we change this to gnashconfig.h.
129
ltdlver=`${LIBTOOLIZE:-libtoolize} --version | head -1 | cut -d ' ' -f 4`
130
ltdlmajor=`echo $ltdlver | cut -d '.' -f 1`
131
if test -z "$NO_LIBTOOLIZE" ; then
133
libtoolflags="--force --copy --ltdl"
134
if test $ltdlmajor -eq 2; then
135
libtoolflags="${libtoolflags} ${ltbasedir} --quiet --recursive"
137
echo "Running libtoolize $ltdlver ${libtoolflags} ..."
138
if ${LIBTOOLIZE:-libtoolize} ${libtoolflags}; then
139
# libtool insists on including config.h, but we use gnashconfig.h
140
# to avoid any problems, so we have to change this include
141
# so they all reference the right config header file.
142
if test -d libltdl; then
143
for i in libltdl/*.c; do
144
# echo "Fixing $i..."
146
sed -e 's/include <config.h>/include <gnashconfig.h>/' $i.orig > $i
149
# mv libltdl/ltdl.c libltdl/ltdl.c.orig
150
# sed -e 's/include <config.h>/include <gnashconfig.h>/' libltdl/ltdl.c.orig > libltdl/ltdl.c
151
# for libtool 1.x, we don't build in libltdl, it's built in libbase instead. autoconf doesn't like
152
# conditional output files, so we nuke the original libltdl/Makefile.am and replace it with a zero
153
# sized one to keep autoconf happy.
154
if test $ltdlmajor -eq 1; then
155
mv libltdl/Makefile.am Makefile.am.orig
156
touch libltdl/Makefile.am
158
if test -f ${ltbasedir}/config-h.in; then
159
chmod a+w ${ltbasedir}/config-h.in # Darwin needs this
163
echo "**Error**: libtoolize failed, do you have libtool and libltdl3-dev packages installed?"
131
168
#for coin in `find $srcdir -name CVS -prune -o -name configure.ac -print`