comparison configure.in @ 193:f53b5ca2e663 r20-3b23

Import from CVS: tag r20-3b23
author cvs
date Mon, 13 Aug 2007 09:58:30 +0200
parents b405438285a2
children acd284d43ca1
comparison
equal deleted inserted replaced
192:9d35321dd38c 193:f53b5ca2e663
2385 2385
2386 dnl Autodetect -lXbsd 2386 dnl Autodetect -lXbsd
2387 dnl #### Someone, please add a better function than main 2387 dnl #### Someone, please add a better function than main
2388 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) 2388 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
2389 2389
2390 dnl Autodetect -lXaw
2391 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
2392 if test "$have_xaw" = "yes"; then
2393 AC_CHECK_HEADER(X11/Xaw/Reports.h, [
2394 XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR)
2395 XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)])
2396 fi
2397
2398 fi dnl $with_x11 = yes 2390 fi dnl $with_x11 = yes
2399 2391
2400 test -z "$window_system" && window_system="none" 2392 test -z "$window_system" && window_system="none"
2401 2393
2402 if test "$window_system" = "none" ; then 2394 if test "$window_system" = "none" ; then
2489 XE_PREPEND(-lDtSvc, libs_x) 2481 XE_PREPEND(-lDtSvc, libs_x)
2490 with_tooltalk=yes # CDE requires Tooltalk 2482 with_tooltalk=yes # CDE requires Tooltalk
2491 need_motif=yes # CDE requires Motif 2483 need_motif=yes # CDE requires Motif
2492 fi 2484 fi
2493 2485
2494 dnl if Energize specified, make sure we can find its need libraries/headers 2486 dnl if Energize specified, make sure we can find its libraries/headers
2495 if test "$with_energize" = "yes" ; then 2487 if test "$with_energize" = "yes" ; then
2496 AC_DEFINE(ENERGIZE) 2488 AC_DEFINE(ENERGIZE)
2497 AC_CHECK_LIB(energize, main, [ 2489 AC_CHECK_LIB(energize, main, [
2498 XE_PREPEND(-lenergize, LIBS) 2490 XE_PREPEND(-lenergize, LIBS)
2499 energize_version="3.X" 2491 energize_version="3.X"
2510 2502
2511 test "$energize_version" = "2.X" && AC_DEFINE(ENERGIZE_2) 2503 test "$energize_version" = "2.X" && AC_DEFINE(ENERGIZE_2)
2512 test "$energize_version" = "3.X" && AC_DEFINE(ENERGIZE_3) 2504 test "$energize_version" = "3.X" && AC_DEFINE(ENERGIZE_3)
2513 fi 2505 fi
2514 2506
2515 dnl ------------------ 2507 dnl ----------------------
2516 dnl Graphics libraries 2508 dnl X11 Graphics libraries
2517 dnl ------------------ 2509 dnl ----------------------
2518 2510
2519 AC_CHECKING(for graphics libraries) 2511 if test "$with_x11" = "yes"; then
2520 dnl Built-in GIF support defaults to yes 2512
2521 test -z "$with_gif" && with_gif=yes; 2513 AC_CHECKING(for X11 graphics libraries)
2522 if test "$with_gif" = "yes"; then 2514 dnl Built-in GIF support defaults to yes
2523 AC_DEFINE(HAVE_GIF) 2515 test -z "$with_gif" && with_gif=yes;
2524 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o) 2516 if test "$with_gif" = "yes"; then
2525 fi 2517 AC_DEFINE(HAVE_GIF)
2526 2518 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o)
2527 dnl Autodetect Xpm 2519 fi
2528 AC_MSG_CHECKING(for Xpm - no older than 3.4f) 2520
2529 xe_check_libs=-lXpm 2521 dnl Autodetect Xpm
2530 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h> 2522 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
2531 int main(int c, char **v) { 2523 xe_check_libs=-lXpm
2532 return c == 1 ? 0 : 2524 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h>
2533 XpmIncludeVersion != XpmLibraryVersion() ? 1 : 2525 int main(int c, char **v) {
2534 XpmIncludeVersion < 30406 ? 2 : 2526 return c == 1 ? 0 :
2535 0 ; 2527 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
2536 }], [./conftest foobar; xpm_status=$?; 2528 XpmIncludeVersion < 30406 ? 2 :
2537 if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;], 2529 0 ;
2538 with_xpm=no, with_xpm=no) 2530 }], [./conftest foobar; xpm_status=$?;
2539 } 2531 if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;],
2540 xe_check_libs= 2532 with_xpm=no, with_xpm=no)
2541 AC_MSG_RESULT($with_xpm) 2533 }
2542 if test "$xpm_status" = "1" -o "$xpm_status" = "2"; then 2534 xe_check_libs=
2543 test "$xpm_status" = "1" && problem="Xpm library version and header file version don't match!" 2535 AC_MSG_RESULT($with_xpm)
2544 test "$xpm_status" = "2" && problem="Xpm library version is too old!" 2536 if test "$xpm_status" = "1" -o "$xpm_status" = "2"; then
2545 echo " 2537 test "$xpm_status" = "1" && problem="Xpm library version and header file version don't match!"
2546 *** WARNING *** $problem 2538 test "$xpm_status" = "2" && problem="Xpm library version is too old!"
2547 I'm not touching that with a 10-foot pole! 2539 echo "
2548 If you really want to use the installed version of Xpm, rerun 2540 *** WARNING *** $problem
2549 configure --with-xpm=yes, but don't blame me if XEmacs crashes! 2541 I'm not touching that with a 10-foot pole!
2550 " 2542 If you really want to use the installed version of Xpm, rerun
2551 fi 2543 configure --with-xpm=yes, but don't blame me if XEmacs crashes!
2552 if test "$with_xpm" = "yes"; then 2544 "
2553 AC_DEFINE(HAVE_XPM) 2545 fi
2554 XE_PREPEND(-lXpm, libs_x) 2546 if test "$with_xpm" = "yes"; then
2555 fi 2547 AC_DEFINE(HAVE_XPM)
2556 2548 XE_PREPEND(-lXpm, libs_x)
2557 dnl Autodetect XFACE 2549 fi
2558 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } 2550
2559 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } 2551 dnl Autodetect XFACE
2560 test -z "$with_xface" && with_xface=yes 2552 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
2561 if test "$with_xface" = "yes"; then 2553 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
2562 AC_DEFINE(HAVE_XFACE) 2554 test -z "$with_xface" && with_xface=yes
2563 XE_PREPEND(-lcompface, libs_x) 2555 if test "$with_xface" = "yes"; then
2564 fi 2556 AC_DEFINE(HAVE_XFACE)
2565 2557 XE_PREPEND(-lcompface, libs_x)
2566 dnl autodetect JPEG 2558 fi
2567 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } 2559
2568 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } 2560 dnl autodetect JPEG
2569 test -z "$with_jpeg" && with_jpeg=yes 2561 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
2570 if test "$with_jpeg" = "yes"; then 2562 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
2571 AC_DEFINE(HAVE_JPEG) 2563 test -z "$with_jpeg" && with_jpeg=yes
2572 XE_PREPEND(-ljpeg, libs_x) 2564 if test "$with_jpeg" = "yes"; then
2573 fi 2565 AC_DEFINE(HAVE_JPEG)
2574 2566 XE_PREPEND(-ljpeg, libs_x)
2575 dnl autodetect PNG 2567 fi
2576 test -z "$with_png" && { AC_CHECK_HEADER(png.h, , with_png=no) } 2568
2577 test -z "$with_png" && { AC_CHECK_FUNC(pow, , with_png=no) } 2569 dnl autodetect PNG
2578 if test "$with_png" != "no"; then 2570 test -z "$with_png" && { AC_CHECK_HEADER(png.h, , with_png=no) }
2579 for extra_libs in "" "-lz" "-lgz"; do 2571 test -z "$with_png" && { AC_CHECK_FUNC(pow, , with_png=no) }
2580 AC_CHECK_LIB(png, png_read_image, 2572 if test "$with_png" != "no"; then
2581 png_libs="-lpng $extra_libs" with_png=yes; break,[:],$extra_libs) 2573 for extra_libs in "" "-lz" "-lgz"; do
2582 done 2574 AC_CHECK_LIB(png, png_read_image,
2583 fi 2575 png_libs="-lpng $extra_libs" with_png=yes; break,[:],$extra_libs)
2584 test -z "$with_png" && with_png=no 2576 done
2585 if test "$with_png" = "yes"; then 2577 fi
2586 AC_DEFINE(HAVE_PNG) 2578 test -z "$with_png" && with_png=no
2587 XE_PREPEND($png_libs, libs_x) 2579 if test "$with_png" = "yes"; then
2588 fi 2580 AC_DEFINE(HAVE_PNG)
2589 2581 XE_PREPEND($png_libs, libs_x)
2590 dnl autodetect TIFF (not yet implemented) 2582 fi
2591 if test "$with_tiff" = "yes"; then 2583
2592 AC_DEFINE(HAVE_TIFF) 2584 dnl autodetect TIFF (not yet implemented)
2593 XE_PREPEND(-ltiff, libs_x) 2585 if test "$with_tiff" = "yes"; then
2594 fi 2586 AC_DEFINE(HAVE_TIFF)
2595 2587 XE_PREPEND(-ltiff, libs_x)
2596 dnl autodetect Motif - but only add to libs_x later (if necessary) 2588 fi
2589
2590 dnl Autodetect -lXaw
2591 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
2592 if test "$have_xaw" = "yes"; then
2593 AC_CHECK_HEADER(X11/Xaw/Reports.h, [
2594 XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR)
2595 XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)])
2596 fi
2597
2598 dnl autodetect Motif - but only add to libs_x later (if necessary)
2597 AC_CHECK_HEADER(Xm/Xm.h, 2599 AC_CHECK_HEADER(Xm/Xm.h,
2598 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], 2600 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
2599 have_motif=no) 2601 have_motif=no)
2602
2603 fi dnl "$with_x11" = "yes"
2600 2604
2601 dnl Finish ensuring that we have values for the various toolkit items. 2605 dnl Finish ensuring that we have values for the various toolkit items.
2602 dnl Not all toolkits support all widgets 2606 dnl Not all toolkits support all widgets
2603 dnl if Motif is available we use it for the dialog boxes. 2607 dnl if Motif is available we use it for the dialog boxes.
2604 2608