grim/guifications1

39136f986233
this should kill the crash datallah had...
#
# Most of this configure script was ripped from gaim or the
# gaim-encryption configure script, thanks guys ;)
#
AC_INIT(src/guifications.c)
AC_PREREQ([2.50])
GF_VERSION="`cat ./VERSION`"
AM_INIT_AUTOMAKE([guifications], $GF_VERSION, 'no-define')
AC_DEFINE_UNQUOTED(GF_VERSION, "$GF_VERSION", [Guifications Version])
AC_DEFINE_UNQUOTED(GF_CONFIG_ARGS, "$ac_configure_args", [configure arguments])
#
# Our header
#
AH_TOP([ /* our header */
#ifndef _GF_CONFIG_H
#define _GF_CONFIG_H
])
AH_BOTTOM([
#endif /* _GF_CONFIG_H */
])
#
# Look for the C compiler
#
CFLAGS_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$CFLAGS_save"
#
# Utilities
#
check_for_header() {
file="$1"
bases="$2"
variations=". $3"
result=
for dir in $bases; do
if test -z "$result"; then
for variant in $variations; do
if test -z "$result" -a -f "$dir/$variant/$file"; then
result="$dir/$variant"
fi
done
fi
done
if test -z "$result"; then
AC_MSG_RESULT([not found!])
AC_MSG_ERROR([*** Can not continue, note this must be an absolute path])
fi
}
#
# Find gaim
#
AC_ARG_WITH(gaim,
AC_HELP_STRING([--with-gaim=PATH], [absolute path to gaim source
code]))
AC_MSG_CHECKING([for gaim source code])
gaim_dirs="$with_gaim .. ../gaim ../.. . $prefix /usr/local/src/gaim /usr/local/gaim /usr"
check_for_header gaim.h "$gaim_dirs" "src include"
AC_MSG_RESULT([$result])
CPPFLAGS="-I$result/../ -I$result -I$result/win32 $CPPFLAGS"
AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no)
AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes)
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
fi
if test "x$enable_deprecated" = no; then
DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
fi
AC_SUBST(DEBUG_CFLAGS)
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -g3"
fi
AC_SUBST(CFLAGS)
#
# check for gtk and other dependencies
#
AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([
*** GLib 2.0 is required to build Guifications; please make sure you have the
*** GLib development headers installed. The latest version of GLib is always
*** available at http://www.gtk.org/.]))
AM_PATH_GTK_2_0(2.2.0,,AC_MSG_ERROR([
*** GTK+ 2.2 is required to build Guifications; please make sure you have the
*** GTK+ development headers installed. The latest version of GTK+ is always
*** available at http://www.gtk.org/.]))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GTK_CFLAGS)
#
# Check if plugins are enabled
#
want_plugins=yes
AM_CONDITIONAL(PLUGINS, test "$want_plugins" = "yes")
#
# Setup libtool
#
AM_PROG_LIBTOOL
#
# Finish up
#
AM_CONFIG_HEADER(gf_config.h)
AC_OUTPUT([Makefile
pixmaps/Makefile
src/Makefile
guifications.spec
])
echo;
echo Configuration complete
echo;
echo Using Gaim source from.........: $with_gaim
echo Debugging enabled..............: $enable_debug
echo;
echo Type make to compile
echo Thank you for using Guifications
echo;