1# Process this file with autoconf to produce a configure script. 2AC_INIT(hugo, 2.12, zeograd@zeograd.com) 3AM_INIT_AUTOMAKE(hugo, 2.12) 4AC_CONFIG_SRCDIR([pce.c]) 5# AC_CONFIG_HEADER([config.h]) 6AM_CONFIG_HEADER(config.h) 7 8AC_CANONICAL_TARGET 9# AC_ARG_PROGRAM 10 11AM_MAINTAINER_MODE 12 13# Checks for programs. 14AC_PROG_CC 15AC_PROG_INSTALL 16AC_PROG_LN_S 17 18AC_CHECK_PROG([HAVE_LYX], [lyx], [found]) 19AC_CHECK_PROG([HAVE_LATEX2HTML], [latex2html], [found]) 20AC_CHECK_PROG([HAVE_SED], [sed], [found]) 21AC_CHECK_PROG([HAVE_TIDY], [tidy], [found]) 22 23if test -n "$HAVE_LYX"; then 24 AM_CONDITIONAL(HAVE_TOOLS_FOR_TXT_DOC,true) 25 AVAILABLE_DOC_TARGETS="txt" 26 echo "$as_me:$LINENO: TEXTUAL form of the documentation can be made" >&5 27 echo $ECHO_N "TEXTUAL form of the documentation can be made" >&6 28else 29 AM_CONDITIONAL(HAVE_TOOLS_FOR_TXT_DOC,false) 30 echo "$as_me:$LINENO: TEXTUAL form of the documentation can NOT be made" >&5 31 echo $ECHO_N "TEXTUAL form of the documentation can NOT be made" >&6 32fi 33 34if test -n "$HAVE_LYX" -a -n "$HAVE_LATEX2HTML" -a -n "$HAVE_SED" -a -n "$HAVE_TIDY"; then 35 AM_CONDITIONAL(HAVE_TOOLS_FOR_HTML_DOC,true) 36 AVAILABLE_DOC_TARGETS="$AVAILABLE_DOC_TARGETS html" 37else 38 AM_CONDITIONAL(HAVE_TOOLS_FOR_HTML_DOC,false) 39fi 40 41AC_SUBST(AVAILABLE_DOC_TARGETS) 42 43# Checks for libraries. 44 45AC_CHECK_LIB(SDL, main) #,,[AC_MSG_ERROR([need SDL. See #http://www.libsdl.org])]) 46AC_CHECK_LIB(SDL_net, main, [HAVE_LIBSDL_NET="yes" LIBS="-lSDL_net $LIBS" AC_DEFINE([HAVE_LIBSDL_NET],[1],[Define to 1 if you have the SDL_net library])], [HAVE_LIBSDL_NET="no"]) #,,[AC_MSG_ERROR([need SDL_net. See #http://www.libsdl.org])]) 47AC_CHECK_LIB(SDL_mixer,main) #,,[AC_MSG_ERROR([need SDL_mixer. See #http://www.libsdl.org])]) 48AC_CHECK_LIB(vorbis, main) 49AC_CHECK_LIB(vorbisfile, main) 50 51LIBZ_SUPPORT=no 52 53AC_CHECK_LIB(z, main, [ LIBS="$LIBS -lz" AM_CONDITIONAL(ZLIB, true) AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have the 'z' library (-lz)]) LIBZ_SUPPORT=yes]) 54 55if test "x$LIBZ_SUPPORT" = "xno" 56then 57 58AC_CHECK_LIB(zdll, main, [ LIBS="$LIBS -lzdll" AM_CONDITIONAL(ZLIB, true) AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have the 'z' library (-lz)]) LIBZ_SUPPORT=yes] , AM_CONDITIONAL(ZLIB, false)) 59 60fi 61 62# Checks for endianess 63 64AC_C_BIGENDIAN 65 66AM_PATH_SDL 67 68GUI_SUPPORT=yes 69 70echo "$as_me:$LINENO: checking whether gui was asked" >&5 71echo $ECHO_N "checking whether gui was asked...$ECHO_C" >&6 72 73AC_ARG_ENABLE(gui, 74 AC_HELP_STRING([--enable-gui], [enable GUI (default is yes)]), 75 [ if test "$enableval" = "no"; then GUI_SUPPORT="no"; fi]) 76 77if test "x$GUI_SUPPORT" = "xyes" 78then 79 80 echo "$as_me:$LINENO: result: yes" >&5 81 echo "${ECHO_T}yes" >&6 82 83AM_PATH_GTK_2_0(2.0.0, HAVE_GTK="yes", HAVE_GTK="no") 84 85if test "x$HAVE_GTK" = "xno" 86then 87 AM_CONDITIONAL(GTK,false) 88else 89 AM_CONDITIONAL(GTK,true) 90 AC_DEFINE(GTK, 2, [defined if user have GTK2 installed]) 91fi 92 93else 94 AM_CONDITIONAL(GTK,false) 95 96 echo "$as_me:$LINENO: result: no" >&5 97 echo "${ECHO_T}no" >&6 98 99fi 100 101# Checks for header files. 102AC_HEADER_STDC 103AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h]) 104 105# Checks for typedefs, structures, and compiler characteristics. 106AC_C_CONST 107AC_C_INLINE 108AC_HEADER_TIME 109 110# Checks for library functions. 111AC_FUNC_ALLOCA 112AC_PROG_GCC_TRADITIONAL 113# AC_FUNC_MALLOC 114AC_FUNC_VPRINTF 115AC_CHECK_FUNCS([atexit bzero dup2 gettimeofday memset mkdir select strchr strdup strrchr strstr]) 116 117# Check for size of types 118 119AC_CHECK_SIZEOF([char], 1) 120AC_CHECK_SIZEOF([short int], 2) 121AC_CHECK_SIZEOF([int], 4) 122AC_CHECK_SIZEOF([long int], 4) 123 124# Check for netplay support request 125 126echo "$as_me:$LINENO: checking whether netplay support was asked" >&5 127echo $ECHO_N "checking whether netplay support was asked... $ECHO_C" >&6 128 129if test "x$HAVE_LIBSDL_NET" == "xyes" 130then 131 132AM_CONDITIONAL(NETPLAY, true) 133 134NETPLAY=yes 135 136AC_ARG_ENABLE(netplay, 137 AC_HELP_STRING([--enable-netplay], [enable netplay support (default is yes)]), 138 [ if test "$enableval" = "no"; then NETPLAY="no"; fi]) 139 140if test "$NETPLAY" = "yes" 141then 142 143 AC_DEFINE(ENABLE_NETPLAY, 1, [defined if user wants netplay support]) 144 145 AM_CONDITIONAL(NETPLAY, true) 146 147 echo "$as_me:$LINENO: result: yes" >&5 148 echo "${ECHO_T}yes" >&6 149 150else # NETPLAY 151 152 AM_CONDITIONAL(NETPLAY, false) 153 154 echo "$as_me:$LINENO: result: no" >&5 155 echo "${ECHO_T}no" >&6 156 157fi 158 159else # HAVE_LIBSDL_NET 160 161AM_CONDITIONAL(NETPLAY, false) 162 163 echo "$as_me:$LINENO: result: no (no SDL_net found)" >&5 164 echo "${ECHO_T}no (no SDL_net found)" >&6 165 166fi 167 168# Check for kernel version request 169 170echo "$as_me:$LINENO: checking which version of hugo kernel was asked" >&5 171echo $ECHO_N "checking whether new kernel version was asked... $ECHO_C" >&6 172 173NEW_KERNEL=yes 174 175AC_ARG_ENABLE(new-kernel, 176 AC_HELP_STRING([--enable-new-kernel], [enable new kernel (default is yes)]), 177 [ if test "$enableval" = "no"; then NEW_KERNEL="no"; fi]) 178 179if test "$NEW_KERNEL" = "yes" 180then 181 182 AC_DEFINE(KERNEL_DS, 1, [defined if user wants new kernel]) 183 184 echo "$as_me:$LINENO: result: yes" >&5 185 echo "${ECHO_T}yes" >&6 186 187else 188 189 echo "$as_me:$LINENO: result: no" >&5 190 echo "${ECHO_T}no" >&6 191 192fi 193 194# Check for shared memory 195 196echo "$as_me:$LINENO: checking shared memory openness" >&5 197echo $ECHO_N "checking whether shared memory openness was asked... $ECHO_C" >&6 198 199SHARED_MEMORY=no 200 201AC_ARG_ENABLE(shared-memory, 202 AC_HELP_STRING([--enable-shared-memory], [enable shared memory openness (default is no)]), 203 [ if test "$enableval" = "yes"; then SHARED_MEMORY="yes"; fi]) 204 205if test "$SHARED_MEMORY" = "yes" 206then 207 208 AC_DEFINE(SHARED_MEMORY, 1, [defined if user wants open memory openness]) 209 210 echo "$as_me:$LINENO: result: yes" >&5 211 echo "${ECHO_T}yes" >&6 212 213else 214 215 echo "$as_me:$LINENO: result: no" >&5 216 echo "${ECHO_T}no" >&6 217 218fi 219 220# Check for new gfx engine 221 222echo "$as_me:$LINENO: checking new gfx engine" >&5 223echo $ECHO_N "checking whether new gfx engine was asked... $ECHO_C" >&6 224 225NEW_GFX_ENGINE=yes 226 227AC_ARG_ENABLE(new-gfx-engine, 228 AC_HELP_STRING([--enable-new-gfx-engine], [use new gfx engine to render graphics (default is yes)]), 229 [ if test "$enableval" = "no"; then NEW_GFX_ENGINE="no"; fi]) 230 231if test "$NEW_GFX_ENGINE" = "yes" 232then 233 234 AC_DEFINE(NEW_GFX_ENGINE, 1, [defined if user wants to use the new gfx engine]) 235 236 echo "$as_me:$LINENO: result: yes" >&5 237 echo "${ECHO_T}yes" >&6 238 239else 240 241 echo "$as_me:$LINENO: result: no" >&5 242 echo "${ECHO_T}no" >&6 243 244fi 245 246# Check for debug version 247 248DEBUG_VERSION=no 249 250echo "$as_me:$LINENO: checking for debug version" >&5 251echo $ECHO_N "checking whether debug version was asked... $ECHO_C" >&6 252 253AC_ARG_ENABLE(final-release, 254 AC_HELP_STRING([--enable-final-release], [enable strict logging (default is yes)]), 255 [ if test "$enableval" = "no"; then DEBUG_VERSION="yes"; fi]) 256 257if test "$DEBUG_VERSION" = "no" 258then 259 AC_DEFINE(FINAL_RELEASE, 1, [defined if user wants a 'clean' binary ( = not for hugo developpers)]) 260 261 echo "$as_me:$LINENO: result: no" >&5 262 echo "${ECHO_T}no" >&6 263else 264 echo "$as_me:$LINENO: result: yes" >&5 265 echo "${ECHO_T}yes" >&6 266fi 267 268# Check for cd debugging 269 270CD_DEBUG=no 271 272echo "$as_me:$LINENO: checking for cd debug version" >&5 273echo $ECHO_N "checking whether cd debug version was asked... $ECHO_C" >&6 274 275AC_ARG_ENABLE(cd-debug, 276 AC_HELP_STRING([--enable-cd-debug], [enable CD subsystem debugging (default is no)]), 277 [ if test "$enableval" = "yes"; then CD_DEBUG="yes"; fi]) 278 279if test "$CD_DEBUG" = "yes" 280then 281 AC_DEFINE(CD_DEBUG, 1, [for hugo developers working on the cd subsystem]) 282 echo "$as_me:$LINENO: result: yes" >&5 283 echo "${ECHO_T}yes" >&6 284else 285 echo "$as_me:$LINENO: result: no" >&5 286 echo "${ECHO_T}no" >&6 287fi 288 289# Check for sound debugging 290 291SOUND_DEBUG=no 292 293echo "$as_me:$LINENO: checking for sound debug version" >&5 294echo $ECHO_N "checking whether sound debug version was asked... $ECHO_C" >&6 295 296AC_ARG_ENABLE(sound-debug, 297 AC_HELP_STRING([--enable-sound-debug], [enable sound routine debugging (default is no)]), 298 [ if test "$enableval" = "yes"; then SOUND_DEBUG="yes"; fi]) 299 300if test "$SOUND_DEBUG" = "yes" 301then 302 AC_DEFINE(SOUND_DEBUG, 1, [for hugo developers working on the cd subsystem]) 303 echo "$as_me:$LINENO: result: yes" >&5 304 echo "${ECHO_T}yes" >&6 305else 306 echo "$as_me:$LINENO: result: no" >&5 307 echo "${ECHO_T}no" >&6 308fi 309 310# Check for graphics debugging 311 312GFX_DEBUG=no 313 314echo "$as_me:$LINENO: checking for gfx debug version" >&5 315echo $ECHO_N "checking whether gfx debug version was asked... $ECHO_C" >&6 316 317AC_ARG_ENABLE(gfx-debug, 318 AC_HELP_STRING([--enable-gfx-debug], [enable graphics routine debugging (default is no)]), 319 [ if test "$enableval" = "yes"; then GFX_DEBUG="yes"; fi]) 320 321if test "$GFX_DEBUG" = "yes" 322then 323 AC_DEFINE(GFX_DEBUG, 1, [for hugo developers working on the graphics subsystem]) 324 echo "$as_me:$LINENO: result: yes" >&5 325 echo "${ECHO_T}yes" >&6 326else 327 echo "$as_me:$LINENO: result: no" >&5 328 echo "${ECHO_T}no" >&6 329 330fi 331 332# Check for input debugging 333 334INPUT_DEBUG=no 335 336echo "$as_me:$LINENO: checking for input debug version" >&5 337echo $ECHO_N "checking whether input debug version was asked... $ECHO_C" >&6 338 339AC_ARG_ENABLE(input-debug, 340 AC_HELP_STRING([--enable-input-debug], [enable input routine debugging (default is no)]), 341 [ if test "$enableval" = "yes"; then INPUT_DEBUG="yes"; fi]) 342 343if test "$INPUT_DEBUG" = "yes" 344then 345 AC_DEFINE(INPUT_DEBUG, 1, [for hugo developers working on the input subsystem]) 346 echo "$as_me:$LINENO: result: yes" >&5 347 echo "${ECHO_T}yes" >&6 348else 349 echo "$as_me:$LINENO: result: no" >&5 350 echo "${ECHO_T}no" >&6 351fi 352 353# Check for kernel debugging 354 355KERNEL_DEBUG=no 356 357echo "$as_me:$LINENO: checking for kernel debug version" >&5 358echo $ECHO_N "checking whether kernel debug version was asked... $ECHO_C" >&6 359 360AC_ARG_ENABLE(kernel-debug, 361 AC_HELP_STRING([--enable-kernel-debug], [enable hu6280 kernel debugging (default is no)]), 362 [ if test "$enableval" = "yes"; then KERNEL_DEBUG="yes"; fi]) 363 364if test "$KERNEL_DEBUG" = "yes" 365then 366 AC_DEFINE(KERNEL_DEBUG, 1, [for hugo developers working on hu6280 emulation]) 367 echo "$as_me:$LINENO: result: yes" >&5 368 echo "${ECHO_T}yes" >&6 369else 370 echo "$as_me:$LINENO: result: no" >&5 371 echo "${ECHO_T}no" >&6 372fi 373 374# Check for netplay debugging 375 376NETPLAY_DEBUG=no 377 378echo "$as_me:$LINENO: checking for netplay debug version" >&5 379echo $ECHO_N "checking whether netplay debug version was asked... $ECHO_C" >&6 380 381AC_ARG_ENABLE(netplay-debug, 382 AC_HELP_STRING([--enable-netplay-debug], [enable netplay debugging (default is no)]), 383 [ if test "$enableval" = "yes"; then NETPLAY_DEBUG="yes"; fi]) 384 385if test "$NETPLAY_DEBUG" = "yes" 386then 387 AC_DEFINE(NETPLAY_DEBUG, 1, [for hugo developers working on netplay emulation]) 388 echo "$as_me:$LINENO: result: yes" >&5 389 echo "${ECHO_T}yes" >&6 390else 391 echo "$as_me:$LINENO: result: no" >&5 392 echo "${ECHO_T}no" >&6 393fi 394 395# Check for bsd or gpl hardware cd support 396 397BSD_CD_HARDWARE_SUPPORT=yes 398 399echo "$as_me:$LINENO: checking for bsd pc engine cd version" >&5 400echo $ECHO_N "checking whether bsd pc engine cd version was asked... $ECHO_C" >&6 401 402AC_ARG_ENABLE(bsd-pcecd, 403 AC_HELP_STRING([--enable-bsd-pcecd], [enable modified bsd version of pce hardware cd support (default is yes)]), 404 [ if test "$enableval" = "no"; then BSD_CD_HARDWARE_SUPPORT="no"; fi]) 405 406if test "$BSD_CD_HARDWARE_SUPPORT" = "yes" 407then 408 AC_DEFINE(BSD_CD_HARDWARE_SUPPORT, 1, [modified bsd pce cd hardware support (old one)]) 409 echo "$as_me:$LINENO: result: yes" >&5 410 echo "${ECHO_T}yes" >&6 411else 412 echo "$as_me:$LINENO: result: no" >&5 413 echo "${ECHO_T}no" >&6 414fi 415 416# Check if user wants to build with sdl 417 418USE_SDL=yes 419 420echo "$as_me:$LINENO: checking for SDL library version" >&5 421echo $ECHO_N "checking whether SDL library version was asked... $ECHO_C" >&6 422 423AC_ARG_WITH(sdl, 424 AC_HELP_STRING([--with-sdl], [uses sdl as library for input/output (default is yes)]), 425 [ if test "$withval" = "no"; then USE_SDL="no"; fi]) 426 427if test "$USE_SDL" = "yes" 428then 429 AC_DEFINE(SDL, 1, [defined if user wants SDL as library]) 430 echo "$as_me:$LINENO: result: yes" >&5 431 echo "${ECHO_T}yes" >&6 432else 433 echo "$as_me:$LINENO: result: no" >&5 434 echo "${ECHO_T}no" >&6 435fi 436 437# Check for SDL_mixer 438echo $ECHO_N "checking whether SDL_mixer library version was asked... $ECHO_C" >&6 439USE_SDL_mixer=no 440 441AC_ARG_WITH(sdl_mixer, 442 AC_HELP_STRING([--with-sdl-mixer], [uses sdl_mixer as library for audio input/output (default is no)]), 443 [ if test "$withval" = "yes"; then USE_SDL_mixer="yes"; fi]) 444 445if test "$USE_SDL_mixer" = "yes" 446then 447 if test "$USE_SDL" = "yes" 448 then 449 AC_DEFINE(SDL_mixer, 1, [defined if user wants SDL_mixer as library]) 450 echo "$as_me:$LINENO: result: yes" >&5 451 echo "${ECHO_T}yes" >&6 452 else 453 echo "$as_me:$LINENO: result: no (needs SDL)" >&5 454 echo "${ECHO_T}no" >&6 455 fi 456else 457 echo "$as_me:$LINENO: result: no" >&5 458 echo "${ECHO_T}no" >&6 459fi 460 461#Checking for ogg/vorbis support in .hcd 462#echo "$as_me:$LINENO: checking whether ogg/vorbis support in .hcd was asked" >&5 463echo $ECHO_N "checking whether ogg/vorbis support in .hcd was asked... $ECHO_C" >&6 464OGG_SUPPORT=no 465 466AC_ARG_WITH(ogg-support, 467 AC_HELP_STRING([--with-ogg-support], [enable ogg/vorbis support in hcd (default is no)]), 468 [ if test "$withval" = "yes"; then OGG_SUPPORT="yes"; fi]) 469 470if test "$OGG_SUPPORT" = "yes" 471then 472 if test "$USE_SDL_mixer" = "yes" 473 then 474 AC_DEFINE(OGG_SUPPORT, 1, [defined if user wants ogg support in hcd]) 475 echo "$as_me:$LINENO: result: yes" >&5 476 echo "${ECHO_T}yes" >&6 477 else 478 echo "$as_me:$LINENO: result: no (needs SDL_mixer)" >&5 479 echo "${ECHO_T}no" >&6 480 fi 481else 482 echo "$as_me:$LINENO: result: no" >&5 483 echo "${ECHO_T}no" >&6 484fi 485 486# Mode for testing rom made to run with an offset of 0x68 for bank 487 488TEST_RELOCATED_ROM=no 489 490echo "$as_me:$LINENO: checking for test relocated rom version" >&5 491echo $ECHO_N "checking whether test relocated rom version was asked... $ECHO_C" >&6 492 493AC_ARG_ENABLE(test-relocated-rom, 494 AC_HELP_STRING([--enable-test-relocated-rom], [prepares execution of patched rom for running in SCD ram (default is no)]), 495 [ if test "$enableval" = "yes"; then TEST_RELOCATED_ROM="yes"; fi]) 496 497if test "$TEST_RELOCATED_ROM" = "yes" 498then 499 AC_DEFINE(TEST_ROM_RELOCATED, 1, [defined if rom are expected to be patched to run from bank 0x68]) 500 echo "$as_me:$LINENO: result: yes" >&5 501 echo "${ECHO_T}yes. UNUSABLE FOR NORMAL GAMES." >&6 502else 503 echo "$as_me:$LINENO: result: no" >&5 504 echo "${ECHO_T}no" >&6 505 506fi 507 508# Inlined accessors ? they're slightly faster but doens't work for AC games 509 510INLINED_ACCESSORS=no 511 512echo "$as_me:$LINENO: checking for inlined accessors version" >&5 513echo $ECHO_N "checking whether inlined accessors version was asked... $ECHO_C" >&6 514 515AC_ARG_ENABLE(inlined-accessors, 516 AC_HELP_STRING([--enable-inlined-accessors], [uses inlined accessors for memory (faster but not AC games compatible) (default is no)]), 517 [ if test "$enableval" = "yes"; then INLINED_ACCESSORS="yes"; fi]) 518 519if test "$INLINED_ACCESSORS" = "yes" 520then 521 AC_DEFINE(INLINED_ACCESSORS, 1, [defined if inlined accessors should be used]) 522 echo "$as_me:$LINENO: result: yes" >&5 523 echo "${ECHO_T}yes (AC games won't work properly)." >&6 524else 525 echo "$as_me:$LINENO: result: no" >&5 526 echo "${ECHO_T}no" >&6 527fi 528 529# Selecting machine / lib specific files 530 531if test "$target_alias" = ""; then 532 533 echo "$as_me:$LINENO: no target explicitely given, guessing" >&5 534 echo $ECHO_N "no target explicitely given, guessing... $ECHO_C" >&6 535 536 target_alias=`uname -m`-`uname -s` 537 538 echo "$as_me:$LINENO: result: $target_alias" >&5 539 echo "${ECHO_T}$target_alias" >&6 540 541fi 542 543AM_CONDITIONAL(SDL_LINUX, false) 544AM_CONDITIONAL(SDL_MIXER_LINUX, false) 545AM_CONDITIONAL(ZE_HCD_OGG_SUPPORT, false) 546AM_CONDITIONAL(SDL_NET_LINUX, false) 547AM_CONDITIONAL(ALLEGRO_LINUX, false) 548 549AM_CONDITIONAL(SDL_WIN32, false) 550AM_CONDITIONAL(ALLEGRO_WIN32, false) 551 552AM_CONDITIONAL(ALLEGRO_DJGPP, false) 553 554AM_CONDITIONAL(SDL_FREEBSD, false) 555 556AM_CONDITIONAL(SDL_SOLARIS, false) 557 558case $target_alias in 559 i386-mingw32msvc) 560 echo "Microsoft Windows 32bits with mingw build enabled" 561 HUGO_TARGET_MACHINE="WIN32" 562 563 if test "$USE_SDL" = "yes"; then 564 565 CFLAGS="$CFLAGS `sdl-config --cflags`" 566 LIBS="$LIBS `sdl-config --libs` -lakrip32" 567 568 AM_CONDITIONAL(SDL_WIN32, true) 569 else 570 571 HUGO_TARGET_LIBRARY="-DALLEGRO `allegro-config --cflags`" 572 HUGO_TARGET_LIBRARY_LD="`allegro-config --libs`" 573 574 AM_CONDITIONAL(ALLEGRO_WIN32, true) 575 fi 576 ;; 577 i386-djgpp) 578 echo "DJGPP build enabled" 579 580 HUGO_TARGET_MACHINE="DJGPP" 581 HUGO_TARGET_LIBRARY="-DALLEGRO" 582 HUGO_TARGET_LIBRARY_LD="-lalleg" 583 584 AM_CONDITIONAL(ALLEGRO_DJGPP, true) 585 ;; 586 *i?86-?inux*) 587 echo "Linux build enabled" 588 589 HUGO_TARGET_MACHINE="LINUX" 590 591 if test "$USE_SDL" = "yes"; then 592 593 CFLAGS="$CFLAGS `sdl-config --cflags`" 594 LIBS="$LIBS `sdl-config --libs`" 595 AM_CONDITIONAL(SDL_LINUX, true) 596 597 if test "$USE_SDL_mixer" = "yes"; then 598 LIBS="$LIBS -lSDL_mixer " 599 AM_CONDITIONAL(SDL_MIXER_LINUX, true) 600 fi 601 602 if test "$OGG_SUPPORT" = "yes"; then 603 LIBS="$LIBS -lvorbis -lvorbisfile" 604 AM_CONDITIONAL(ZE_HCD_OGG_SUPPORT, true) # ZE_: needs to be processed after SDL_MIXER_LINUX... 605 fi 606 607 else 608 609 HUGO_TARGET_LIBRARY="-DALLEGRO `allegro-config --cflags`" 610 HUGO_TARGET_LIBRARY_LD="`allegro-config --libs`" 611 AM_CONDITIONAL(ALLEGRO_LINUX, true) 612 613 fi 614 ;; 615 i386-FreeBSD) 616 echo "FreeBSD build enabled" 617 618 HUGO_TARGET_MACHINE="FREEBSD" 619 620 CFLAGS="$CFLAGS `sdl-config --cflags`" 621 LIBS="$LIBS `sdl-config --libs`" 622 623 AM_CONDITIONAL(SDL_FREEBSD, true) 624 ;; 625 sun4u-SunOS) 626 echo "Solaris build enabled" 627 628 HUGO_TARGET_MACHINE="SOLARIS" 629 630 CFLAGS="$CFLAGS `sdl-config --cflags`" 631 LIBS="$LIBS `sdl-config --libs`" 632 633 AM_CONDITIONAL(SDL_SOLARIS, true) 634 ;; 635 *) 636 echo "No target specified, Please ask maintainer about target: $target_alias" 637 ;; 638esac 639 640dnl Set PACKAGE_DATA_DIR in config.h. 641if test "x${datadir}" = 'x${prefix}/share'; then 642 if test "x${prefix}" = "xNONE"; then 643 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${ac_default_prefix}/share/hugo",[directory in which data are located]) 644 else 645 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${prefix}/share/hugo") 646 fi 647else 648 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${datadir}/hugo") 649fi 650 651AC_SUBST(HUGO_TARGET_MACHINE) 652AC_SUBST(HUGO_TARGET_LIBRARY) 653AC_SUBST(HUGO_TARGET_LIBRARY_LD) 654 655AC_CONFIG_FILES([Makefile]) 656AC_OUTPUT 657