[go: up one dir, main page]

File: configure.ac

package info (click to toggle)
lincity 1.12.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,288 kB
  • ctags: 4,483
  • sloc: ansic: 31,919; sh: 3,538; makefile: 658; perl: 372; yacc: 316; sed: 16
file content (165 lines) | stat: -rw-r--r-- 5,163 bytes parent folder | download
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
163
164
165
dnl Process this file with autoconf to produce a configure script.

dnl Initialization
dnl AC_INIT
dnl AM_INIT_AUTOMAKE(lincity,1.12pre50)
AC_INIT([Lincity],[1.12.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

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 -------------------------------------------------------
FC_EXPAND_DIR(DEFAULT_LIBDIR,[${datadir}/lincity])
AC_DEFINE_UNQUOTED(DEFAULT_LIBDIR,"$DEFAULT_LIBDIR")

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"
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
dnl -------------------------------------------------------
dnl GCS Jan 19, 2003
dnl The following code no longer works with the new Autoconf
dnl -------------------------------------------------------
dnl PROGS=""
dnl AC_SUBST(PROGS)
dnl if eval "test x$with_x = xyes"; then
dnl   PROGS="$PROGS X_PROGS"
dnl else
dnl   if eval "test x$with_x = x"; then
dnl     AC_CHECK_LIB(X11,XOpenDisplay, PROGS="$PROGS X_PROGS", , )
dnl   fi
dnl fi
dnl if eval "test x$with_svga = xyes"; then
dnl   PROGS="$PROGS SVGA_PROGS"
dnl else
dnl   if eval "test x$with_svga = x"; then
dnl     AC_CHECK_LIB(vgagl, gl_putbox, 
dnl 	AC_CHECK_HEADERS(vga.h, PROGS="$PROGS SVGA_PROGS"), , -lvga)
dnl   fi
dnl fi
dnl if test -z "$PROGS"; then
dnl   AC_MSG_ERROR("Found neither SVGA nor X on your system.")
dnl fi
dnl -------------------------------------------------------
PROGS=""
AC_SUBST(PROGS)
if eval "test x$with_x = xyes"; then
  PROGS="$PROGS X_PROGS"
else
  if eval "test x$with_x = x"; then
    AC_CHECK_LIB(X11,XOpenDisplay, PROGS="$PROGS X_PROGS")
  fi
fi
if eval "test x$with_svga = xyes"; then
  PROGS="$PROGS SVGA_PROGS"
else
  if eval "test x$with_svga = x"; then
    AC_CHECK_LIB(vgagl, gl_putbox, 
	[AC_CHECK_HEADERS(vga.h, PROGS="$PROGS SVGA_PROGS")], , -lvga)
  fi
fi
if test -z "$PROGS"; 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 ])

dnl AC_CONFIG_FILES([Makefile])

AC_OUTPUT