1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(GDash, 20130317unstable, [http://code.google.com/p/gdash/])
4 AC_CONFIG_SRCDIR([src/gtkmain.cpp])
6 AM_CONFIG_HEADER(config.h)
17 AC_CHECK_FUNCS([setlocale])
19 AM_GNU_GETTEXT([external])
20 AM_GNU_GETTEXT_VERSION([0.17])
24 AC_CHECK_HEADERS([stdint.h stdlib.h])
25 AC_CHECK_FUNCS([strchr strrchr])
31 [AS_HELP_STRING([--without-gtk], [disables using gtk+])],
35 [AS_HELP_STRING([--without-sdl], [disables using sdl])],
39 if test x"$with_gtk" = "xno" -a x"$with_sdl" = "xno"; then
40 AC_MSG_ERROR(You cannot disable both SDL and GTK. Rerun with --with-gtk or --with-sdl.)
43 AM_PATH_GLIB_2_0(2.12.0, :, AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.), gthread)
45 dnl this conditional must ALWAYS be run, not inside the if below.
46 AM_CONDITIONAL(GTK, test x"$with_gtk" = "xyes")
47 if test x"$with_gtk" = "xyes" ; then
48 AC_DEFINE(HAVE_GTK,,[Use GTK.])
49 AM_PATH_GTK_2_0(2.12.0, :, AC_MSG_ERROR(Test for GTK+ failed. See the file 'INSTALL' for help.))
52 AM_CONDITIONAL(SDL, test x"$with_sdl" = "xyes")
53 if test x"$with_sdl" = "xyes" ; then
54 AC_DEFINE(HAVE_SDL,,[Use SDL.])
55 AM_PATH_SDL(1.2.0, :, AC_MSG_ERROR(Test for SDL failed. See the file 'INSTALL' for help.))
60 PKG_CHECK_MODULES(LIBPNG, [libpng], AC_DEFINE(HAVE_LIBPNG, 1, Define if you have libpng), [])