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 132 133 134 135 136
|
dnl If you know automake and friends better then me:
dnl Please send any helpful comments to tille@debian.org
dnl Initialize autoconf by any header file of the source
AC_INIT(gtk/gtkimreg.h)
PACKAGE=gtkimreg
IMREG_MAJOR=0
IMREG_MINOR=1
IMREG_MICRO=3
VERSION=$IMREG_MAJOR.$IMREG_MINOR.$IMREG_MICRO.1
# VERSION=$IMREG_MAJOR.$IMREG_MINOR
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_CONFIG_HEADER(config.h)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
LT_CURRENT=$IMREG_MAJOR
LT_REVISION=$IMREG_MICRO
LT_AGE=0
AC_SUBST(LT_REVISION)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_AGE)
dnl Use libtool to get shared libraries
AM_PROG_LIBTOOL
dnl Look for a suitable C-compiler
AC_PROG_CC
dnl dito install
AC_PROG_INSTALL
dnl dito ranlib
AC_PROG_LIBTOOL
dnl i18n
ALL_LINGUAS="de"
AM_GLIB_GNU_GETTEXT
dnl AM_GTK_GNU_GETTEXT
dnl AM_GNU_GETTEXT
AC_CHECK_FUNC(gettext, , AC_CHECK_LIB(intl, gettext))
dnl AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
dnl this is the directory where the *.{mo,gmo} files are installed
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gtklocaledir)
dnl Where is gtk-config?
dnl
AC_MSG_CHECKING(for gtk-config)
GTK_CONFIG_DIR=`which gtk-config | sed "s/\/gtk-config//"`
AC_ARG_WITH(gtk-config,
[ --with-gtk-config[=DIR] Directory holding the gtk-config script],
[
if test "$withval" != "yes"; then
if test -f $withval/gtk-config; then
GTK_CONFIG_DIR=$withval
else
AC_MSG_ERROR(Could not find gtk_config in $withval)
fi
fi
])
GTK_CONFIG=$GTK_CONFIG_DIR/gtk-config
if test -f $GTK_CONFIG; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR(Invalid path to gtk-config - unable to find it under $GTK_CONFIG/gtk-config)
fi
GTK_LIBS=`$GTK_CONFIG --libs`
GTK_INCLUDE=`$GTK_CONFIG --cflags`
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_INCLUDE)
dnl Where is imlib-config?
dnl
AC_MSG_CHECKING(for imlib-config)
IMLIB_CONFIG_DIR=`which imlib-config | sed "s/\/imlib-config//"`
AC_ARG_WITH(imlib-config,
[ --with-imlib-config[=DIR] Directory holding the imlib-config script],
[
if test "$withval" != "yes"; then
if test -f $withval/imlib-config; then
IMLIB_CONFIG_DIR=$withval
else
AC_MSG_ERROR(Could not find imlib_config in $withval)
fi
fi
])
IMLIB_CONFIG=$IMLIB_CONFIG_DIR/imlib-config
if test -f $IMLIB_CONFIG; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR(Invalid path to imlib-config - unable to find it under $IMLIB_CONFIG/imlib-config)
fi
IMLIB_LIBS=`$IMLIB_CONFIG --libs-gdk`
IMLIB_INCLUDE=`$IMLIB_CONFIG --cflags-gdk`
AC_SUBST(IMLIB_LIBS)
AC_SUBST(IMLIB_INCLUDE)
dnl--------------------------------------------------------------
dnl Do we have gtk+-1.2 at least?
dnl
AC_MSG_CHECKING(for gtk version >= 1.2)
glib_config_major_version=`$GTK_CONFIG --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GTK_CONFIG --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GTK_CONFIG --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "$glib_config_major_version" -lt "1" -o\
"$glib_config_minor_version" -lt "2" -o \
"$glib_config_micro_version" -lt "0"; \
then
AC_MSG_RESULT(no)
AC_MSG_ERROR(gtk version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version is needed at least. You may get the newest version at ftp://ftp.gtk.org/pub/gtk)
fi
AC_MSG_RESULT(yes)
AC_OUTPUT(Makefile po/Makefile.in gtk/Makefile man/Makefile test/Makefile)
|