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
|
dnl Process this file with autoconf to produce a configure script.
dnl Initialization
AC_INIT([Lincity],[1.13.1],[lincity-users@lists.sourceforge.net],[lincity])
AC_CONFIG_SRCDIR([colour.pal])
AM_INIT_AUTOMAKE
AC_ARG_WITH(gzip, [ --with-gzip use gzip])
AC_ARG_WITH(svga, [ --with-svga use svga library])
dnl Checks for programs.
AC_ISC_POSIX
AC_PROG_CC
AC_AIX
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
dnl Autodetect presence of gzip
if eval "test x$with_gzip = x"; then
AC_CHECK_PROG(with_gzip,gzip,"yes")
fi
if eval "test x$with_gzip = xyes"; then
AC_DEFINE(HAVE_GZIP)
fi
dnl -------------------------------------------------------
dnl GCS: This is idiotic. The only way to expand autoconf's own
dnl variables is to use the script I stole from freeciv???
dnl What if directories other than $prefix and $exec_prefix need
dnl to be expanded?
dnl FC_EXPAND_DIR(DEFAULT_LIBDIR,"${datadir}/lincity")
dnl AC_DEFINE_UNQUOTED(DEFAULT_LIBDIR,"$DEFAULT_LIBDIR")
dnl -------------------------------------------------------
AC_DEFINE_UNQUOTED(DEFAULT_LIBDIR,"/usr/share/lincity")
dnl -------------------------------------------------------
dnl GCS Jan 19, 2003
dnl New autoheader stuff
dnl -------------------------------------------------------
AH_TEMPLATE([DEFAULT_LIBDIR],[The default value of LIBDIR.])
AH_TEMPLATE([HAVE_GZIP],[Define if the system has gzip.])
dnl Checks for libraries.
AC_PATH_XTRA
dnl "$LIBS" (blank)
dnl "$X_LIBS" (-L/usr/X11R6/lib)
dnl "$X_PRE_LIBS" (-lSM -lICE)
dnl "$X_EXTRA_LIBS" (blank)
CFLAGS="$CFLAGS $X_CFLAGS -Wall"
LIBS="$LIBS $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
dnl Checks for header files.
AC_CONFIG_HEADERS([config.h])
dnl AC_HEADER_STDC([])
AC_HEADER_DIRENT
AC_HEADER_TIME
dnl AC_CHECK_HEADERS(string.h strings.h sys/time.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_EXEEXT
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_PROG_RANLIB
dnl Checks for library functions (GCS - add 'select' to enable networking).
AC_CHECK_FUNCS(gettimeofday mkdir popen)
dnl If the system has X, make the X version
dnl If the system has SVGA, make the SVGA version.
dnl If the system has both, make both.
dnl If the system has neither, exit
LCLIBS=""
PROGS=""
AC_SUBST(LCLIBS)
AC_SUBST(PROGS)
if eval "test x$with_x = xyes"; then
LCLIBS="$LCLIBS LCX_LIBS"
else
if eval "test x$with_x = x"; then
AC_CHECK_LIB(X11,XOpenDisplay, LCLIBS="$LCLIBS LCX_LIBS";
PROGS="$PROGS X_PROGS")
fi
fi
if eval "test x$with_svga = xyes"; then
LCLIBS="$LCLIBS LCSVGA_LIBS"
else
if eval "test x$with_svga = x"; then
AC_CHECK_LIB(vgagl, gl_putbox,
[AC_CHECK_HEADERS(vga.h, LCLIBS="$LCLIBS LCSVGA_LIBS";
PROGS="$PROGS SVGA_PROGS")], , -lvga)
fi
fi
if test -z "$LCLIBS"; then
AC_MSG_ERROR("Found neither SVGA nor X on your system.")
fi
dnl -------------------------------------------------------
dnl Internationalization
dnl ALL_LINGUAS="ca"
AM_GNU_GETTEXT
dnl -------------------------------------------------------
dnl GCS: I stole the following from freeciv
dnl Why doesn't AM_GNU_GETTEXT set LIBS appropriately
dnl when -lintl is required??
dnl if test "$gt_cv_func_gettext_libintl" = "yes"; then
dnl LIBS="-lintl $LIBS"
dnl fi
dnl DATADIRNAME is generated by AM_GNU_GETTEXT;
dnl note this has to match the path installed by po/Makefile
FC_EXPAND_DIR(LOCALEDIR, '${prefix}/${DATADIRNAME}/locale')
AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
dnl -------------------------------------------------------
dnl GCS May 05, 2003
dnl Newest i18n hack (gettext 11.5 ??). Sigh.
dnl -------------------------------------------------------
dnl AC_MSG_WARN([libintl is $LIBINTL])
LIBS="$LIBS $LIBINTL"
dnl -------------------------------------------------------
dnl GCS Jan 19, 2003
dnl New autoheader stuff
dnl -------------------------------------------------------
AH_TEMPLATE([LOCALEDIR],[The location of the locale message files.])
dnl -------------------------------------------------------
dnl GCS Jan 19, 2003
dnl Remove internationalization. Pushed off to the next version.
dnl -------------------------------------------------------
AC_CONFIG_FILES([Makefile intl/Makefile po/Makefile.in m4/Makefile modules/Makefile])
dnl AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|