AC_INIT(Fnlib/Fnlib.h)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(fnlib, 0.5)

AM_MAINTAINER_MODE
AM_PROG_LIBTOOL
AC_PROG_CC

dnl AM_PATH_GTK(1.0.1,
dnl    GDK_FNLIB="gdk_fnlib",
dnl    GDK_IFNLIB=""
dnl    AC_MSG_WARN([*** gdk_fnlib will not be built ***]))

AM_PATH_IMLIB(1.8.0, ,
        AC_MSG_ERROR([*** IMLIB 1.8 not installed - please install first ***]))
CFLAGS="$CFLAGS $IMLIB_CFLAGS"

AC_SUBST(GDK_FNLIB)

AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF

AC_CHECK_HEADER(string.h)
AC_CHECK_HEADER(strings.h)

edata=`ls -1 $srcdir/fonts/fonts/e/17 | egrep -v '(Makefile|CVS)'`
rockdata=`ls -1 $srcdir/fonts/fonts/rock/90 | egrep -v '(Makefile|CVS)'`
shinydata=`ls -1 $srcdir/fonts/fonts/shinymetal/45 | egrep -v '(Makefile|CVS)'`

edata=`echo $edata`
rockdata=`echo $rockdata`
shinydata=`echo $shinydata`

AC_SUBST(edata)
AC_SUBST(rockdata)
AC_SUBST(shinydata)

dnl fnrcdir=${sysconfdir}
dnl echo fnrcdir is $fnrcdir
dnl AC_SUBST(fnrcdir)

fontdatadir=$datadir/fnlib_fonts
AC_SUBST(fontdatadir)

dnl# Since gdk_fnlib isn't live, let's not get the warnings -- mej
dnl# AC_OUTPUT(gdk_fnlib/Makefile Fnlib/Makefile fonts/Makefile config/Makefile config/fnrc doc/Makefile Makefile)
AC_OUTPUT(
fnlib.spec
Fnlib/Makefile
fonts/Makefile
fonts/fonts/Makefile
fonts/fonts/e/Makefile
fonts/fonts/e/17/Makefile
fonts/fonts/rock/Makefile
fonts/fonts/rock/90/Makefile
fonts/fonts/shinymetal/Makefile
fonts/fonts/shinymetal/45/Makefile
doc/Makefile
config/Makefile
Makefile)
