comparison configure.in @ 81403:b783923335c9

Check for all image libraries before exiting.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 14 Jun 2007 06:56:14 +0000
parents 47206e899ad1
children 6410d179cb23 9c01792a3ce8 3619e7770f2e
comparison
equal deleted inserted replaced
81402:ab07b2466b71 81403:b783923335c9
88 n | no ) val=no ;; 88 n | no ) val=no ;;
89 l | lu | luc | luci | lucid ) val=lucid ;; 89 l | lu | luc | luci | lucid ) val=lucid ;;
90 a | at | ath | athe | athen | athena ) val=athena ;; 90 a | at | ath | athe | athen | athena ) val=athena ;;
91 m | mo | mot | moti | motif ) val=motif ;; 91 m | mo | mot | moti | motif ) val=motif ;;
92 g | gt | gtk ) val=gtk ;; 92 g | gt | gtk ) val=gtk ;;
93 dnl These don't currently work.
94 dnl o | op | ope | open | open- | open-l | open-lo \
95 dnl | open-loo | open-look ) val=open-look ;;
96 * ) 93 * )
97 dnl AC_MSG_ERROR([the `--with-x-toolkit' option is supposed to have a value
98 dnl which is `yes', `no', `lucid', `athena', `motif' or `open-look'.])
99 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; 94 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid;
100 this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. 95 this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'.
101 `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) 96 `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.])
102 ;; 97 ;;
103 esac 98 esac
2460 2455
2461 if test "${HAVE_XPM}" = "yes"; then 2456 if test "${HAVE_XPM}" = "yes"; then
2462 AC_MSG_RESULT(yes) 2457 AC_MSG_RESULT(yes)
2463 else 2458 else
2464 AC_MSG_RESULT(no) 2459 AC_MSG_RESULT(no)
2465 AC_MSG_ERROR([libXpm is required, but I didn't find it.
2466 Maybe some development libraries/packages are missing?
2467 Use --with-xpm=no if you don't wan't to link with libXpm])
2468 fi 2460 fi
2469 fi 2461 fi
2470 fi 2462 fi
2471 2463
2472 if test "${HAVE_XPM}" = "yes"; then 2464 if test "${HAVE_XPM}" = "yes"; then
2480 if test "${with_jpeg}" != "no"; then 2472 if test "${with_jpeg}" != "no"; then
2481 dnl Checking for jpeglib.h can lose because of a redefinition of 2473 dnl Checking for jpeglib.h can lose because of a redefinition of
2482 dnl HAVE_STDLIB_H. 2474 dnl HAVE_STDLIB_H.
2483 AC_CHECK_HEADER(jerror.h, 2475 AC_CHECK_HEADER(jerror.h,
2484 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) 2476 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes))
2485 if test "${HAVE_JPEG}" != "yes"; then
2486 AC_MSG_ERROR([libjpeg is required, but I didn't find it.
2487 Maybe some development libraries/packages are missing?
2488 Use --with-jpeg=no if you don't wan't to link with libjpeg])
2489 fi
2490 fi 2477 fi
2491 2478
2492 AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl 2479 AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
2493 if test "${HAVE_JPEG}" = "yes"; then 2480 if test "${HAVE_JPEG}" = "yes"; then
2494 AC_DEFINE(HAVE_JPEG) 2481 AC_DEFINE(HAVE_JPEG)
2510 # in /usr/include/libpng. 2497 # in /usr/include/libpng.
2511 AC_CHECK_HEADERS(png.h libpng/png.h) 2498 AC_CHECK_HEADERS(png.h libpng/png.h)
2512 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then 2499 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
2513 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm) 2500 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
2514 fi 2501 fi
2515 if test "${HAVE_PNG}" != "yes"; then
2516 AC_MSG_ERROR([libpng is required, but I didn't find it.
2517 Maybe some development libraries/packages are missing?
2518 Use --with-png=no if you don't wan't to link with libpng])
2519 fi
2520 fi 2502 fi
2521 2503
2522 if test "${HAVE_PNG}" = "yes"; then 2504 if test "${HAVE_PNG}" = "yes"; then
2523 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) 2505 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
2524 fi 2506 fi
2531 AC_CHECK_HEADER(tiffio.h, 2513 AC_CHECK_HEADER(tiffio.h,
2532 tifflibs="-lz -lm" 2514 tifflibs="-lz -lm"
2533 # At least one tiff package requires the jpeg library. 2515 # At least one tiff package requires the jpeg library.
2534 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi 2516 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
2535 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs)) 2517 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs))
2536 if test "${HAVE_TIFF}" != "yes"; then
2537 AC_MSG_ERROR([libtiff is required, but I didn't find it.
2538 Maybe some development libraries/packages are missing?
2539 Use --with-tiff=no if you don't wan't to link with libtiff])
2540 fi
2541 fi 2518 fi
2542 2519
2543 if test "${HAVE_TIFF}" = "yes"; then 2520 if test "${HAVE_TIFF}" = "yes"; then
2544 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) 2521 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
2545 fi 2522 fi
2567 fi 2544 fi
2568 fi 2545 fi
2569 2546
2570 if test "${HAVE_GIF}" = "yes"; then 2547 if test "${HAVE_GIF}" = "yes"; then
2571 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif library (default -lungif; otherwise specify with LIBGIF).]) 2548 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif library (default -lungif; otherwise specify with LIBGIF).])
2572 else 2549 fi
2573 AC_MSG_ERROR([libgif or libungif is required, but I didn't find it. 2550 fi
2551
2552 dnl Check for required libraries.
2553 if test "${HAVE_X11}" = "yes"; then
2554 MISSING=""
2555 WITH_NO=""
2556 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
2557 MISSING="libXpm" && WITH_NO="--with-xpm=no"
2558 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
2559 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
2560 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
2561 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
2562 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
2563 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
2564 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
2565 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
2566
2567 if test "X${MISSING}" != X; then
2568 AC_MSG_ERROR([The following required libraries was not found:
2569 $MISSING
2574 Maybe some development libraries/packages are missing? 2570 Maybe some development libraries/packages are missing?
2575 Use --with-gif=no if you don't wan't to link with libgif/ungif]) 2571 If you don't want to link with them give
2572 $WITH_NO
2573 as options to configure])
2576 fi 2574 fi
2577 fi 2575 fi
2578 2576
2579 ### Use -lgpm if available, unless `--with-gpm=no'. 2577 ### Use -lgpm if available, unless `--with-gpm=no'.
2580 HAVE_GPM=no 2578 HAVE_GPM=no
3016 AC_DEFINE(REL_ALLOC, 1, 3014 AC_DEFINE(REL_ALLOC, 1,
3017 [Define REL_ALLOC if you want to use the relocating allocator for 3015 [Define REL_ALLOC if you want to use the relocating allocator for
3018 buffer space.]) 3016 buffer space.])
3019 fi 3017 fi
3020 3018
3019
3021 AH_TOP([/* GNU Emacs site configuration template file. 3020 AH_TOP([/* GNU Emacs site configuration template file.
3022 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 3021 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
3023 Free Software Foundation, Inc. 3022 Free Software Foundation, Inc.
3024 3023
3025 This file is part of GNU Emacs. 3024 This file is part of GNU Emacs.