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
|
dnl -----------------------------------------------------------------------
dnl Stage Autoconf script
dnl $Id: configure.ac,v 1.12.2.2 2006/09/25 17:49:49 gerkey Exp $
dnl -----------------------------------------------------------------------
dnl AC_INIT( package, version )
AC_INIT(stage,2.0.3)
AC_CONFIG_SRCDIR(src/stage.c)
dnl determine system type. this is used in a couple of places to infer the
dnl types of arguments to some networking library functions. if/when we
dnl upgrade to newer Autotools, this can probably go away.
AC_CANONICAL_SYSTEM
dnl Initialize automake, requiring version 1.9 or better,
dnl using modern tar format and generate bzip tarballs
AM_INIT_AUTOMAKE([tar-ustar dist-bzip2 1.9])
dnl Need AC_PROG_MAKE_SET for recursive building
AC_PROG_MAKE_SET
dnl Generate a configuration header called <config.h> and put all the C
dnl preprocessor defines in there
AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
dnl tell libtool to enable dynamic-loadable libraries
AC_LIBTOOL_DLOPEN
dnl enable libtool for building shared libraries in a platform-independent way
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl Checks for header files of required libraries
AC_CHECK_HEADERS(stdint.h strings.h)
dnl build mplementations of these in libreplace.a if these are missing
AC_REPLACE_FUNCS(dirname scandir basename)
dnl Do we have pkg-config?
AC_CHECK_PROG(have_pkg_config,pkg-config,yes,no)
if test "x$have_pkg_config" = "xno"; then
AC_MSG_ERROR([pkg-config is required to build Stage. Install pkg-config, then run configure again.])
fi
dnl add prefix to the pkg-config path in case things were installed there
dnl and the user didn't add it manually
export PKG_CONFIG_PATH=$prefix/lib/pkgconfig:$PKG_CONFIG_PATH
dnl check for GTK stuff - we need it for the GUI
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4, ,
AC_MSG_ERROR([A suitable GTK+ was not found. GTK+-2.4 or later is required. ])
)
PKG_CHECK_MODULES(GLIB, [glib-2.0], ,
AC_MSG_ERROR([A suitable GLIB was not found. Glib 2.0 is required. ])
)
dnl if GNOMECANVAS is requested and available, we use that for graphics
AC_ARG_ENABLE(gnomecanvas,
AC_HELP_STRING([--enable-gnomecanvas],[Use GnomeCanvas if available *EXPERIMENTAL (rtv)*]),
[ if test "x$enableval" = "xyes"; then
AC_MSG_RESULT([GnomeCanvas requested. Looking for libgnomecanvas...])
PKG_CHECK_MODULES(GNOME, libgnomecanvas-2.0 >= 2.0,
AC_DEFINE(INCLUDE_GNOME,1,[building GnomeCanvas components]),
AC_MSG_WARN([no suitable GnomeCanvas library was found. ])
)
AC_MSG_RESULT([GnomeCanvas graphics will be used.])
else
AC_MSG_RESULT([GnomeCanvas graphics disabled by user])
fi ],
)
dnl for libstageplugin, we need Player 2.0 or higher
PKG_CHECK_MODULES( PLAYER, playercore >= 2.0.2,
AC_DEFINE(INCLUDE_PLAYER,1,[building Player plugin]),
AC_MSG_ERROR([Stage 2.0.3 requires Player 2.0.2 to be installed first. Available at http://playerstage.sourceforge.net.])
)
dnl for ptest, we need libplayerc
dnl PKG_CHECK_MODULES( PLAYERC, playerc >= 2.0,
dnl AC_DEFINE(INCLUDE_LIBPLAYERC,1,[building test Player client]),
dnl AC_MSG_WARN([libplayercr was not found. ])
dnl )
dnl where's the X11 color database?
AC_CHECK_FILE([/usr/X11R6/lib/X11/rgb.txt],
CDB="\"/usr/X11R6/lib/X11/rgb.txt\"",
AC_CHECK_FILE([/usr/openwin/lib/X11/rgb.txt],
CDB="\"/usr/openwin/lib/X11/rgb.txt\"",
AC_CHECK_FILE([/etc/X11/rgb.txt],
CDB="\"/etc/X11/rgb.txt\"",
CDB="\"/usr/X11R6/lib/X11/rgb.txt\"")))
AC_ARG_WITH(color, [ --with-color=file Location of X11-style color file],
CDB="\"$with_color\"",)
AC_DEFINE_UNQUOTED(COLOR_DATABASE,$CDB,[the X11-style color database])
AC_OUTPUT(Makefile
src/Makefile
docsrc/Makefile
worlds/Makefile
worlds/bitmaps/Makefile
replace/Makefile
src/referees/Makefile
stage.pc )
dnl should use AC_MSG_NOTICE(), but that's apparently not defined in
dnl autoconf 2.13.
AC_MSG_RESULT([])
AC_MSG_RESULT([*************************************************************])
AC_MSG_RESULT([])
AC_MSG_RESULT([Stage will be built for a $host system, with the following tools and options:])
AC_MSG_RESULT([ C compiler: $CC $CFLAGS])
AC_MSG_RESULT([ C++ compiler: $CXX $CXXFLAGS])
AC_MSG_RESULT([])
AC_MSG_RESULT([Stage will be installed in:])
AC_MSG_RESULT([ $prefix/])
AC_MSG_RESULT([])
AC_MSG_RESULT([To see the configuration options, do:])
AC_MSG_RESULT([ ./configure --help])
AC_MSG_RESULT([])
AC_MSG_RESULT([When you're satisfied with the configuration, type 'make install'. ])
AC_MSG_RESULT([])
|