1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
dnl ##
dnl ## configure.in -- GNU autoconf configuration spec
dnl ## Copyright (c) Ralf S. Engelschall, <rse@engelschall.com>
dnl ##
AC_PREREQ(2.13)dnl Autoconf 2.13 is required because autoheader 2.12
dnl does not include *alloc variables in config.h.in
AC_REVISION($Revision: 1.9 $)
shtool=./shtool
GFONT_VERSION="`$shtool version -l c -d long gfont_version.c`"
AC_SUBST(GFONT_VERSION)
$shtool echo -e "%BConfiguring for gFont $GFONT_VERSION %b"
AC_INIT(README)
AC_CONFIG_HEADER(config.h)dnl
AC_PREFIX_DEFAULT(/usr/local)
dnl ## fix installation paths
test "x$prefix" = xNONE && prefix=$ac_default_prefix
eval "dir=$prefix"
case $dir in
*gfont* ) libsubdir= ;;
* ) libsubdir="/gfont" ;;
esac
AC_SUBST(libsubdir)
libdir=$dir/lib
tmpdir=${TMPDIR-/tmp}
AC_SUBST(tmpdir)
AC_CONFIGURE_PART(CHECK: C Compiler and Perl Interpreter)
AC_PROG_CC
AC_PROG_CPP
AC_C_BIGENDIAN
AC_MSG_CHECKING([for Perl language])
TMPFILE=$tmpdir/ac.$$
rm -f $TMPFILE
touch $TMPFILE
c=0
for dir in `echo $PATH | sed -e 's/:/ /g'` $tmpdir; do
for perl in perl5 perl miniperl; do
if test -f "$dir/$perl"; then
if test -x "$dir/$perl"; then
perl="$dir/$perl"
version=`$perl -v | grep version | sed -e 1q | sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'`
versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`"
versionnum=`expr $versionnum - $c`
echo "$versionnum $version $perl" >>$TMPFILE
fi
fi
done
c=`expr $c + 1`
done
perlvers="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f2`"
perlprog="`cat $TMPFILE | sort -u | tail -1 | cut '-d ' -f3`"
rm -f $TMPFILE
PATH_PERL=$perlprog
AC_MSG_RESULT([$perlprog v$perlvers])
AC_SUBST(PATH_PERL)
AC_SUBST(perlprog)
AC_SUBST(perlvers)
if test -f $PATH_PERL; then
:
else
AC_ERROR([required program ``perl'' not found])
fi
AC_CONFIGURE_PART(CHECK: Build Options)
AC_MSG_CHECKING(for compilation debug mode)
AC_ARG_ENABLE(debug,dnl
[ --enable-debug to enable the debugging options for compilation],
x="enabled"
CFLAGS="-Wall -g -ggdb3"
LDFLAGS="-g -ggdb3"
debug=on
,
x=disabled
CFLAGS="-O2"
LDFLAGS=""
debug=off
)dnl
AC_SUBST(debug)
AC_MSG_RESULT([$x])
AC_MSG_CHECKING(for temporary GdF directory)
AC_ARG_WITH(tmpgdfdir,dnl
[ --with-tmpgdfdir set the temporary dir for on-the-fly GdF generation],
tmpgdfdir="$with_tmpgdfdir"
,
if test ".$prefix" = ".NONE"; then
tmpgdfdir="${ac_default_prefix}/lib$libsubdir/gdf"
else
tmpgdfdir="$libdir$libsubdir/gdf"
fi
)dnl
AC_SUBST(tmpgdfdir)
AC_MSG_RESULT([$tmpgdfdir])
AC_CONFIGURE_PART(CHECK: Build Tools)
AC_PROG_RANLIB
AC_PROGRAM_CHECK(AR, ar, ar,)
if test -z "$AR"; then
AC_ERROR([required program ``ar'' not found])
fi
AC_SET_MAKE
AC_CONST
AC_STDC_HEADERS
jm_FUNC_MALLOC
jm_FUNC_REALLOC
AC_FUNC_VPRINTF
AC_HAVE_HEADERS(stdio.h stddef.h string.h strings.h stdlib.h)
AC_CHECK_FUNCS(strchr strerror)
AC_CONFIGURE_PART(RESULT: Sourcefile Substitution)
AC_OUTPUT(dnl
Makefile dnl
lib/Makefile dnl
config_sc.h dnl
,dnl
)dnl
echo ""
echo "Now please type 'make' to compile. Good luck."
echo ""
dnl ##EOF##
|