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 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(gtkwave, 3.3.10, bybell@nc.rr.com)
AC_CONFIG_SRCDIR([src/vcd.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
# Checks for build options
AC_MSG_CHECKING([if Tcl usage should be disabled])
ETCL=yes
DTCL=no
AC_ARG_ENABLE([tcl],
[ --disable-tcl Disables Tcl if found],
[
if test "X$enable_tcl" = "Xno" ; then
ETCL=no
DTCL=yes
else
ETCL=yes
DTCL=no
fi
],
[
ETCL=yes
])
AC_MSG_RESULT([$DTCL])
if test "X$ETCL" = "Xyes" ; then
SC_PATH_TCLCONFIG
if test "X$TCL_BIN_DIR" = "X# no Tcl configs found" ; then
AC_MSG_WARN([Tcl not found, skipping.])
ETCL=no
DTCL=yes
else
SC_LOAD_TCLCONFIG
AC_SUBST(TCL_INCLUDE_SPEC)
AC_SUBST(TCL_LIB_SPEC)
fi
fi
if test "X$ETCL" = "Xyes" ; then
SC_PATH_TKCONFIG
if test "X$TK_BIN_DIR" = "X# no Tk configs found" ; then
AC_MSG_WARN([Tk not found, skipping.])
ETCL=no
DTCL=yes
else
SC_LOAD_TKCONFIG
AC_SUBST(TK_INCLUDE_SPEC)
AC_SUBST(TK_LIB_SPEC)
fi
fi
AC_MSG_CHECKING([if Tcl/Tk (if present) should be stubified])
STUBIFY=no
AC_ARG_ENABLE([stubify],
[ --enable-stubify Causes the Tcl/Tk libraries to be dynamically loaded.],
[
if test "X$enable_stubify" = "Xno" ; then
STUBIFY=no
else
STUBIFY=yes
fi
],
[
STUBIFY=no
])
AC_MSG_RESULT([$STUBIFY])
AC_MSG_CHECKING([if gtk1 or gtk2 should be used])
GTK1=no
AC_ARG_ENABLE([gtk1],
[ --enable-gtk1 Causes the GTK+ frontend to be built with gtk1
instead of gtk2.],
[
if test "X$enable_gtk1" = "Xno" ; then
GTK1=no
else
GTK1=yes
fi
],
[
GTK1=no
])
if test "X$GTK1" = "Xyes" ; then
AC_MSG_RESULT([gtk1])
else
AC_MSG_RESULT([gtk2])
CPPFLAGS="-DWAVE_USE_GTK2 $CPPFLAGS"
fi
# check for "fisher price" (simvision rendering style) mode
AC_MSG_CHECKING([if fatlines should be used])
FLN=no
AC_ARG_ENABLE([fatlines],
[ --enable-fatlines Renders lines as double width in gtkwave.],
[
if test "X$enable_fatlines" = "Xno" ; then
FLN=no
else
FLN=yes
fi
],
[
FLN=no
])
if test "X$FLN" = "Xno" ; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
CPPFLAGS="-DWAVE_DOUBLE_LINE_WIDTH_MODE $CPPFLAGS"
fi
AC_MSG_CHECKING([if ae2 support should be used])
AE2_CFLAGS=
AET2_LDADD=
AE2=no
AC_ARG_ENABLE([ae2],
[ --enable-ae2 Compiles in support for AE2 files via simarama.],
[
if test "X$enable_ae2" = "Xno" ; then
AE2=no
else
AE2=yes
fi
],
[
AE2=no
])
if test "X$AE2" = "Xyes" ; then
AC_CHECK_FILE("/afs/awd/projects/simarama/releases/latest/libae2rw.so", AET2_SO=yes, AET2_SO=no)
if test "X$AET2_SO" = "Xyes" ; then
AET2_CFLAGS="-DAET2_IS_PRESENT"
AET2_LDADD="/afs/awd/projects/simarama/releases/latest/libae2rw.so"
else
AC_CHECK_FILE("/afs/awd/projects/simarama/releases/latest/libae2rw.a", AET2_A=yes, AET2_A=no)
if test "X$AET2_A" = "Xyes" ; then
AET2_CFLAGS="-DAET2_IS_PRESENT"
AET2_LDADD="/afs/awd/projects/simarama/releases/latest/libae2rw.a"
else
AC_MSG_WARN([AET2 library not found, skipping.])
fi
fi
else
AC_MSG_RESULT([no])
fi
AC_SUBST(AET2_CFLAGS)
AC_SUBST(AET2_LDADD)
# Checks for programs.
# AC_PROG_CXX # not needed as gtkwave and related programs don't use c++
AC_PROG_AWK
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_LEX
AC_PROG_RANLIB
#
# only needed if user wishes to process various files with an external reader
#
AC_PATH_PROG(EXTDEBUG, [fsdbdebug], [notfound])
if test "$EXTDEBUG" = "notfound" ; then
EXTLOAD_CFLAGS=
else
EXTLOAD_CFLAGS="-DEXTLOAD_PATH=\\\"$EXTDEBUG\\\" -DEXTLOAD_SUFFIX=\\\"fsdb\\\""
fi
AC_SUBST(EXTLOAD_CFLAGS)
#
# gperf only needed if the user updates the gperf data
# files which only developers will be doing...
#
AC_PATH_PROG(GPERF, [gperf], [notfound])
if test "$GPERF" = "notfound" ; then
AC_MSG_ERROR([Couldn't find a usable gperf program.
Please install gperf which is available from
ftp://ftp.gnu.org/pub/gnu/gperf/
])
fi
# Checks for libraries.
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([pthread], [main])
# included or system libz and libbz2. By default, we search for the
# system libz and libbz2. If not found, build the included ones.
# The --enable-local-libz and --enable-local_libbz2 arguments can be
# used to force the use of the included libs. --disable-local-libz
# and --disable-local-libbz2 can be used to force the use of system
# libs
AC_ARG_ENABLE([local-libz],
[ --enable-local-libz Use the bundled libz instead of any libz which may
already be installed on your system. Default is to
first look for an installed libz and fall back to
using the bundled one.],
[
if test "X$enable_local_libz" = "Xno" ; then
force_system_libz=yes
else
force_bundled_libz=yes
fi
], , )
need_libz=no
LIBZ_LDADD=
LIBZ_CFLAGS=
if test "X$force_bundled_libz" != "Xyes" ; then
AC_TRY_COMPILE([#include <zlib.h>], [gzdopen(0,"rb");],, [need_libz=yes])
if test "$need_libz" = "yes" -a "X$force_system_libz" = "Xyes" ; then
AC_MSG_ERROR([
You have disabled building the bundled libz but no system libz headers
could be found. Either allow building the bundled libz (by not using
--disable-local-libz) or make sure your system has a libz installed])
fi
AC_CHECK_LIB([z], [gzread], [LIBZ_LDADD=-lz] , [need_libz=yes])
if test "$need_libz" = "yes" -a "X$force_system_libz" = "Xyes" ; then
AC_MSG_ERROR([
You have disabled building the bundled libz but no system libz could
be found. Either allow building the bundled libz (by not using
--disable-local-libz) or make sure your system has a libz installed])
fi
else
need_libz=yes
fi
AC_ARG_ENABLE([local-libbz2],
[ --enable-local-libbz2 Use the bundled libbz2 instead of any libbz2 which may
already be installed on your system. Default is to
first look for an installed libbz2 and fall back to
using the bundled one.],
[
if test "X$enable_local_libbz2" = "Xno" ; then
force_system_libbz2=yes
else
force_bundled_libbz2=yes
fi
], , )
need_libbz2=no
LIBBZ2_LDADD=
LIBBZ2_CFLAGS=
if test "X$force_bundled_libbz2" != "Xyes" ; then
AC_TRY_COMPILE([#include <bzlib.h>], [BZ2_bzdopen(0,"rb");],, [need_libbz2=yes])
if test "$need_libbz2" = "yes" -a "X$force_system_libbz2" = "Xyes" ; then
AC_MSG_ERROR([
You have disabled building the bundled libbz2 but no system libbz2 headers
could be found. Either allow building the bundled libbz2 (by not using
--disable-local-libbz2) or make sure your system has a libbz2 installed])
fi
AC_CHECK_LIB([bz2], [BZ2_bzread], [LIBBZ2_LDADD=-lbz2], [need_libbz2=yes])
if test "$need_libbz2" = "yes" -a "X$force_system_libbz2" = "Xyes" ; then
AC_MSG_ERROR([
You have disabled building the bundled libbz2 but no system libbz2 could
be found. Either allow building the bundled libbz2 (by not using
--disable-local-libbz2) or make sure your system has a libbz2 installed])
fi
else
need_libbz2=yes
fi
LIBZ_DIR=
if test "$need_libz" = "yes" ; then
LIBZ_CFLAGS='-I$(top_srcdir)/src/libz'
LIBZ_LDADD='$(top_builddir)/src/libz/libz.a'
LIBZ_DIR=libz
fi
AC_SUBST(LIBZ_CFLAGS)
AC_SUBST(LIBZ_LDADD)
AC_SUBST(LIBZ_DIR)
LIBBZ2_DIR=
if test "$need_libbz2" = "yes" ; then
LIBBZ2_CFLAGS='-I$(top_srcdir)/src/libbz2'
LIBBZ2_LDADD='$(top_builddir)/src/libbz2/libbz2.a'
LIBBZ2_DIR=libbz2
fi
AC_SUBST(LIBBZ2_CFLAGS)
AC_SUBST(LIBBZ2_LDADD)
AC_SUBST(LIBBZ2_DIR)
# ------------- LZMA / XZ -------------------
AC_MSG_CHECKING([if XZ should be enabled])
EXZ=yes
AC_ARG_ENABLE([xz],
[ --disable-xz Disables LZMA support for VZT],
[
if test "X$enable_xz" = "Xno" ; then
EXZ=no
fi
])
AC_MSG_RESULT([$EXZ])
LIBXZ_LDADD=
LIBXZ_CFLAGS=
if test "X$EXZ" == "Xyes"; then
have_liblzma=no
AC_TRY_COMPILE([#include <lzma.h>], [lzma_end(NULL);],, [have_liblzma=yes])
AC_CHECK_LIB([lzma], [lzma_end], [LIBLZMA_LDADD=-llzma] , [have_liblzma=yes])
if test "$have_liblzma" = "yes" ; then
AC_MSG_ERROR([LZMA support for VZT is enabled, but xz could not be found.
Please install xz, see the http://tukaani.org/xz website or use the --disable-xz flag.])
fi
LIBXZ_LDADD='-llzma'
LIBXZ_CFLAGS='-D_WAVE_HAVE_XZ'
fi
AC_SUBST(LIBXZ_LDADD)
AC_SUBST(LIBXZ_CFLAGS)
# ------------- Judy -------------------
AC_MSG_CHECKING([if Judy array support should be enabled])
EJUDY=no
AC_ARG_ENABLE([judy],
[ --enable-judy Enables Judy array support],
[
if test "X$enable_judy" = "Xno" ; then
EJUDY=no
else
EJUDY=yes
fi
])
AC_MSG_RESULT([$EJUDY])
LIBJUDY_LDADD=
LIBJUDY_CFLAGS=
if test "X$EJUDY" == "Xyes"; then
have_libjudy=no
AC_TRY_COMPILE([#include <Judy.h>], [ JudySLIns (NULL, NULL, NULL);],, [have_libjudy=yes])
AC_CHECK_LIB([Judy], [JudySLIns], [LIBJUDY_LDADD=-lJudy] , [have_libjudy=yes])
if test "$have_libjudy" = "yes" ; then
AC_MSG_ERROR([Judy support is enabled, but could not be found.
Please install Judy, see the http://judy.sourceforge.net website or use the --disable-judy flag.])
fi
LIBJUDY_LDADD='-lJudy'
LIBJUDY_CFLAGS='-D_WAVE_HAVE_JUDY'
fi
AC_SUBST(LIBJUDY_LDADD)
AC_SUBST(LIBJUDY_CFLAGS)
# ------------- GTK -------------------
if test "X$GTK1" = "Xyes" ; then
AC_PATH_PROG(GTK_CONFIG, [gtk-config], [notfound])
if test "$GTK_CONFIG" = "notfound"; then
AC_MSG_ERROR([You must have gtk installed on your system])
else
AC_MSG_CHECKING([gtk1 version])
GTK_VER=`$GTK_CONFIG --version`
AC_MSG_RESULT([$GTK_VER])
case $GTK_VER in
1.2.* )
AC_MSG_CHECKING([for gtk1 CFLAGS])
GTK_CFLAGS=`$GTK_CONFIG --cflags`
AC_MSG_RESULT([$GTK_CFLAGS])
AC_MSG_CHECKING([for gtk1 libs])
GTK_LIBS=`$GTK_CONFIG --libs`
AC_MSG_RESULT([$GTK_LIBS])
;;
* )
AC_MSG_ERROR([when building with gtk1, you need version 1.2.*])
;;
esac
fi
else
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2.0)
GTK_VER=`$PKG_CONFIG gtk+-2.0 --modversion`
fi
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h inttypes.h libintl.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h strings.h sys/time.h unistd.h wchar.h wctype.h getopt.h])
# rpc workaround for cygwin
AC_CHECK_HEADERS([rpc/types.h rpc/xdr.h], [], [],
[[#ifdef HAVE_RPC_TYPES_H
# include <rpc/types.h>
#endif
]])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_TYPES([ptrdiff_t])
AC_SYS_LARGEFILE
# Checks for library functions. (malloc/realloc removed to get rid of rpl_xxx substitutions)
# AC_FUNC_MALLOC
# AC_FUNC_REALLOC
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_STAT
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit btowc bzero dup2 memmove memset munmap pow putenv re_comp realpath regcomp select setenv strcasecmp strchr strdup strerror strncasecmp strrchr strstr getopt_long setenv unsetenv])
AC_CHECK_LIB(nsl,xdrmem_create)
AC_CHECK_LIB(rpc,xdrmem_create)
# some AIX adds (linker flag for 32 bit compiles)
if test "X$OSTYPE" = "Xaix" ; then
if test "X$MACHTYPE" = "Xrs6000" ; then
CFLAGS="${CFLAGS} -D_WAVE_BE32"
if test "X$CC" = "Xxlc" ; then
LDFLAGS="${LDFLAGS} -bmaxdata:0xd0000000/dsa"
else
LDFLAGS="${LDFLAGS} -Wl,-bmaxdata:0xd0000000/dsa"
fi
fi
fi
if test "X$ETCL" = "Xyes" ; then
if test "X$OSTYPE" = "Xcygwin" ; then
# skip Tcl_CreateInterp check on cygwin...
if test "X$STUBIFY" = "Xyes" ; then
TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
TCL_LDADD="${TCL_STUB_LIB_SPEC}"
TK_LDADD="${TK_STUB_LIB_SPEC}"
else
TCL_DEFADD="-DHAVE_LIBTCL"
TCL_LDADD="${TCL_LIB_SPEC}"
TK_LDADD="${TK_LIB_SPEC}"
# cygwin tkConfig.sh has issues...
if test "X$TK_LDADD" = "X" ; then
TK_LDADD="${TK_BUILD_LIB_SPEC}"
fi
fi
else
if test "X$OSTYPE" = "Xmsys" ; then
# skip Tcl_CreateInterp check on MingW (until we figure out)...
if test "X$STUBIFY" = "Xyes" ; then
TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
TCL_LDADD="${TCL_STUB_LIB_SPEC}"
TK_LDADD="${TK_STUB_LIB_SPEC}"
else
TCL_DEFADD="-DHAVE_LIBTCL"
TCL_LDADD="${TCL_LIB_SPEC}"
TK_LDADD="${TK_LIB_SPEC}"
fi
else
OLD_LDFLAGS="${LDFLAGS}"
TCLSPEC_LHS="${TCL_LIB_SPEC% *}"
TKLSPEC_LHS="${TK_LIB_SPEC% *}"
LDFLAGS="${LDFLAGS} ${TCLSPEC_LHS} ${TKLSPEC_LHS}"
AC_CHECK_LIB(tcl${TCL_VERSION},Tcl_CreateInterp, [TCL_LDADD=${TCL_LIB_SPEC}], [need_tcl=yes])
if test "$need_tcl" = "yes" ; then
AC_MSG_WARN([
Tcl support not enabled.])
else
if test "X$STUBIFY" = "Xyes" ; then
TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
TCL_LDADD="${TCL_STUB_LIB_SPEC}"
TK_LDADD="${TK_STUB_LIB_SPEC}"
else
TCL_DEFADD="-DHAVE_LIBTCL"
TCL_LDADD="${TCL_LIB_SPEC}"
TK_LDADD="${TK_LIB_SPEC}"
fi
fi
LDFLAGS="${OLD_LDFLAGS}"
fi
fi
fi
AC_SUBST(TCL_LDADD)
AC_SUBST(TCL_DEFADD)
AC_SUBST(TK_LDADD)
AC_CONFIG_FILES([Makefile
doc/Makefile
contrib/Makefile
contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile
contrib/pccts/Makefile
contrib/pccts/antlr/Makefile
contrib/pccts/dlg/Makefile
contrib/pccts/h/Makefile
contrib/pccts/sorcerer/Makefile
contrib/pccts/sorcerer/h/Makefile
contrib/pccts/sorcerer/lib/Makefile
contrib/pccts/sorcerer/test/Makefile
contrib/pccts/sorcerer/test/test7/Makefile
contrib/pccts/sorcerer/testcpp/Makefile
contrib/pccts/support/DECmms/Makefile
contrib/pccts/support/Makefile
contrib/pccts/support/genmk/Makefile
contrib/pccts/support/rexpr/Makefile
contrib/pccts/support/set/Makefile
contrib/pccts/support/sym/Makefile
contrib/pccts/testcpp/Makefile
contrib/rtlbrowse/Makefile
contrib/vermin/Makefile
examples/Makefile
man/Makefile
src/Makefile
src/helpers/Makefile
src/liblzma/Makefile
src/libbz2/Makefile
src/libz/Makefile
src/helpers/fst/Makefile
])
AC_MSG_NOTICE([
--------------------------------------------
Configuration summary:
gtk1 : $GTK1
gtk version : $GTK_VER
GTK_CFLAGS : $GTK_CFLAGS
GTK_LIBS : $GTK_LIBS
LIBZ_CFLAGS : $LIBZ_CFLAGS
LIBZ_LDADD : $LIBZ_LDADD
LIBBZ2_CFLAGS : $LIBBZ2_CFLAGS
LIBBZ2_LDADD : $LIBBZ2_LDADD
LIBXZ_CFLAGS : $LIBXZ_CFLAGS
LIBXZ_LDADD : $LIBXZ_LDADD
LIBJUDY_CFLAGS : $LIBJUDY_CFLAGS
LIBJUDY_LDADD : $LIBJUDY_LDADD
AET2_CFLAGS : $AET2_CFLAGS
AET2_LDADD : $AET2_LDADD
EXTLOAD_CFLAGS : $EXTLOAD_CFLAGS
TCL_INCLUDE_SPEC : $TCL_INCLUDE_SPEC
TCL_LIB_SPEC : $TCL_LIB_SPEC
TCL_LDADD : $TCL_LDADD
TCL_DEFADD : $TCL_DEFADD
TK_INCLUDE_SPEC : $TK_INCLUDE_SPEC
TK_LIB_SPEC : $TK_LIB_SPEC
TK_LDADD : $TK_LDADD
CPPFLAGS : $CPPFLAGS
CFLAGS : $CFLAGS
LDFLAGS : $LDFLAGS
LIBS : $LIBS
--------------------------------------------
])
AC_OUTPUT
|