diff options
author | Vincent Bernat <bernat@luffy.cx> | 2013-04-07 00:12:32 +0200 |
---|---|---|
committer | Vincent Bernat <bernat@luffy.cx> | 2013-04-07 00:12:32 +0200 |
commit | 90087507e60ba28ca33dbe7ac95df5d9af37e291 (patch) | |
tree | 10fe1d75d67767300fd45812031a7452e121506a /bootstrap.sh | |
parent | 91c414195087b73583f874c234b8905b484f0e20 (diff) | |
download | libgd-90087507e60ba28ca33dbe7ac95df5d9af37e291.tar.gz |
Fix build with autotools.
`configure.ac` and `bootstrap.sh` are moved in the top directory.
`bootstrap.sh` is completed to execute `libtoolize`. The list of files
to clean is reduced. Other files can be cleaned with `make distclean`.
`src/Makefile.am` is fixed for missing `gd_nnquant.c` dependency.
`ACX_PTHREAD` macro is moved to a `m4` directory to make `configure.ac`
easier to read.
--HG--
branch : fix/autotools
rename : src/bootstrap.sh => bootstrap.sh
rename : src/configure.ac => configure.ac
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..5d64df2 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,37 @@ +#!/bin/sh -- +# $Id$ +# Small shell script to build gd from CVS + +# allow importing from the environment, e.g. +# "AUTOCONF=autoconf259 ... ./bootstrap.sh" +ACLOCAL=${ACLOCAL:-aclocal} +AUTOCONF=${AUTOCONF:-autoconf} +AUTOHEADER=${AUTOHEADER:-autoheader} +AUTOMAKE=${AUTOMAKE:-automake} +LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} + +# might handle this differently +AUTOMAKE_FLAGS="--add-missing --copy" + +# +CLEANFILES="Makefile.in aclocal.m4 autom4te.cache configure libtool config/Makefile.in \ +tests/Makefile.in src/Makefile.in" + +# +rm -rf ${CLEANFILES} + +# +if ${ACLOCAL} -I m4 \ + && ${LIBTOOLIZE} --automake --copy --force \ + && ${ACLOCAL} -I m4 \ + && ${AUTOHEADER} \ + && ${AUTOMAKE} ${AUTOMAKE_FLAGS} \ + && ${AUTOCONF} --force && [ -f configure ] +then + echo Now run configure and make +else + echo Failed + exit 1 +fi + +exit 0 |