diff options
author | Thomas White <taw27@cam.ac.uk> | 2008-10-14 23:20:29 +0100 |
---|---|---|
committer | Thomas White <taw27@cam.ac.uk> | 2008-10-14 23:20:29 +0100 |
commit | ec010b19cac1d5aea5393a687a91431f2e541101 (patch) | |
tree | 4aa0b19fa763dd0dd0f425a90d1c2ecb99140fe9 /configure.ac |
Initial importopenmoocow-0.1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..a32c9c1 --- /dev/null +++ b/configure.ac @@ -0,0 +1,47 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(openmoocow, 0.1.0, taw27@srcf.ucam.org) +VERSION=AC_PACKAGE_VERSION + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(openmoocow, "$VERSION") + +AC_PROG_CC +AC_PROG_AWK +AC_PROG_INSTALL +AC_PROG_LN_S + +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) +AC_C_CONST +AC_FUNC_MALLOC +AC_TYPE_SIGNAL +AC_CHECK_FUNCS([strdup]) + +if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +fi +if test "$PKG_CONFIG" = "no" ; then + echo "*** pkg-config not found. Do you have pkg-config installed?" +fi + +AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([ +*** GTK+ 2.6.0 or above is required by OpenMooCow but no GTK+2 was found. +*** Please make sure you have the GTK+ development files installed. The +*** latest version of GTK+ is always available at http://www.gtk.org/.])) + +AC_MSG_CHECKING([SDL]) +if $PKG_CONFIG sdl ; then + LIBSDL_CFLAGS=`$PKG_CONFIG --cflags sdl` + LIBSDL_LIBS=`$PKG_CONFIG --libs sdl` + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([*** SDL not found. Do you have 'libsdl-dev' or similar installed?]) +fi + +CFLAGS="$CFLAGS $GTK_CFLAGS $LIBSDL_CFLAGS" +LIBS="$LIBS $GTK_LIBS $LIBSDL_LIBS" + +AC_OUTPUT(Makefile src/Makefile data/Makefile) + |