version 1.1, 2010/01/26 15:22:44
|
version 1.8, 2010/03/01 14:48:13
|
Line 1
|
Line 1
|
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
AC_INIT([rpl],[4.0.9]) |
AC_INIT([rpl],[4.0.11]) |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AC_CANONICAL_TARGET |
AM_INIT_AUTOMAKE |
AM_INIT_AUTOMAKE |
Line 7 AC_SUBST(target_cpu)
|
Line 7 AC_SUBST(target_cpu)
|
AC_CONFIG_HEADERS([rplconfig.h]) |
AC_CONFIG_HEADERS([rplconfig.h]) |
|
|
dnl Libraries |
dnl Libraries |
NCURSES=ncurses-5.7-20100102 |
NCURSES=ncurses-5.7-20100206 |
READLINE=readline-6.1 |
READLINE=readline-6.1 |
UNITS=units-1.87 |
UNITS=units-1.87 |
GSL=gsl-1.13 |
GSL=gsl-1.13 |
Line 116 fi],[
|
Line 116 fi],[
|
AC_ARG_ENABLE(final-encoding, |
AC_ARG_ENABLE(final-encoding, |
[ --enable-final-encoding force final encoding [[default=guessed]]], [ |
[ --enable-final-encoding force final encoding [[default=guessed]]], [ |
if test "$enableval" = "no"; then |
if test "$enableval" = "no"; then |
FINAL_ENCODING="\$(shell locale charmap)" |
FINAL_ENCODING="\$(shell locale charmap | \ |
|
awk '/=/ { print \$\$3;} !/=/ { print \$\$1;}')" |
else |
else |
FINAL_ENCODING="$enable_final_encoding" |
FINAL_ENCODING="$enable_final_encoding" |
fi], |
fi], |
FINAL_ENCODING="\$(shell locale charmap)") |
FINAL_ENCODING="\$(shell locale charmap | \ |
|
awk '/=/ { print \$\$3;} !/=/ { print \$\$1;}')") |
|
|
AC_ARG_ENABLE(tex, |
AC_ARG_ENABLE(tex, |
[ --enable-tex provide the TeX support [[default=guessed]]], [ |
[ --enable-tex provide the TeX support [[default=guessed]]], [ |
Line 201 AC_ARG_ENABLE(debug,
|
Line 203 AC_ARG_ENABLE(debug,
|
[ --enable-debug enable debug code [[default=no]]], [ |
[ --enable-debug enable debug code [[default=no]]], [ |
if test "$enableval" = "no"; then |
if test "$enableval" = "no"; then |
DEBUG="" |
DEBUG="" |
DEBUG_CODE="-UDEBUG" |
|
else |
else |
AC_CHECK_LIB(efence, DEBUG="-lefence", DEBUG="") |
DEBUG="-DDEBUG_MEMOIRE" |
DEBUG_CODE="-DDEBUG" |
fi], [DEBUG=""]) |
if test "$DEBUG" = ""; then |
|
AC_MSG_WARN([Can not find efence! You may install it. |
|
Debug flag is disabled. |
|
]) |
|
fi |
|
fi], [ |
|
DEBUG_CODE="-UDEBUG" |
|
DEBUG=""]) |
|
|
|
AC_ARG_ENABLE(profile, |
AC_ARG_ENABLE(profile, |
[ --enable-profile enable profile code [[default=no]]], [ |
[ --enable-profile enable profile code [[default=no]]], [ |
Line 222 else
|
Line 215 else
|
PROFILAGE="-pg" |
PROFILAGE="-pg" |
fi], [PROFILAGE=""]) |
fi], [PROFILAGE=""]) |
|
|
AC_SUBST(DEBUG_CODE) |
|
AC_SUBST(PROFILAGE) |
AC_SUBST(PROFILAGE) |
|
|
if test ! -d tools; then |
if test ! -d tools; then |
Line 250 if test ! -d "$srcdir"/tools/$GPP; then
|
Line 242 if test ! -d "$srcdir"/tools/$GPP; then
|
fi |
fi |
if test ! -d "$srcdir"/tools/$FILE; then |
if test ! -d "$srcdir"/tools/$FILE; then |
gunzip -c "$srcdir"/tools/$FILE.tar.gz | \ |
gunzip -c "$srcdir"/tools/$FILE.tar.gz | \ |
(cd "$srcdir/tools" && tar -xf -) |
(cd "$srcdir/tools" && tar -xf - ) |
|
(cd "$srcdir/tools"/$FILE && gunzip -c ../$FILE.diff.gz | patch -p1) |
|
sed 's/libmagic/librplfile/g' "$srcdir"/tools/$FILE/src/Makefile.am > \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am2 |
|
sed 's/^bin_PROGRAMS = file/bin_PROGRAMS = rplfile/g' \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am2 | \ |
|
sed 's/^file_/rplfile_/g' > \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am |
|
\rm -f "$srcdir"/tools/$FILE/src/Makefile.am2 |
|
sed 's/file$/rplfile/g' "$srcdir"/tools/$FILE/magic/Makefile.am > \ |
|
"$srcdir"/tools/$FILE/magic/Makefile.am2 |
|
\mv -f "$srcdir"/tools/$FILE/magic/Makefile.am2 \ |
|
"$srcdir"/tools/$FILE/magic/Makefile.am |
|
(cd "$srcdir"/tools/$FILE && libtoolize --copy --force \ |
|
&& aclocal && automake -af && autoconf); |
fi |
fi |
if test ! -d "$srcdir"/tools/$ICONV; then |
if test ! -d "$srcdir"/tools/$ICONV; then |
gunzip -c "$srcdir"/tools/$ICONV.tar.gz | \ |
gunzip -c "$srcdir"/tools/$ICONV.tar.gz | \ |
(cd "$srcdir/tools" && tar -xf -) |
(cd "$srcdir/tools" && tar -xf -) |
fi |
fi |
|
|
dnl Apply patches |
|
AC_CHECK_FUNC(asprintf, ASPRINTF=found, ASPRINTF=not_found) |
|
|
|
sed 's/libmagic/librplfile/g' "$srcdir"/tools/$FILE/src/Makefile.am > \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am2 |
|
sed 's/^bin_PROGRAMS = file/bin_PROGRAMS = rplfile/g' \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am2 | \ |
|
sed 's/^file_/rplfile_/g' > \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am |
|
\rm -f "$srcdir"/tools/$FILE/src/Makefile.am2 |
|
if test $(grep rplfile "$srcdir"/tools/$FILE/magic/Makefile.am | wc -l) \ |
|
-eq 0; then \ |
|
sed 's/file$/rplfile/g' "$srcdir"/tools/$FILE/magic/Makefile.am > \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am2; \ |
|
\mv -f "$srcdir"/tools/$FILE/src/Makefile.am2 \ |
|
"$srcdir"/tools/$FILE/magic/Makefile.am; \ |
|
fi |
|
|
|
AC_CHECK_PROG(LIBTOOLIZE, libtoolize, yes, no) |
AC_CHECK_PROG(LIBTOOLIZE, libtoolize, yes, no) |
if test "$LIBTOOLIZE" = "no"; then |
if test "$LIBTOOLIZE" = "no"; then |
AC_MSG_ERROR([Cannot find libtoolize! You have to install it.]) |
AC_MSG_ERROR([Cannot find libtoolize! You have to install it.]) |
Line 295 if test "$AUTOCONF" = "no"; then
|
Line 283 if test "$AUTOCONF" = "no"; then
|
AC_MSG_ERROR([Cannot find autoconf! You have to install it.]) |
AC_MSG_ERROR([Cannot find autoconf! You have to install it.]) |
fi |
fi |
|
|
if test "$ASPRINTF" = not_found; then |
|
if test -z "$(grep asprintf.c \ |
|
"$srcdir"/tools/$FILE/src/Makefile.am)"; then |
|
dnl Nécessaire jusqu'à file-4.25 |
|
dnl echo "librplfile_la_SOURCES += ../../patches/asprintf.c" >> \ |
|
dnl "$srcdir"/tools/$FILE/src/Makefile.am |
|
echo Not needed anymore |
|
fi |
|
fi |
|
|
|
(cd "$srcdir"/tools/$FILE && libtoolize --copy --force \ |
|
&& aclocal && automake -af && autoconf); |
|
|
|
dnl Default installation directory |
dnl Default installation directory |
AC_PREFIX_DEFAULT(/usr/local) |
AC_PREFIX_DEFAULT(/usr/local) |
|
|