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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
i# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(briquolo, 0.5.7, cedric.bregardis@free.fr)
dnl AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_SRCDIR([src/MenuJeu.h])
dnl AC_CONFIG_HEADERS([config.h])
AM_CONFIG_HEADER([config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(dist-bzip2)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([argz.h fcntl.h langinfo.h libintl.h limits.h locale.h malloc.h stddef.h stdio_ext.h stdlib.h string.h strings.h sys/param.h sys/timeb.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_VOLATILE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify getcwd mempcpy mkdir munmap nl_langinfo pow setlocale sqrt stpcpy strcasecmp strchr strcspn strdup strstr strtoul])
dnl CXXFLAGS="-Wall -O3 -pipe `sdl-config --cflags` -I./"
dnl CXXFLAGS="-Wall -Wextra -Wfloat-equal -Wshadow -Wconversion"
dnl CXXFLAGS="-Wall"
dnl Test de libfreetype
dnl AC_CHECK_PROG(png_config,libfreetype-config,libfreetype-config,[AC_MSG_ERROR([*** Libfreetype-config not found. You need libfreetype.])])
AC_PATH_PROG(freetypeconfig, freetype-config, ,$prefix/bin:$PATH)
if test "x$freetypeconfig" = "x"
then
echo "freetype-config not found"
else
echo "freetype-config found"
CXXFLAGS="$CXXFLAGS `$freetypeconfig --cflags`"
LIBS="$LIBS `$freetypeconfig --libs`"
fi
dnl Test de libpng
dnl AC_CHECK_PROG(png_config,libpng-config,libpng-config,[AC_MSG_ERROR([*** Libpng-config not found. You need libpng.])])
AC_PATH_PROG(pngconfig, libpng-config, ,$prefix/bin:$PATH)
if test "x$pngconfig" = "x"
then
echo "libpng-config not found. We search for libpng manually"
AC_CHECK_LIB(png, png_access_version_number,,[AC_MSG_ERROR([*** You need libpng])], -lm -lz)
LIBS="$LIBS -lpng -lz"
else
CXXFLAGS="$CXXFLAGS `$pngconfig --cppflags` `libpng-config --cflags`"
LIBS="$LIBS `$pngconfig --ldflags` `$pngconfig --libs`"
fi
dnl Ncessaire pour le test SDL
dnl AC_CANONICAL_HOST
dnl Test de SDL
SDL_VERSION=1.2.4
AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** You need libSDL >= $SDL_VERSION ]))
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl On teste gettext
AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([0.14.1])
AM_ICONV
LIBS="$LIBS $INTLLIBS $LIBICONV"
dnl On dfinit la variable du rpertoire des locales
if test "x$prefix" = "xNONE"
then
LOCALEDIR=$ac_default_prefix/share/locale
else
LOCALEDIR=$prefix/share/locale
fi
AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Rpertoire des locale])
#check host OS
AC_MSG_CHECKING(host OS)
case "${host}" in
*-*-cygwin* | *-*-mingw32* )
LIB_GL=opengl32
LIB_GLU=glu32
PROGRAM_EXT=".exe"
AC_MSG_RESULT(Host OS is Win32)
LIBS="-l$LIB_GL -l$LIB_GLU $LIBS"
LIBS="-lSDL_mixer $LIBS"
LIBS="-lSDL_ttf $LIBS"
LIBS="$LIBS -lwinmm"
;;
*)
AC_PATH_X
if test "x$x_includes" != "x"
then
CPPFLAGS="$CPPFLAGS -I$x_includes"
fi
if test "x$x_libraries" != "x"
then
LIBS="$LIBS -L$x_libraries"
fi
LIB_GL=GL
LIB_GLU=GLU
PROGRAM_EXT=
AC_MSG_RESULT(Host OS is not Win32)
dnl Test de OpenGL
AC_CHECK_LIB($LIB_GL,glVertex3f,,[AC_MSG_ERROR([*** You need OpenGL])])
dnl Test de glu
AC_CHECK_LIB($LIB_GLU,gluLookAt,,[AC_MSG_ERROR([*** You need Glu])], -lm )
dnl Test de SDL-mixer
AC_CHECK_LIB(SDL_mixer,Mix_OpenAudio,,[AC_MSG_ERROR([SDL-mixer])])
LIBS="$LIBS -lSDL_mixer"
dnl Test de SDL_ttf
AC_CHECK_LIB(SDL_ttf,TTF_Init,,[AC_MSG_ERROR([SDL_ttf])])
LIBS="$LIBS -lSDL_ttf"
esac
dnl Debugging
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging [default=no]], mogl_debug=1, mogl_debug=0 )
if test $mogl_debug -eq 1
then
CXXFLAGS="-Wall -g $CXXFLAGS"
else
CXXFLAGS="-Wall $CXXFLAGS"
fi
CPPFLAGS="-DDATADIR_BRIQUOLO=\\\"$datadir/$PACKAGE\\\" $CPPFLAGS"
AC_CONFIG_FILES([ po/Makefile.in m4/Makefile intl/Makefile
Makefile
desktop/Makefile
data/Makefile
data/data/Makefile
data/tableau/Makefile
data/tableau/old/Makefile
data/tableau/new/Makefile
src/MOGL/Makefile
src/Makefile])
AC_OUTPUT
|