| 1 | dnl Process this file with autoconf to produce a configure script | 
|---|
| 2 |  | 
|---|
| 3 | dnl CFLAGS=-DDEFAULTLANG=fr to build with French as the default language. | 
|---|
| 4 |  | 
|---|
| 5 | dnl Need autoconf 2.13 or later for 3 argument version of AC_DEFINE | 
|---|
| 6 | dnl Need autoconf 2.50 or later for AC_ARG_VAR | 
|---|
| 7 | AC_PREREQ(2.50) | 
|---|
| 8 | AC_INIT(src/cavern.c) | 
|---|
| 9 |  | 
|---|
| 10 | AM_INIT_AUTOMAKE(survex, 1.0.40) | 
|---|
| 11 | RELEASE=1 | 
|---|
| 12 |  | 
|---|
| 13 | AC_SUBST(RELEASE) | 
|---|
| 14 | AM_CONFIG_HEADER(config.h) | 
|---|
| 15 |  | 
|---|
| 16 | dnl don't reformat the next line, miniam.pl pulls out the value | 
|---|
| 17 | COPYRIGHT_MSG="Copyright (C) 1990-2008,2010 Olly Betts" | 
|---|
| 18 |  | 
|---|
| 19 | AVEN_COPYRIGHT_MSG="Copyright (C) 1999-2003 Mark R. Shinwell" | 
|---|
| 20 |  | 
|---|
| 21 | AC_DEFINE_UNQUOTED(COPYRIGHT_MSG, ["$COPYRIGHT_MSG"], [Copyright Message]) | 
|---|
| 22 | AC_DEFINE_UNQUOTED(AVEN_COPYRIGHT_MSG, ["$AVEN_COPYRIGHT_MSG"], | 
|---|
| 23 |                    [Copyright Message for Aven]) | 
|---|
| 24 |  | 
|---|
| 25 | AC_SUBST(COPYRIGHT_MSG) | 
|---|
| 26 | AC_SUBST(AVEN_COPYRIGHT_MSG) | 
|---|
| 27 |  | 
|---|
| 28 | dnl set PRETTYPACKAGE to PACKAGE with the first character capitalised | 
|---|
| 29 | PRETTYPACKAGE=`echo "$PACKAGE"|cut -b1|tr a-z A-Z``echo "$PACKAGE"|cut -b2-` | 
|---|
| 30 | AC_DEFINE_UNQUOTED(PRETTYPACKAGE, "$PRETTYPACKAGE", | 
|---|
| 31 |                    [Name of package (capitalised)]) | 
|---|
| 32 | AC_SUBST(PRETTYPACKAGE) | 
|---|
| 33 |  | 
|---|
| 34 | dnl set COMMAVERSION to VERSION with the dots replaced by commas - | 
|---|
| 35 | dnl e.g. "0,99" or "1,0,22" | 
|---|
| 36 | COMMAVERSION=`echo "$VERSION"|tr '.' ','` | 
|---|
| 37 | AC_DEFINE_UNQUOTED(COMMAVERSION, $COMMAVERSION, | 
|---|
| 38 |                    [Version number of package (comma-separated)]) | 
|---|
| 39 | AC_SUBST(COMMAVERSION) | 
|---|
| 40 |  | 
|---|
| 41 | PKGDOCDIR='${prefix}/share/doc/${PACKAGE}' | 
|---|
| 42 | AC_ARG_ENABLE(docdir, | 
|---|
| 43 | [  --enable-docdir=DIR Set directory for installing documentation to DIR], | 
|---|
| 44 | [case $enableval in | 
|---|
| 45 |  yes|no) | 
|---|
| 46 |   AC_MSG_ERROR([configure: Syntax: configure --enable-docdir=DIR]) ;; | 
|---|
| 47 | esac | 
|---|
| 48 | PKGDOCDIR="$enableval" | 
|---|
| 49 | ] | 
|---|
| 50 | ) | 
|---|
| 51 | PKGDOCDIR_EXPANDED=`( | 
|---|
| 52 |  test NONE = "$prefix" && prefix="$ac_default_prefix" | 
|---|
| 53 |  test NONE = "$exec_prefix" && exec_prefix="$prefix" | 
|---|
| 54 |  eval echo "$PKGDOCDIR" | 
|---|
| 55 | )` | 
|---|
| 56 | AC_SUBST(PKGDOCDIR) | 
|---|
| 57 | AC_SUBST(PKGDOCDIR_EXPANDED) | 
|---|
| 58 |  | 
|---|
| 59 | DEFAULTLANG=en | 
|---|
| 60 | AC_ARG_ENABLE(defaultlang, | 
|---|
| 61 | [  --enable-defaultlang=LANG Set the default language for messages to LANG], | 
|---|
| 62 | [case $enableval in | 
|---|
| 63 |  yes|no) # until we support Norwegian... | 
|---|
| 64 |   AC_MSG_ERROR([configure: Syntax: configure --enable-defaultlang=LANGUAGE]) ;; | 
|---|
| 65 | esac | 
|---|
| 66 | DEFAULTLANG="$enableval" | 
|---|
| 67 | AC_DEFINE_UNQUOTED(DEFAULTLANG, [$enableval], [Default language for messages]) | 
|---|
| 68 | ] | 
|---|
| 69 | ) | 
|---|
| 70 | AC_SUBST(DEFAULTLANG) | 
|---|
| 71 |  | 
|---|
| 72 | AC_ARG_ENABLE(testprogs, | 
|---|
| 73 | [  --enable-testprogs Enable building of various test harness programs], | 
|---|
| 74 | [case $enableval in | 
|---|
| 75 |  yes) TESTPROGS="dump3d printxbm" ;; | 
|---|
| 76 |  no) TESTPROGS= ;; | 
|---|
| 77 |  *) AC_MSG_ERROR(bad value $enableval for --enable-testprogs) ;; | 
|---|
| 78 | esac | 
|---|
| 79 | ] | 
|---|
| 80 | AC_SUBST(TESTPROGS) | 
|---|
| 81 | ) | 
|---|
| 82 |  | 
|---|
| 83 | AC_CANONICAL_HOST | 
|---|
| 84 |  | 
|---|
| 85 | dnl Checks for programs. | 
|---|
| 86 | AC_PROG_CC | 
|---|
| 87 | AC_PROG_CPP | 
|---|
| 88 |  | 
|---|
| 89 | AVEN='aven$(EXEEXT)' | 
|---|
| 90 | AC_ARG_ENABLE(aven, | 
|---|
| 91 | [  --disable-aven Don't try to build Aven cave viewer], | 
|---|
| 92 | [case $enableval in | 
|---|
| 93 |   yes) ;; | 
|---|
| 94 |   no) AVEN= ;; | 
|---|
| 95 |   *) AC_MSG_ERROR(bad value $enableval for --enable-aven) ;; | 
|---|
| 96 | esac]) | 
|---|
| 97 |  | 
|---|
| 98 | if test -n "$AVEN" ; then | 
|---|
| 99 |   AC_PROG_CXX | 
|---|
| 100 |   AC_PROG_CXXCPP | 
|---|
| 101 | else | 
|---|
| 102 |   dnl We don't want to fail to build Survex just because there's no C++ | 
|---|
| 103 |   dnl compiler installed, so we need to invoke AC_PROG_CXX conditionally. | 
|---|
| 104 |   dnl This bodge is required in order to do that... | 
|---|
| 105 |   am__fastdepCXX_TRUE='#' | 
|---|
| 106 |   am__fastdepCXX_FALSE= | 
|---|
| 107 | fi | 
|---|
| 108 |  | 
|---|
| 109 | AM_PROG_CC_C_O | 
|---|
| 110 |  | 
|---|
| 111 | AC_LANG_C | 
|---|
| 112 |  | 
|---|
| 113 | AC_EXEEXT | 
|---|
| 114 | AC_OBJEXT | 
|---|
| 115 |  | 
|---|
| 116 | case $host_os in | 
|---|
| 117 | *mingw*|*cygwin*|windows*) mswindows=yes ;; | 
|---|
| 118 | *) mswindows=no ;; | 
|---|
| 119 | esac | 
|---|
| 120 |  | 
|---|
| 121 | case $host in | 
|---|
| 122 | powerpc-*-darwin*) macosx=yes ;; # wxWidgets uses this to detect MacOS X | 
|---|
| 123 | *) macosx=no ;; | 
|---|
| 124 | esac | 
|---|
| 125 |  | 
|---|
| 126 | AC_C_BIGENDIAN | 
|---|
| 127 |  | 
|---|
| 128 | AC_ARG_VAR(STRIP, [Command for discarding symbols from object files]) | 
|---|
| 129 | AC_PATH_TOOL(STRIP, strip, [echo "not stripping "]) | 
|---|
| 130 |  | 
|---|
| 131 | AC_CHECK_LIB(m, sqrt) | 
|---|
| 132 |  | 
|---|
| 133 | AC_PATH_XTRA | 
|---|
| 134 |  | 
|---|
| 135 | WINPROGS= | 
|---|
| 136 | if test yes = "$mswindows"; then | 
|---|
| 137 |   WINPROGS='printwin$(EXEEXT) editwrap$(EXEEXT)' | 
|---|
| 138 |   AC_MSG_RESULT(building printwin and editwrap) | 
|---|
| 139 | fi | 
|---|
| 140 | AC_SUBST(WINPROGS) | 
|---|
| 141 |  | 
|---|
| 142 | AC_ARG_VAR(WXCONFIG, [Old name for WX_CONFIG, accepted for compatibility]) | 
|---|
| 143 | AC_ARG_VAR(WX_CONFIG, [wxWidgets configuration script to use to build Aven]) | 
|---|
| 144 | : ${WX_CONFIG="$WXCONFIG"} | 
|---|
| 145 |  | 
|---|
| 146 | if test yes = "$no_x"; then | 
|---|
| 147 |   AC_MSG_RESULT([not building xcaverot (X libraries not found or disabled)]) | 
|---|
| 148 |   if test -z "$WX_CONFIG" && test no = "$mswindows"; then | 
|---|
| 149 |     AC_MSG_RESULT([not building aven (X libraries not found or disabled)]) | 
|---|
| 150 |     AVEN= | 
|---|
| 151 |   fi | 
|---|
| 152 | else | 
|---|
| 153 |   AC_CHECK_LIB(Xext, XdbeQueryExtension, X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS", , | 
|---|
| 154 |                $X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS) | 
|---|
| 155 |   CAVEROT=xcaverot ${CAVEROT} | 
|---|
| 156 |   AC_MSG_RESULT(building xcaverot) | 
|---|
| 157 | fi | 
|---|
| 158 |  | 
|---|
| 159 | AM_CONDITIONAL(WIN32, [test yes = "$mswindows"]) | 
|---|
| 160 | AM_CONDITIONAL(MACOSX, [test yes = "$macosx"]) | 
|---|
| 161 |  | 
|---|
| 162 | if test -n "$AVEN"; then | 
|---|
| 163 |   if test -n "$WX_CONFIG" ; then | 
|---|
| 164 |     dnl WX_CONFIG specified - sanity check the value | 
|---|
| 165 |     dnl don't check for --ldflags - older wx-config didn't do that | 
|---|
| 166 |     if (exec >&5 2>&5;$WX_CONFIG --libs --cflags --cxxflags;exit $?) then | 
|---|
| 167 |       : | 
|---|
| 168 |     else | 
|---|
| 169 |       AC_MSG_ERROR(['$WX_CONFIG --libs --cflags --cxxflags' doesn't work, bailing out]) | 
|---|
| 170 |     fi | 
|---|
| 171 |   else | 
|---|
| 172 |     # prefer wx2.6 or wx2.8 - a few things work better with it than with wx2.4. | 
|---|
| 173 |     if test yes = "$macosx" ; then | 
|---|
| 174 |       AC_PATH_PROGS(WX_CONFIG, [wxmac-2.8-config wxmac-2.6-config wxmac-2.4-config wxmac-config]) | 
|---|
| 175 |       wxdef=__WXMAC__ | 
|---|
| 176 |     elif test yes = "$mswindows" ; then | 
|---|
| 177 |       AC_PATH_PROGS(WX_CONFIG, [wxmsw-2.8-config wxmsw-2.6-config wxmsw-2.4-config wxmsw-config]) | 
|---|
| 178 |       wxdef=__WXMSW__ | 
|---|
| 179 |     else | 
|---|
| 180 |       AC_PATH_PROGS(WX_CONFIG, [wxgtk-2.8-config wxgtk-2.6-config wxgtk-2.4-config wxgtk-config]) | 
|---|
| 181 |       wxdef=__WXGTK__ | 
|---|
| 182 |     fi | 
|---|
| 183 |     if test -z "$WX_CONFIG" ; then | 
|---|
| 184 |       dnl see if wx-config exists and is for the correct version | 
|---|
| 185 |       AC_PATH_PROGS(WX_CONFIG, [wx-config]) | 
|---|
| 186 |       if test -n "$WX_CONFIG" ; then | 
|---|
| 187 |         if (exec >&5 2>&5;$WX_CONFIG --cflags|grep -e -D"$wxdef";exit $?) then | 
|---|
| 188 |           : | 
|---|
| 189 |         else | 
|---|
| 190 |           WX_CONFIG= | 
|---|
| 191 |         fi | 
|---|
| 192 |       fi | 
|---|
| 193 |     fi | 
|---|
| 194 |     if test -z "$WX_CONFIG" ; then | 
|---|
| 195 |       AC_MSG_RESULT([not building aven (wxWidgets not found)]) | 
|---|
| 196 |       AVEN= | 
|---|
| 197 |     fi | 
|---|
| 198 |   fi | 
|---|
| 199 |  | 
|---|
| 200 |   if test -n "$AVEN"; then | 
|---|
| 201 |     WX_LIBS=`$WX_CONFIG --libs` | 
|---|
| 202 |     AC_SUBST(WX_LIBS) | 
|---|
| 203 |     dnl older wx-config didn't support this - error goes to stderr, with | 
|---|
| 204 |     dnl nothing to stdout, so just ignore stderr | 
|---|
| 205 |     WX_LDFLAGS=`$WX_CONFIG --ldflags 2> /dev/null` | 
|---|
| 206 |     AC_SUBST(WX_LDFLAGS) | 
|---|
| 207 |     WX_CFLAGS=`$WX_CONFIG --cflags` | 
|---|
| 208 |     AC_SUBST(WX_CFLAGS) | 
|---|
| 209 |     WX_CXXFLAGS=`$WX_CONFIG --cxxflags` | 
|---|
| 210 |     AC_SUBST(WX_CXXFLAGS) | 
|---|
| 211 |     AC_MSG_RESULT(building aven) | 
|---|
| 212 |   fi | 
|---|
| 213 | fi | 
|---|
| 214 |  | 
|---|
| 215 | AM_CONDITIONAL(AVEN, [test -n "$AVEN"]) | 
|---|
| 216 |  | 
|---|
| 217 | AC_LANG_C | 
|---|
| 218 |  | 
|---|
| 219 | AC_SUBST(CAVEROT) | 
|---|
| 220 | AC_SUBST(AVEN) | 
|---|
| 221 |  | 
|---|
| 222 | dnl only build extra man pages on Unix - the ".exe" messes us up otherwise | 
|---|
| 223 | dnl FIXME: probably no point building man pages except on Unix | 
|---|
| 224 | if test -z "$ac_exeext" ; then | 
|---|
| 225 |   dnl can't use \> as freebsd sed doesn't support it | 
|---|
| 226 |   EXTRA_MANS=`echo "$CAVEROT $AVEN"|sed 's/\$(EXEEXT)//g;s/\([[^ ]]\) /\1.1 /g;s/\(.\)$/\1.1/'` | 
|---|
| 227 | else | 
|---|
| 228 |   EXTRA_MANS= | 
|---|
| 229 | fi | 
|---|
| 230 | AC_SUBST(EXTRA_MANS) | 
|---|
| 231 |  | 
|---|
| 232 | dnl caverot libraries... | 
|---|
| 233 | AC_SUBST(CRLIB) | 
|---|
| 234 | dnl caverot platform specific sources... | 
|---|
| 235 | AC_SUBST(CROBJX) | 
|---|
| 236 |  | 
|---|
| 237 | dnl Checks for header files. | 
|---|
| 238 | AC_HEADER_STDC | 
|---|
| 239 | dnl don't use AC_CHECK_FUNCS for setjmp - mingw #define-s it to _setjmp | 
|---|
| 240 | AC_CHECK_HEADERS(limits.h string.h setjmp.h) | 
|---|
| 241 |  | 
|---|
| 242 | dnl Checks for typedefs, structures, and compiler characteristics. | 
|---|
| 243 | AC_C_CONST | 
|---|
| 244 | AC_TYPE_SIZE_T | 
|---|
| 245 | AC_STRUCT_TM | 
|---|
| 246 | AC_TYPE_SIGNAL | 
|---|
| 247 |  | 
|---|
| 248 | dnl check if CLOCKS_PER_SEC is defined by time.h (as ANSI says it should be) | 
|---|
| 249 | dnl if it isn't, assume it is 1000000, as it is on SunOS 4 | 
|---|
| 250 | AC_TRY_COMPILE([#include <time.h>],[ | 
|---|
| 251 | #ifndef CLOCKS_PER_SEC | 
|---|
| 252 | choke me | 
|---|
| 253 | #endif | 
|---|
| 254 | ], , AC_DEFINE(CLOCKS_PER_SEC, 1000000, [For old systems which don't define it themselves])) | 
|---|
| 255 |  | 
|---|
| 256 | dnl Look for a signed 32 bit integer type | 
|---|
| 257 | AC_MSG_CHECKING(for 32 bit integer type) | 
|---|
| 258 | AC_TRY_COMPILE(,[switch (0) { case (sizeof(int)==4): case 0: break; }], | 
|---|
| 259 | INT32_T=int, | 
|---|
| 260 | AC_TRY_COMPILE(,[switch (0) { case (sizeof(long)==4): case 0: break; }], | 
|---|
| 261 | INT32_T=long, | 
|---|
| 262 | AC_MSG_ERROR(not found) | 
|---|
| 263 | ) | 
|---|
| 264 | ) | 
|---|
| 265 | AC_MSG_RESULT($INT32_T) | 
|---|
| 266 | AC_DEFINE_UNQUOTED(INT32_T,$INT32_T,[signed 32 bit integer type]) | 
|---|
| 267 |  | 
|---|
| 268 | dnl Look for a signed 16 bit integer type | 
|---|
| 269 | AC_MSG_CHECKING(for 16 bit integer type) | 
|---|
| 270 | AC_TRY_COMPILE(,[switch (0) { case (sizeof(short)==2): case 0: break; }], | 
|---|
| 271 | INT16_T=short, | 
|---|
| 272 | AC_TRY_COMPILE(,[switch (0) { case (sizeof(int)==2): case 0: break; }], | 
|---|
| 273 | INT16_T=int, | 
|---|
| 274 | AC_MSG_ERROR(not found) | 
|---|
| 275 | ) | 
|---|
| 276 | ) | 
|---|
| 277 | AC_MSG_RESULT($INT16_T) | 
|---|
| 278 | AC_DEFINE_UNQUOTED(INT16_T,$INT16_T,[signed 16 bit integer type]) | 
|---|
| 279 |  | 
|---|
| 280 | dnl Checks for library functions. | 
|---|
| 281 | AC_FUNC_STRFTIME | 
|---|
| 282 | if test yes != "$ac_cv_func_strftime"; then | 
|---|
| 283 |   AC_LIBOBJ(strftime) | 
|---|
| 284 | fi | 
|---|
| 285 | AC_FUNC_VPRINTF | 
|---|
| 286 | dnl check for strcasecmp here as well as below - this one is to get | 
|---|
| 287 | dnl HAVE_STRCASECMP defined if appropriate (for img.c) | 
|---|
| 288 | AC_CHECK_FUNCS(popen signal getpwuid round strcasecmp hypot) | 
|---|
| 289 |  | 
|---|
| 290 | dnl difftime seems to be an ANSI invention | 
|---|
| 291 | AC_CHECK_FUNCS(difftime) | 
|---|
| 292 |  | 
|---|
| 293 | dnl Much faster than using getc()/putc(), at least on Linux. | 
|---|
| 294 | AC_CHECK_FUNCS([getc_unlocked putc_unlocked]) | 
|---|
| 295 |  | 
|---|
| 296 | dnl try to find a case-insensitive compare | 
|---|
| 297 |  | 
|---|
| 298 | strcasecmp=no | 
|---|
| 299 | dnl The order of these tests is important. | 
|---|
| 300 | AC_CHECK_FUNC(strcasecmp, [strcasecmp=strcasecmp]) | 
|---|
| 301 | if test no = "$strcasecmp"; then | 
|---|
| 302 |   AC_CHECK_FUNC(stricmp, [strcasecmp=stricmp]) | 
|---|
| 303 | fi | 
|---|
| 304 | if test no = "$strcasecmp"; then | 
|---|
| 305 |   AC_CHECK_FUNC(strcmpi, [strcasecmp=strcmpi]) | 
|---|
| 306 | fi | 
|---|
| 307 |  | 
|---|
| 308 | AC_MSG_CHECKING([how to compare strings ignoring case]) | 
|---|
| 309 | case $strcasecmp in | 
|---|
| 310 | no) | 
|---|
| 311 |   AC_LIBOBJ(strcasecmp) | 
|---|
| 312 |   AC_MSG_RESULT([using own implementation of strcasecmp]) ;; | 
|---|
| 313 | strcasecmp) | 
|---|
| 314 |   AC_MSG_RESULT([strcasecmp]) ;; | 
|---|
| 315 | *) | 
|---|
| 316 |   AC_DEFINE_UNQUOTED(strcasecmp, "$strcasecmp", | 
|---|
| 317 |     [strcasecmp define for systems which call it something else]) | 
|---|
| 318 |   AC_MSG_RESULT([$strcasecmp]) ;; | 
|---|
| 319 | esac | 
|---|
| 320 |  | 
|---|
| 321 | AC_MSG_CHECKING(for sgmltools v2 or v3) | 
|---|
| 322 | case `(exec 2>&5 ; sgmltools --version)` in | 
|---|
| 323 | *" version 2"*) | 
|---|
| 324 |   sgmltools=sgmltools | 
|---|
| 325 |   AC_MSG_RESULT(yes) ;; | 
|---|
| 326 | *" version 3"*) | 
|---|
| 327 |   sgmltools=sgmltools | 
|---|
| 328 |   AC_MSG_RESULT(yes) ;; | 
|---|
| 329 | *) | 
|---|
| 330 |   sgmltools="$MISSING sgmltools" | 
|---|
| 331 |   AC_MSG_RESULT(no) ;; | 
|---|
| 332 | esac | 
|---|
| 333 | AC_SUBST(sgmltools) | 
|---|
| 334 |  | 
|---|
| 335 | dnl extra warning flags for building with GCC | 
|---|
| 336 | if test yes = "$GCC"; then | 
|---|
| 337 |   if test yes = "$cross_compiling"; then | 
|---|
| 338 |     AM_CFLAGS="$AM_CFLAGS -Werror -Wall -Wunused -Wpointer-arith\ | 
|---|
| 339 |       -Wwrite-strings -Wcast-align" | 
|---|
| 340 |     AM_CXXFLAGS="$AM_CXXFLAGS -Werror -Wall -Wunused -Wpointer-arith\ | 
|---|
| 341 |       -Wwrite-strings -Wcast-align" | 
|---|
| 342 |   else | 
|---|
| 343 |     AM_CFLAGS="$AM_CFLAGS -Wall -W -Wunused -Wshadow -Wpointer-arith\ | 
|---|
| 344 |       -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wnested-externs\ | 
|---|
| 345 |       -Wcast-align" | 
|---|
| 346 |     dnl -W causes problems with wxWidgets | 
|---|
| 347 |     AM_CXXFLAGS="$AM_CXXFLAGS -Wall -Wunused -Wshadow -Wpointer-arith\ | 
|---|
| 348 |       -Wwrite-strings -Wcast-align" | 
|---|
| 349 |   fi | 
|---|
| 350 |   dnl too many complaints from headers, etc: -Wconversion | 
|---|
| 351 | fi | 
|---|
| 352 | AC_SUBST(AM_CFLAGS) | 
|---|
| 353 | AC_SUBST(AM_CXXFLAGS) | 
|---|
| 354 |  | 
|---|
| 355 | AC_ARG_ENABLE(profiling, | 
|---|
| 356 | [  --enable-profiling Build binaries to generate profiling information], | 
|---|
| 357 | [case $enableval in | 
|---|
| 358 |   yes) AM_CXXFLAGS="$AM_CXXFLAGS -pg" | 
|---|
| 359 |        AM_CFLAGS="$AM_CFLAGS -pg" | 
|---|
| 360 |        AC_MSG_RESULT(building binaries to generate profiling information);; | 
|---|
| 361 |   no) ;; | 
|---|
| 362 |   *) AC_MSG_ERROR(bad value $enableval for --enable-profiling) ;; | 
|---|
| 363 | esac]) | 
|---|
| 364 |  | 
|---|
| 365 | DOCS_OTHER="manual.rtf manual.txt manual.ps" | 
|---|
| 366 | AC_SUBST(DOCS_OTHER) | 
|---|
| 367 |  | 
|---|
| 368 | HTMLFILES="AUTHORS.htm HACKING.htm NEWS.htm OLDNEWS.htm TODO.htm index.htm 3dformat.htm" | 
|---|
| 369 | AC_SUBST(HTMLFILES) | 
|---|
| 370 |  | 
|---|
| 371 | EXTRA_TEXT="AUTHORS COPYING NEWS TODO ChangeLog" | 
|---|
| 372 | AC_SUBST(EXTRA_TEXT) | 
|---|
| 373 |  | 
|---|
| 374 | AC_SUBST_FILE(DESC) | 
|---|
| 375 | DESC=desc.txt | 
|---|
| 376 | AC_SUBST_FILE(AVENDESC) | 
|---|
| 377 | AVENDESC=desc-aven.txt | 
|---|
| 378 | AC_SUBST_FILE(SVXEDITDESC) | 
|---|
| 379 | SVXEDITDESC=desc-svxedit.txt | 
|---|
| 380 |  | 
|---|
| 381 | dnl Don't define DATADIR if building for MS Windows - it won't be used, and | 
|---|
| 382 | dnl can conflict with the DATADIR typedef in objidl.h | 
|---|
| 383 | if test no = "$mswindows"; then | 
|---|
| 384 |   AC_DEFINE_DIR(DATADIR, datadir, [Location of platform independent support files]) | 
|---|
| 385 | fi | 
|---|
| 386 |  | 
|---|
| 387 | AH_BOTTOM( | 
|---|
| 388 | [/* Use getc_unlocked() and putc_unlocked() where available, since they are | 
|---|
| 389 |  * faster, and we don't multithread file accesses. | 
|---|
| 390 |  */ | 
|---|
| 391 |  | 
|---|
| 392 | #ifdef HAVE_GETC_UNLOCKED | 
|---|
| 393 | # define GETC(F) getc_unlocked(F) | 
|---|
| 394 | #else | 
|---|
| 395 | # define GETC(F) getc(F) | 
|---|
| 396 | #endif | 
|---|
| 397 | #ifdef HAVE_PUTC_UNLOCKED | 
|---|
| 398 | # define PUTC(C, F) putc_unlocked(C, F) | 
|---|
| 399 | #else | 
|---|
| 400 | # define PUTC(C, F) putc(C, F) | 
|---|
| 401 | #endif | 
|---|
| 402 | ]) | 
|---|
| 403 |  | 
|---|
| 404 | AC_OUTPUT(Makefile src/Makefile doc/Makefile lib/Makefile lib/icons/Makefile | 
|---|
| 405 |  tests/Makefile debian/Makefile survex.iss doc/index.htm doc/survex.7 | 
|---|
| 406 |  src/borlandc/config.h src/riscos/config.h src/msvc/config.h | 
|---|
| 407 |  doc/version.ent debian/copyright survex.spec src/svxedit lib/survex.keys lib/Info.plist) | 
|---|