[go: up one dir, main page]

File: configure.ac

package info (click to toggle)
lincity 1.13.1-15
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 7,244 kB
  • sloc: ansic: 32,745; sh: 8,578; makefile: 584; perl: 445; yacc: 316; sed: 16
file content (123 lines) | stat: -rw-r--r-- 3,589 bytes parent folder | download | duplicates (3)
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
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
AM_GNU_GETTEXT(external)

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 po/Makefile.in m4/Makefile modules/Makefile])

dnl AC_CONFIG_FILES([Makefile])

AC_OUTPUT