1dnl Process this file with autoconf to produce a configure script. 2AC_PREREQ(2.57) 3 4dnl Version numbers 5m4_define([libvisual_version_major], [0]) 6m4_define([libvisual_version_minor], [4]) 7m4_define([libvisual_version_micro], [0]) 8 9m4_define([libvisual_version], [libvisual_version_major.libvisual_version_minor.libvisual_version_micro]) 10 11AC_INIT([Libvisual Library], [libvisual_version], [synap@nerds-incorporated.org], [libvisual]) 12AM_INIT_AUTOMAKE([1.7.0 dist-bzip2]) 13 14dnl TODO: Add these into lv_config.h (or maybe lv_version.h) 15LIBVISUAL_VERSION_MAJOR=libvisual_version_major 16LIBVISUAL_VERSION_MINOR=libvisual_version_minor 17LIBVISUAL_VERSION_MICRO=libvisual_version_micro 18LIBVISUAL_VERSION=libvisual_version 19 20LIBVISUAL_VERSION_SUFFIX="$LIBVISUAL_VERSION_MAJOR.$LIBVISUAL_VERSION_MINOR" 21AC_SUBST(LIBVISUAL_VERSION_SUFFIX) 22 23AC_CONFIG_HEADER(config.h) 24 25AC_CANONICAL_HOST 26 27lv_mips=no 28lv_alpha=no 29lv_sparc=no 30lv_ix86=no 31lv_x86_64=no 32lv_powerpc=no 33 34case "$host_cpu" in 35 mips) lv_mips=yes;; 36 alpha) lv_alpha=yes;; 37 sparc) lv_sparc=yes;; 38 i*86) lv_ix86=yes;; 39 x86_64*) lv_x86_64=yes;; 40 powerpc|ppc) lv_powerpc=yes;; 41 *) lv_arch_unknown=yes;; 42esac 43 44lv_hpux=no 45lv_aix=no 46lv_beos=no 47lv_osf=no 48lv_irix=no 49lv_sunos=no 50lv_solaris=no 51lv_linux=no 52lv_sco=no 53lv_freebsd=no 54lv_netbsd=no 55lv_openbsd=no 56lv_darwin=no 57lv_cygwin=no 58lv_mingw=no 59lv_os_unknown=no 60 61case "$host_os" in 62 hpux9* | hpux10* | hpux11*) lv_hpux=yes;; 63 aix*) lv_aix=yes;; 64 beos*) lv_beos=yes;; 65 *osf*) lv_osf=yes;; 66 irix*) lv_irix=yes;; 67 sunos*) lv_sunos=yes;; 68 solaris*) lv_solaris=yes;; 69 linux*) lv_linux=yes;; 70 *sco*) lv_sco=yes;; 71 freebsd*) lv_freebsd=yes;; 72 netbsd*) lv_netbsd=yes;; 73 openbsd*) lv_openbsd=yes;; 74 *darwin*) lv_darwin=yes;; 75 cygwin*) lv_cygwin=yes;; 76 mingw*) lv_mingw=yes;; 77 *) lv_os_unknown=yes;; 78esac 79 80AC_MSG_CHECKING([for Win32]) 81if test x$lv_cygwin = xyes || test x$lv_mingw = xyes ; then 82 lv_win32=yes 83else 84 lv_win32=no 85fi 86AC_MSG_RESULT([$lv_win32]) 87 88# Checks for programs. 89AC_PROG_CXX 90AC_PROG_CC 91AC_PROG_CPP 92AC_PROG_INSTALL 93AC_PROG_LN_S 94AC_PROG_MAKE_SET 95 96AC_DISABLE_STATIC 97AC_LIBTOOL_WIN32_DLL 98AC_LIBTOOL_DLOPEN 99AC_PROG_LIBTOOL 100 101AC_PATH_PROG(PKG_CONFIG, [pkg-config], [no]) 102if test x$PKG_CONFIG = xno ; then 103 AC_MSG_WARN([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/. 104 *** You will need pkg-config to compile against Libvisual Library]) 105fi 106if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then 107 : 108else 109 AC_MSG_WARN([*** pkg-config too old; version 0.14 or better recommended.]) 110fi 111 112# Checks for header files. 113AC_HEADER_DIRENT 114AC_HEADER_STDC 115AC_CHECK_HEADERS([fcntl.h sys/types.h stdlib.h string.h sys/time.h unistd.h sched.h sys/sched.h]) 116 117# Checks for typedefs, structures, and compiler characteristics. 118AC_C_CONST 119AC_C_INLINE 120AC_TYPE_SIZE_T 121AC_HEADER_TIME 122 123AC_MSG_CHECKING(for ISO C99 varargs macros in C) 124AC_TRY_COMPILE([],[ 125 int a(int p1, int p2, int p3); 126 #define call_a(...) a(1,__VA_ARGS__) 127 call_a(2,3); 128 ],lv_have_iso_c_varargs=yes,lv_have_iso_c_varargs=no) 129AC_MSG_RESULT($lv_have_iso_c_varargs) 130 131AC_MSG_CHECKING(for GNUC varargs macros) 132AC_TRY_COMPILE([],[ 133 int a(int p1, int p2, int p3); 134 #define call_a(params...) a(1,params) 135 call_a(2,3); 136 ],lv_have_gnuc_varargs=yes,lv_have_gnuc_varargs=no) 137AC_MSG_RESULT($lv_have_gnuc_varargs) 138 139AC_C_BIGENDIAN(bigendian=yes, bigendian=no, ) 140 141# Checks for library functions. 142AC_FUNC_MALLOC 143AC_FUNC_REALLOC 144AC_FUNC_SELECT_ARGTYPES 145AC_CHECK_FUNCS([gettimeofday usleep nanosleep select memset sqrt strdup strndup sysconf]) 146 147AC_CHECK_LIB([dl], [dlsym], [LIBS="-ldl $LIBS"], 148 AC_MSG_WARN([*** You need dlsym() to make use of Libvisual.])) 149AC_CHECK_LIB([m], [sqrt], [LIBS="-lm $LIBS"], 150 AC_MSG_ERROR([*** You need the Standard C Math Library to build Libvisual.])) 151 152# Internationalization 153GETTEXT_PACKAGE="libvisual-${LIBVISUAL_VERSION_SUFFIX}" 154AC_SUBST(GETTEXT_PACKAGE) 155AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GETTEXT package name]) 156AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/share/locale", [String catalog location]) 157AM_GNU_GETTEXT([external]) 158AM_GNU_GETTEXT_VERSION([0.14.1]) 159 160dnl ------------------------------- 161dnl Check for native thread support 162dnl ------------------------------- 163 164dnl 165dnl Test program for basic POSIX threads functionality (taken from Glib) 166dnl 167m4_define([lv_thread_test],[ 168#include <pthread.h> 169int check_me = 0; 170void* func(void* data) {check_me = 42; return &check_me;} 171int main() 172 { pthread_t t; 173 void *ret; 174 pthread_create (&t, $1, func, 0); 175 pthread_join (t, &ret); 176 exit (check_me != 42 || ret != &check_me); 177}]) 178 179LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation 180 " 181 182LIBS_NOT_FOUND_2=". Please choose another thread implementation or 183 provide information on your thread implementation. 184 You can also run 'configure --disable-threads' 185 to compile without thread support." 186 187AIX_COMPILE_INFO="AIX's C compiler needs to be called by a different name, when 188 linking threaded applications. As Libvisual cannot do that 189 automatically, you will get an linkg error everytime you are 190 not using the right compiler. In that case you have to relink 191 with the right compiler. Ususally just '_r' is appended 192 to the compiler name." 193 194AC_ARG_ENABLE([enable_threads], 195 AC_HELP_STRING([--enable-threads], 196 [Turn on basic thread support @<:@default=enabled@:>@]), 197 [enable_threads=$enableval], 198 [enable_threads=yes]) 199AC_MSG_CHECKING([whether to enable thread support]) 200if test x$enable_threads = xyes; then 201 AC_MSG_RESULT([yes]) 202 have_threads=none 203 AC_MSG_CHECKING([for thread implementation available]) 204 case $host in 205 *-*-mingw*) 206 have_threads=win32 207 ;; 208 *) 209 ;; 210 esac 211 if test "x$have_threads" = xnone; then 212 AC_TRY_COMPILE([#include <pthread.h>], 213 [pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;], 214 have_threads=posix) 215 fi 216 if test "x$have_threads" = xnone; then 217 AC_TRY_COMPILE([#include <pthread.h>], 218 [pthread_mutex_t m; 219 pthread_mutex_init (&m, pthread_mutexattr_default);], 220 have_threads=dce) 221 fi 222 if test "x$have_threads" = xnone; then 223 PKG_CHECK_MODULES(GTHREAD2, gthread-2.0 >= 2.2.0, [have_gthread2="yes"], [have_gthread2="no"]) 224 if test x"$have_gthread2" = xyes; then 225 have_threads=gthread2 226 AC_SUBST(GTHREAD2_CFLAGS) 227 AC_SUBST(GTHREAD2_LIBS) 228 AC_DEFINE([LV_HAVE_GTHREAD2],[1],[glib-2.0 thread implementation available]) 229 fi 230 fi 231 # In future we will check for more thread models... 232 233 if test "x$have_threads" = xnone; then 234 AC_MSG_RESULT(none available) 235 AC_MSG_WARN([You do not have any supported thread system available. Libvisual will be built without thread support.]) 236 else 237 AC_MSG_RESULT($have_threads) 238 fi 239fi 240 241 242dnl ------------------------------------------------ 243dnl Determination of linker flags for thread support 244dnl ------------------------------------------------ 245 246LV_THREAD_LIBS="" 247if test "x$enable_threads" = xyes && test "x$have_threads" != xnone; then 248 case $have_threads in 249 posix|dce) 250 case $host in 251 *-aix*) 252 # We are not using gcc (would have set LV_THREAD_LIBS) and thus 253 # probably using the aix compiler. 254 AC_MSG_WARN($AIX_COMPILE_INFO) 255 ;; 256 *) 257 LV_THREAD_LIBS=error 258 lv_save_LIBS="$LIBS" 259 for thread_lib in "" pthread pthread32 pthreads thread dce; do 260 if test x"$thread_lib" = x; then 261 add_thread_lib="" 262 IN="" 263else 264 add_thread_lib="-l$thread_lib" 265 IN=" in -l$thread_lib" 266 fi 267 if test x"$have_threads" = xposix; then 268 defattr=0 269 else 270 defattr=pthread_attr_default 271 fi 272 273 LIBS="$add_thread_lib $lv_save_LIBS" 274 275 AC_MSG_CHECKING(for pthread_create/pthread_join$IN) 276 AC_TRY_RUN(lv_thread_test($defattr), 277 lv_result=yes, 278 lv_result=no, 279 [AC_LINK_IFELSE(lv_thread_test($defattr), 280 lv_result=yes, 281 lv_result=no)]) 282 AC_MSG_RESULT($lv_result) 283 284 if test "$lv_result" = "yes" ; then 285 LV_THREAD_LIBS="$add_thread_lib" 286 break 287 fi 288 done 289 290 if test "x$LV_THREAD_LIBS" = xerror; then 291 AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2) 292fi 293 294 LIBS="$lv_save_LIBS" 295 ;; 296 esac 297 ;; 298 gthread2) 299 LV_THREAD_LIBS="$GTHREAD2_LIBS" 300 ;; 301 *) 302 ;; 303 esac 304else 305 # Thread support disabled 306 : 307fi 308 309AC_MSG_CHECKING(thread related libraries) 310AC_MSG_RESULT($LV_THREAD_LIBS) 311AC_SUBST(LV_THREAD_LIBS) 312 313dnl -------------------------------------------------- 314dnl Determination of compiler flags for thread support 315dnl -------------------------------------------------- 316 317LV_THREAD_CFLAGS="" 318if test "x$enable_threads" = xyes && test "x$have_threads" != xnone; then 319 case $have_threads in 320 gthread2) 321 LV_THREAD_CFLAGS="$GTHREAD2_CFLAGS" 322 ;; 323 *) 324 ;; 325 esac 326fi 327AC_SUBST(LV_THREAD_CFLAGS) 328 329# check for type sizes 330AC_CHECK_SIZEOF(short) 331AC_CHECK_SIZEOF(int) 332AC_CHECK_SIZEOF(long) 333AC_CHECK_SIZEOF(size_t) 334 335dnl Try to figure out whether visual_size should be long or int 336AC_MSG_CHECKING([for the appropriate definition for size_t]) 337 338case $ac_cv_sizeof_size_t in 339$ac_cv_sizeof_short) 340 visual_size_type=short 341 ;; 342$ac_cv_sizeof_int) 343 visual_size_type=int 344 ;; 345$ac_cv_sizeof_long) 346 visual_size_type=long 347 ;; 348*) AC_MSG_ERROR([No type matching size_t in size]) 349 ;; 350esac 351 352AC_MSG_RESULT(unsigned $visual_size_type) 353 354build_subdirs="libvisual" 355 356VISUAL_PKG_CONFIG_DEP="" 357 358VISUAL_CFLAGS="" 359if test x"$LV_THREAD_CFLAGS" == xgthread2; then 360 VISUAL_PKG_CONFIG_DEP="$VISUAL_PKG_CONFIG_DEP gthread-2.0" 361elif test x"$LV_THREAD_CFLAGS" != x; then 362 VISUAL_CFLAGS=$LV_THREAD_CFLAGS 363fi 364AC_SUBST(VISUAL_PKG_CONFIG_DEP) 365 366VISUAL_LIBS="$LIBS -lvisual-${LIBVISUAL_VERSION_SUFFIX}" 367if test x"$LV_THREAD_LIBS" != x; then 368 VISUAL_LIBS="$LV_THREAD_LIBS $VISUAL_LIBS" 369fi 370AC_SUBST(VISUAL_CFLAGS) 371AC_SUBST(VISUAL_LIBS) 372 373dnl ****************************** 374dnl Arguments to specify certain features. 375dnl ****************************** 376 377dnl ****************************** 378dnl Debugging stuff 379dnl ****************************** 380DEBUG_CFLAGS="" 381AC_ARG_ENABLE([profiling], 382 AC_HELP_STRING([--enable-profiling], 383 [Enable emision of profile data to be used by gprof @<:@default=disabled@:>@]), 384 [profiling=$enableval], 385 [profiling=no]) 386AC_MSG_CHECKING([whether to enable profiling]) 387if test x$profiling = xyes; then 388 AC_MSG_RESULT([yes]) 389 if test x"$GCC" = xyes; then 390 DEBUG_CFLAGS="$DEBUG_CFLAGS -pg" 391else 392 AC_MSG_WARN([Profiling only works when using a gcc compiler.]) 393 fi 394else 395 AC_MSG_RESULT([no]) 396fi 397 398AC_ARG_ENABLE([debug], 399 AC_HELP_STRING([--enable-debug], 400 [Enable debug @<:@default=disabled@:>@]), 401 [debug=$enableval], 402 [debug=no]) 403AC_MSG_CHECKING([whether to enable debug]) 404if test x$debug = xyes; then 405 AC_MSG_RESULT([yes]) 406 if test x"$GCC" = xyes; then 407 DEBUG_CFLAGS="$DEBUG_CFLAGS -ggdb3 -Wall" 408 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-braces -Wimplicit -Wunused -Wmissing-prototypes" 409 # IMHO -Werror should be here also. --VVB 410 lv_save_CFLAGS=$CFLAGS 411 CFLAGS="$CFLAGS -Wno-unused-variable" 412 AC_MSG_CHECKING([whether gcc version is greater than 2.95]) 413 AC_TRY_COMPILE([#include <stdlib.h>], 414 [exit(0);], 415 [lv_gcc_gt_2_95=yes], 416 [lv_gcc_gt_2_95=no]) 417 CFLAGS=$lv_save_CFLAGS 418 if test x$lv_gcc_gt_2_95 = xyes ; then 419 AC_MSG_RESULT([yes]) 420 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wno-unused-variable" 421 else 422 AC_MSG_RESULT([no]) 423 fi 424 fi 425else 426 AC_MSG_RESULT([no]) 427fi 428AC_SUBST(DEBUG_CFLAGS) 429 430AC_ARG_ENABLE([extra-optimization], 431 AC_HELP_STRING([--enable-extra-optimization], 432 [Enable extra optimizations @<:@default=disabled@:>@]), 433 [extra_opt=$enableval], 434 [extra_opt=no]) 435AC_MSG_CHECKING([whether to enable extra optimizations]) 436if test x$extra_opt = xyes; then 437 AC_MSG_RESULT([yes]) 438 if test x"$GCC" = xyes; then 439 OPT_CFLAGS="-O3 -fexpensive-optimizations" 440else 441 AC_MSG_WARN([Extra optimizations only works with a gcc compiler.]) 442 fi 443else 444 AC_MSG_RESULT([no]) 445 if test x$debug = xyes && test x"$GCC" = xyes; then 446 OPT_CFLAGS="-O0" 447 else 448 OPT_CFLAGS="" 449 fi 450fi 451 452AC_ARG_ENABLE([fast-fp-rng], 453 AC_HELP_STRING([--enable-fast-fp-rng], 454 [Enable faster random floating point generator (enabled by default if --enable-extra-optimization is passed) ]), 455 [fastfprng=$enableval], 456 [fastfprng=maybe]) 457AC_MSG_CHECKING([whether to enable fast FP RNG]) 458 459if test x$fastfprng = xyes; then 460 AC_MSG_RESULT([yes]) 461elif test x$fastfprng = xmaybe; then 462 if test x$extra_opt = xyes; then 463 AC_MSG_RESULT([yes]) 464 fastfprng=yes 465 else 466 AC_MSG_RESULT([no]) 467 fastfprng=no 468 fi 469else 470 AC_MSG_RESULT([no]) 471 fastfprng=no 472fi 473 474 475#define VISUAL_RANDOM_FAST_FP_RND 1 476 477if test x$lv_mingw = xyes ; then 478OPT_CFLAGS="-mwindows" 479fi 480AC_SUBST(OPT_CFLAGS) 481 482AC_SUBST(CFLAGS, "${CFLAGS} ${DEBUG_CFLAGS} ${OPT_CFLAGS}") 483 484libs_dynamic_loader="-ldl" 485AC_SUBST(LIBS_DYNAMIC_LOADER, "$libs_dynamic_loader") 486 487dnl Installation paths 488LIBVISUAL_INCLUDE_DIR="${includedir}/libvisual-${LIBVISUAL_VERSION_SUFFIX}" 489LIBVISUAL_PLUGINS_BASE_DIR="${libdir}/libvisual-${LIBVISUAL_VERSION_SUFFIX}" 490AC_SUBST(LIBVISUAL_INCLUDE_DIR) 491AC_SUBST(LIBVISUAL_PLUGINS_BASE_DIR) 492 493dnl Output the LibVisual config file 494AC_CONFIG_COMMANDS([libvisual/lvconfig.h], 495[ 496 outfile=libvisual/lvconfig.h-tmp 497 cat > $outfile <<\_______EOF 498/* lvconfig.h 499 * 500 * This is a generated file. Please modify 'configure.ac' 501 */ 502 503#ifndef __LV_CONFIG_H__ 504#define __LV_CONFIG_H__ 505 506_______EOF 507 508 if test x$lv_have_iso_c_varargs = xyes ; then 509 cat >>$outfile <<_______EOF 510#ifndef __cplusplus 511# define LV_HAVE_ISO_VARARGS (1) 512#endif 513_______EOF 514 fi 515 516 if test x$lv_have_gnuc_varargs = xyes ; then 517 cat >>$outfile <<_______EOF 518 519/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi 520 * is passed ISO vararg support is turned off, and there is no work 521 * around to turn it on, so we unconditionally turn it off. 522 */ 523#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 524# undef LV_HAVE_ISO_VARARGS 525#endif 526 527#define LV_HAVE_GNUC_VARARGS (1) 528_______EOF 529 fi 530 531 if test x$bigendian = xyes ; then 532 cat >>$outfile <<_______EOF 533 534#define VISUAL_BIG_ENDIAN (1) 535#define VISUAL_LITTLE_ENDIAN (0) 536_______EOF 537 else 538 cat >>$outfile <<_______EOF 539 540#define VISUAL_BIG_ENDIAN (0) 541#define VISUAL_LITTLE_ENDIAN (1) 542_______EOF 543 fi 544 545 cat >>$outfile <<_______EOF 546 547typedef unsigned $visual_size_type visual_size_t; 548#define VISUAL_SIZE_T_FORMAT $visual_size_format 549_______EOF 550 551 if test x$fastfprng = xyes ; then 552 cat >>$outfile <<_______EOF 553 554#define VISUAL_RANDOM_FAST_FP_RNG (1) 555_______EOF 556 fi 557 558 if test x$lv_mips = xyes ; then 559 cat >>$outfile <<_______EOF 560 561#define VISUAL_ARCH_MIPS 562_______EOF 563 fi 564 565 if test x$lv_alpha = xyes ; then 566 cat >>$outfile <<_______EOF 567 568#define VISUAL_ARCH_ALPHA 569_______EOF 570 fi 571 572 if test x$lv_sparc = xyes ; then 573 cat >>$outfile <<_______EOF 574 575#define VISUAL_ARCH_SPARC 576_______EOF 577 fi 578 579 if test x$lv_ix86 = xyes ; then 580 cat >>$outfile <<_______EOF 581 582#define VISUAL_ARCH_X86 583_______EOF 584 fi 585 586 if test x$lv_x86_64 = xyes ; then 587 cat >>$outfile <<_______EOF 588 589#define VISUAL_ARCH_X86_64 590_______EOF 591 fi 592 593 if test x$lv_powerpc = xyes ; then 594 cat >>$outfile <<_______EOF 595 596#define VISUAL_ARCH_POWERPC 597_______EOF 598 fi 599 600 if test x$lv_arch_unknown = xyes ; then 601 cat >>$outfile <<_______EOF 602 603#define VISUAL_ARCH_UNKNOWN 604_______EOF 605 fi 606 607 if test x$lv_linux = xyes ; then 608 cat >>$outfile <<_______EOF 609 610#define VISUAL_OS_LINUX 611_______EOF 612 fi 613 614 if test x$lv_win32 = xyes ; then 615 cat >>$outfile <<_______EOF 616 617#define VISUAL_OS_WIN32 618_______EOF 619 fi 620 621 if test x$lv_hpux = xyes ; then 622 cat >>$outfile <<_______EOF 623 624#define VISUAL_OS_HPUX 625_______EOF 626 fi 627 628 if test x$lv_aix = xyes ; then 629 cat >>$outfile <<_______EOF 630 631#define VISUAL_OS_AIX 632_______EOF 633 fi 634 635 if test x$lv_beos = xyes ; then 636 cat >>$outfile <<_______EOF 637 638#define VISUAL_OS_BEOS 639_______EOF 640 fi 641 642 if test x$lv_osf = xyes ; then 643 cat >>$outfile <<_______EOF 644 645#define VISUAL_OS_OSF 646_______EOF 647 fi 648 649 if test x$lv_irix = xyes ; then 650 cat >>$outfile <<_______EOF 651 652#define VISUAL_OS_IRIX 653_______EOF 654 fi 655 656 if test x$lv_sunos = xyes ; then 657 cat >>$outfile <<_______EOF 658 659#define VISUAL_OS_SUNOS 660_______EOF 661 fi 662 663 if test x$lv_solaris = xyes ; then 664 cat >>$outfile <<_______EOF 665 666#define VISUAL_OS_SOLARIS 667_______EOF 668 fi 669 670 if test x$lv_sco = xyes ; then 671 cat >>$outfile <<_______EOF 672 673#define VISUAL_OS_SCO 674_______EOF 675 fi 676 677 if test x$lv_freebsd = xyes ; then 678 cat >>$outfile <<_______EOF 679 680#define VISUAL_OS_FREEBSD 681_______EOF 682 fi 683 684 if test x$lv_netbsd = xyes ; then 685 cat >>$outfile <<_______EOF 686 687#define VISUAL_OS_NETBSD 688_______EOF 689 fi 690 691 if test x$lv_openbsd = xyes ; then 692 cat >>$outfile <<_______EOF 693 694#define VISUAL_OS_OPENBSD 695_______EOF 696 fi 697 698 if test x$lv_darwin = xyes ; then 699 cat >>$outfile <<_______EOF 700 701#define VISUAL_OS_DARWIN 702_______EOF 703 fi 704 705 if test x$lv_os_unknown = xyes ; then 706 cat >>$outfile <<_______EOF 707 708#define VISUAL_OS_UNKNOWN 709_______EOF 710 fi 711 712 if test x$lv_cygwin = xyes ; then 713 cat >>$outfile <<_______EOF 714 715#define VISUAL_WITH_CYGWIN 716_______EOF 717 fi 718 719 if test x$lv_mingw = xyes ; then 720 cat >>$outfile <<_______EOF 721 722#define VISUAL_WITH_MINGW 723_______EOF 724 fi 725 726 if test x$lv_enable_threads = xyes && test x$lv_have_threads != xnone ; then 727 cat >>$outfile <<_______EOF 728 729#define VISUAL_HAVE_THREADS 730_______EOF 731 case $lv_have_threads in 732 win32) 733 cat >>$outfile <<_______EOF 734 735#define VISUAL_THREAD_MODEL_WIN32 736_______EOF 737 ;; 738 posix) 739 cat >>$outfile <<_______EOF 740 741#define VISUAL_THREAD_MODEL_POSIX 742_______EOF 743 ;; 744 dce) 745 cat >>$outfile <<_______EOF 746 747#define VISUAL_THREAD_MODEL_DCE 748_______EOF 749 ;; 750 gthread2) 751 cat >>$outfile <<_______EOF 752#define VISUAL_THREAD_MODEL_GTHREAD2 753_______EOF 754 ;; 755 *) 756 ;; 757 esac 758 fi 759 760echo >>$outfile 761echo >>$outfile 762echo "#endif /* LV_CONFIG_H */" >>$outfile 763echo >>$outfile 764 765 if cmp -s $outfile libvisual/lvconfig.h; then 766 AC_MSG_NOTICE([lvconfig.h is unchanged]) 767 rm -f $outfile 768 else 769 mv $outfile libvisual/lvconfig.h 770 fi 771 772],[ 773 lv_have_iso_c_varargs=$lv_have_iso_c_varargs 774 lv_have_gnuc_varargs=$lv_have_gnuc_varargs 775 visual_size_type=$visual_size_type 776 fastfprng=$fastfprng 777 lv_win32=$lv_win32 778 779 lv_mips=$lv_mips 780 lv_alpha=$lv_alpha 781 lv_sparc=$lv_sparc 782 lv_ix86=$lv_ix86 783 lv_powerpc=$lv_powerpc 784 lv_arch_unknown=$lv_arch_unknown 785 786 lv_hpux=$lv_hpux 787 lv_aix=$lv_aix 788 lv_beos=$lv_beos 789 lv_osf=$lv_osf 790 lv_irix=$lv_irix 791 lv_sunos=$lv_sunos 792 lv_solaris=$lv_solaris 793 lv_linux=$lv_linux 794 lv_sco=$lv_sco 795 lv_bsd=$lv_bsd 796 lv_darwin=$lv_darwin 797 lv_cygwin=$lv_cygwin 798 lv_mingw=$lv_mingw 799 lv_os_unknown=$lv_os_unknown 800 801 lv_have_threads=$have_threads 802 lv_enable_threads=$enable_threads 803 804case $visual_size_type in 805short) 806 visual_size_format='"hu"' 807 ;; 808int) 809 visual_size_format='"u"' 810 ;; 811long) 812 visual_size_format='"lu"' 813 ;; 814esac 815 816]) 817 818AC_CONFIG_FILES([ 819m4/Makefile 820po/Makefile.in 821Makefile 822libvisual.pc 823libvisual/Makefile 824]) 825# 826# For now this are not included in the package 827# 828#tests/Makefile 829#tools/Makefile 830 831AC_OUTPUT 832 833plugins_base_dir=`eval echo \`eval echo ${LIBVISUAL_PLUGINS_BASE_DIR}\`` 834 835echo " 836===================================================================== 837LIBVISUAL, AN AUDIO VISUALISATION ABSTRACTION LIBRARY, VERSION $VERSION 838===================================================================== 839 840install path : ${prefix}/lib 841plugins base directory : $plugins_base_dir 842compiler : ${CC} 843debug enabled : ${debug} 844" 845