1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(GDash, 20130427unstable, [http://code.google.com/p/gdash/])
4 AC_CONFIG_SRCDIR([src/main.cpp])
6 AM_CONFIG_HEADER(config.h)
9 AC_CONFIG_MACRO_DIR([m4])
19 AC_CHECK_FUNCS([setlocale])
21 AM_GNU_GETTEXT([external])
22 AM_GNU_GETTEXT_VERSION([0.17])
26 AC_CHECK_HEADERS([stdint.h stdlib.h])
27 AC_CHECK_FUNCS([strchr strrchr])
32 AM_PATH_GLIB_2_0(2.12.0, :, AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.), gthread)
36 dnl GTK+ or SDL or both?
39 [AS_HELP_STRING([--without-gtk], [disables using gtk+])],
43 [AS_HELP_STRING([--without-sdl], [disables using sdl])],
47 if test x"$with_gtk" = "xno" -a x"$with_sdl" = "xno"; then
48 AC_MSG_ERROR(You cannot disable both SDL and GTK. Rerun with --with-gtk or --with-sdl.)
51 dnl this conditional must ALWAYS be run, not inside the if below.
52 AM_CONDITIONAL(GTK, test x"$with_gtk" = "xyes")
53 if test x"$with_gtk" = "xyes" ; then
54 AC_DEFINE(HAVE_GTK,,[Use GTK.])
55 AM_PATH_GTK_2_0(2.12.0, :, AC_MSG_ERROR(Test for GTK+ failed. See the file 'INSTALL' for help.))
61 AM_CONDITIONAL(SDL, test x"$with_sdl" = "xyes")
62 if test x"$with_sdl" = "xyes" ; then
63 AC_DEFINE(HAVE_SDL,,[Use SDL.])
64 AM_PATH_SDL(1.2.0, :, AC_MSG_ERROR(Test for SDL failed. See the file 'INSTALL' for help.))
65 SDL_LIBS="$SDL_LIBS -lSDL_mixer -lSDL_image"
75 PKG_CHECK_MODULES(LIBPNG, [libpng], AC_DEFINE(HAVE_LIBPNG, 1, Define if you have libpng), [])