aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-07-17 06:17:29 -0400
committerGlenn Morris2012-07-17 06:17:29 -0400
commit5476a9a481cf3dfd3c986dedae55bb70156af171 (patch)
tree61b3a8cbbc5d40e3c4e3a38bf2882bcf017a24b4
parentcce7fefcabe5794120d08714cbef6bba0c264226 (diff)
downloademacs-5476a9a481cf3dfd3c986dedae55bb70156af171.tar.gz
emacs-5476a9a481cf3dfd3c986dedae55bb70156af171.zip
Auto-commit of generated files.
-rwxr-xr-xautogen/configure15106
1 files changed, 7562 insertions, 7544 deletions
diff --git a/autogen/configure b/autogen/configure
index a3199365f01..784b10593aa 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -591,8 +591,8 @@ ac_includes_default="\
591# include <unistd.h> 591# include <unistd.h>
592#endif" 592#endif"
593 593
594ac_func_list=
595ac_header_list= 594ac_header_list=
595ac_func_list=
596gl_getopt_required=POSIX 596gl_getopt_required=POSIX
597gl_getopt_required=POSIX 597gl_getopt_required=POSIX
598ac_subst_vars='gltests_LTLIBOBJS 598ac_subst_vars='gltests_LTLIBOBJS
@@ -607,118 +607,6 @@ SUBDIR_MAKEFILES_IN
607LIB_GCC 607LIB_GCC
608LD_FIRSTFLAG 608LD_FIRSTFLAG
609LD_SWITCH_SYSTEM_TEMACS 609LD_SWITCH_SYSTEM_TEMACS
610POST_ALLOC_OBJ
611PRE_ALLOC_OBJ
612CYGWIN_OBJ
613RALLOC_OBJ
614OLDXMENU_DEPS
615LIBX_OTHER
616LIBXMENU
617OLDXMENU
618OLDXMENU_TARGET
619LIBXT_OTHER
620TOOLKIT_LIBW
621WIDGET_OBJ
622XOBJ
623XMENU_OBJ
624FONT_OBJ
625OTHER_FILES
626GNU_OBJC_CFLAGS
627ns_appsrc
628ns_appresdir
629ns_appbindir
630ns_appdir
631S_FILE
632X_TOOLKIT_TYPE
633GNUSTEP_CFLAGS
634C_SWITCH_X_SITE
635LD_SWITCH_X_SITE
636gameuser
637gamedir
638bitmapdir
639archlibdir
640etcdir
641x_default_search_path
642lisppath
643locallisppath
644standardlisppath
645leimdir
646lispdir
647srcdir
648canonical
649configuration
650version
651KRB4LIB
652DESLIB
653KRB5LIB
654CRYPTOLIB
655COM_ERRLIB
656LIBRESOLV
657LIBHESIOD
658TERMCAP_OBJ
659LIBS_TERMCAP
660BLESSMAIL_TARGET
661LIBS_MAIL
662liblockfile
663LIBXML2_LIBS
664LIBXML2_CFLAGS
665LIBXSM
666LIBGPM
667LIBGIF
668LIBTIFF
669LIBPNG
670LIBJPEG
671LIBXPM
672M17N_FLT_LIBS
673M17N_FLT_CFLAGS
674LIBOTF_LIBS
675LIBOTF_CFLAGS
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678XFT_LIBS
679XFT_CFLAGS
680FONTCONFIG_LIBS
681FONTCONFIG_CFLAGS
682LIBXMU
683LIBXTR6
684LIBGNUTLS_LIBS
685LIBGNUTLS_CFLAGS
686LIBSELINUX_LIBS
687SETTINGS_LIBS
688SETTINGS_CFLAGS
689GCONF_LIBS
690GCONF_CFLAGS
691GSETTINGS_LIBS
692GSETTINGS_CFLAGS
693DBUS_OBJ
694DBUS_LIBS
695DBUS_CFLAGS
696GTK_OBJ
697GTK_LIBS
698GTK_CFLAGS
699IMAGEMAGICK_LIBS
700IMAGEMAGICK_CFLAGS
701RSVG_LIBS
702RSVG_CFLAGS
703LIB_PTHREAD
704VMLIMIT_OBJ
705GMALLOC_OBJ
706HAVE_XSERVER
707LIB_STANDARD
708NS_OBJC_OBJ
709NS_OBJ
710ns_self_contained
711INSTALL_ARCH_INDEP_EXTRA
712TEMACS_LDFLAGS2
713LD_SWITCH_X_SITE_RPATH
714XMKMF
715DEPFLAGS
716MKDEPDIR
717CFLAGS_SOUND
718ALSA_LIBS
719ALSA_CFLAGS
720LIBSOUND
721PKG_CONFIG
722LIBGNU_LTLIBDEPS 610LIBGNU_LTLIBDEPS
723LIBGNU_LIBDEPS 611LIBGNU_LIBDEPS
724gltests_WITNESS 612gltests_WITNESS
@@ -1210,6 +1098,118 @@ ALLOCA_H
1210ALLOCA 1098ALLOCA
1211GL_COND_LIBTOOL_FALSE 1099GL_COND_LIBTOOL_FALSE
1212GL_COND_LIBTOOL_TRUE 1100GL_COND_LIBTOOL_TRUE
1101POST_ALLOC_OBJ
1102PRE_ALLOC_OBJ
1103CYGWIN_OBJ
1104RALLOC_OBJ
1105OLDXMENU_DEPS
1106LIBX_OTHER
1107LIBXMENU
1108OLDXMENU
1109OLDXMENU_TARGET
1110LIBXT_OTHER
1111TOOLKIT_LIBW
1112WIDGET_OBJ
1113XOBJ
1114XMENU_OBJ
1115FONT_OBJ
1116OTHER_FILES
1117GNU_OBJC_CFLAGS
1118ns_appsrc
1119ns_appresdir
1120ns_appbindir
1121ns_appdir
1122S_FILE
1123X_TOOLKIT_TYPE
1124GNUSTEP_CFLAGS
1125C_SWITCH_X_SITE
1126LD_SWITCH_X_SITE
1127gameuser
1128gamedir
1129bitmapdir
1130archlibdir
1131etcdir
1132x_default_search_path
1133lisppath
1134locallisppath
1135standardlisppath
1136leimdir
1137lispdir
1138srcdir
1139canonical
1140configuration
1141version
1142KRB4LIB
1143DESLIB
1144KRB5LIB
1145CRYPTOLIB
1146COM_ERRLIB
1147LIBRESOLV
1148LIBHESIOD
1149TERMCAP_OBJ
1150LIBS_TERMCAP
1151BLESSMAIL_TARGET
1152LIBS_MAIL
1153liblockfile
1154LIBXML2_LIBS
1155LIBXML2_CFLAGS
1156LIBXSM
1157LIBGPM
1158LIBGIF
1159LIBTIFF
1160LIBPNG
1161LIBJPEG
1162LIBXPM
1163M17N_FLT_LIBS
1164M17N_FLT_CFLAGS
1165LIBOTF_LIBS
1166LIBOTF_CFLAGS
1167FREETYPE_LIBS
1168FREETYPE_CFLAGS
1169XFT_LIBS
1170XFT_CFLAGS
1171FONTCONFIG_LIBS
1172FONTCONFIG_CFLAGS
1173LIBXMU
1174LIBXTR6
1175LIBGNUTLS_LIBS
1176LIBGNUTLS_CFLAGS
1177LIBSELINUX_LIBS
1178SETTINGS_LIBS
1179SETTINGS_CFLAGS
1180GCONF_LIBS
1181GCONF_CFLAGS
1182GSETTINGS_LIBS
1183GSETTINGS_CFLAGS
1184DBUS_OBJ
1185DBUS_LIBS
1186DBUS_CFLAGS
1187GTK_OBJ
1188GTK_LIBS
1189GTK_CFLAGS
1190IMAGEMAGICK_LIBS
1191IMAGEMAGICK_CFLAGS
1192RSVG_LIBS
1193RSVG_CFLAGS
1194LIB_PTHREAD
1195VMLIMIT_OBJ
1196GMALLOC_OBJ
1197HAVE_XSERVER
1198LIB_STANDARD
1199NS_OBJC_OBJ
1200NS_OBJ
1201ns_self_contained
1202INSTALL_ARCH_INDEP_EXTRA
1203TEMACS_LDFLAGS2
1204LD_SWITCH_X_SITE_RPATH
1205XMKMF
1206DEPFLAGS
1207MKDEPDIR
1208CFLAGS_SOUND
1209ALSA_LIBS
1210ALSA_CFLAGS
1211LIBSOUND
1212PKG_CONFIG
1213CRT_DIR 1213CRT_DIR
1214START_FILES 1214START_FILES
1215LIB_MATH 1215LIB_MATH
@@ -2501,6 +2501,92 @@ $as_echo "$ac_res" >&6; }
2501 2501
2502} # ac_fn_c_check_decl 2502} # ac_fn_c_check_decl
2503 2503
2504# ac_fn_c_check_header_preproc LINENO HEADER VAR
2505# ----------------------------------------------
2506# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2507ac_fn_c_check_header_preproc ()
2508{
2509 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2511$as_echo_n "checking for $2... " >&6; }
2512if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2513 $as_echo_n "(cached) " >&6
2514else
2515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516/* end confdefs.h. */
2517#include <$2>
2518_ACEOF
2519if ac_fn_c_try_cpp "$LINENO"; then :
2520 eval "$3=yes"
2521else
2522 eval "$3=no"
2523fi
2524rm -f conftest.err conftest.$ac_ext
2525fi
2526eval ac_res=\$$3
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2528$as_echo "$ac_res" >&6; }
2529 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2530
2531} # ac_fn_c_check_header_preproc
2532
2533# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2534# ----------------------------------------------------
2535# Tries to find if the field MEMBER exists in type AGGR, after including
2536# INCLUDES, setting cache variable VAR accordingly.
2537ac_fn_c_check_member ()
2538{
2539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2541$as_echo_n "checking for $2.$3... " >&6; }
2542if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2543 $as_echo_n "(cached) " >&6
2544else
2545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546/* end confdefs.h. */
2547$5
2548int
2549main ()
2550{
2551static $2 ac_aggr;
2552if (ac_aggr.$3)
2553return 0;
2554 ;
2555 return 0;
2556}
2557_ACEOF
2558if ac_fn_c_try_compile "$LINENO"; then :
2559 eval "$4=yes"
2560else
2561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h. */
2563$5
2564int
2565main ()
2566{
2567static $2 ac_aggr;
2568if (sizeof ac_aggr.$3)
2569return 0;
2570 ;
2571 return 0;
2572}
2573_ACEOF
2574if ac_fn_c_try_compile "$LINENO"; then :
2575 eval "$4=yes"
2576else
2577 eval "$4=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582fi
2583eval ac_res=\$$4
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2585$as_echo "$ac_res" >&6; }
2586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2587
2588} # ac_fn_c_check_member
2589
2504# ac_fn_c_check_func LINENO FUNC VAR 2590# ac_fn_c_check_func LINENO FUNC VAR
2505# ---------------------------------- 2591# ----------------------------------
2506# Tests whether FUNC exists, setting the cache variable VAR accordingly 2592# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2568,62 +2654,59 @@ $as_echo "$ac_res" >&6; }
2568 2654
2569} # ac_fn_c_check_func 2655} # ac_fn_c_check_func
2570 2656
2571# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 2657# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2572# ---------------------------------------------------- 2658# -------------------------------------------
2573# Tries to find if the field MEMBER exists in type AGGR, after including 2659# Tests whether TYPE exists after having included INCLUDES, setting cache
2574# INCLUDES, setting cache variable VAR accordingly. 2660# variable VAR accordingly.
2575ac_fn_c_check_member () 2661ac_fn_c_check_type ()
2576{ 2662{
2577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 2664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2579$as_echo_n "checking for $2.$3... " >&6; } 2665$as_echo_n "checking for $2... " >&6; }
2580if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : 2666if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2581 $as_echo_n "(cached) " >&6 2667 $as_echo_n "(cached) " >&6
2582else 2668else
2669 eval "$3=no"
2583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2584/* end confdefs.h. */ 2671/* end confdefs.h. */
2585$5 2672$4
2586int 2673int
2587main () 2674main ()
2588{ 2675{
2589static $2 ac_aggr; 2676if (sizeof ($2))
2590if (ac_aggr.$3) 2677 return 0;
2591return 0;
2592 ; 2678 ;
2593 return 0; 2679 return 0;
2594} 2680}
2595_ACEOF 2681_ACEOF
2596if ac_fn_c_try_compile "$LINENO"; then : 2682if ac_fn_c_try_compile "$LINENO"; then :
2597 eval "$4=yes"
2598else
2599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h. */ 2684/* end confdefs.h. */
2601$5 2685$4
2602int 2686int
2603main () 2687main ()
2604{ 2688{
2605static $2 ac_aggr; 2689if (sizeof (($2)))
2606if (sizeof ac_aggr.$3) 2690 return 0;
2607return 0;
2608 ; 2691 ;
2609 return 0; 2692 return 0;
2610} 2693}
2611_ACEOF 2694_ACEOF
2612if ac_fn_c_try_compile "$LINENO"; then : 2695if ac_fn_c_try_compile "$LINENO"; then :
2613 eval "$4=yes" 2696
2614else 2697else
2615 eval "$4=no" 2698 eval "$3=yes"
2616fi 2699fi
2617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2618fi 2701fi
2619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620fi 2703fi
2621eval ac_res=\$$4 2704eval ac_res=\$$3
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2623$as_echo "$ac_res" >&6; } 2706$as_echo "$ac_res" >&6; }
2624 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} 2707 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2625 2708
2626} # ac_fn_c_check_member 2709} # ac_fn_c_check_type
2627 2710
2628# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 2711# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2629# -------------------------------------------- 2712# --------------------------------------------
@@ -2802,89 +2885,6 @@ rm -f conftest.val
2802 as_fn_set_status $ac_retval 2885 as_fn_set_status $ac_retval
2803 2886
2804} # ac_fn_c_compute_int 2887} # ac_fn_c_compute_int
2805
2806# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2807# -------------------------------------------
2808# Tests whether TYPE exists after having included INCLUDES, setting cache
2809# variable VAR accordingly.
2810ac_fn_c_check_type ()
2811{
2812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2814$as_echo_n "checking for $2... " >&6; }
2815if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 eval "$3=no"
2819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h. */
2821$4
2822int
2823main ()
2824{
2825if (sizeof ($2))
2826 return 0;
2827 ;
2828 return 0;
2829}
2830_ACEOF
2831if ac_fn_c_try_compile "$LINENO"; then :
2832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2833/* end confdefs.h. */
2834$4
2835int
2836main ()
2837{
2838if (sizeof (($2)))
2839 return 0;
2840 ;
2841 return 0;
2842}
2843_ACEOF
2844if ac_fn_c_try_compile "$LINENO"; then :
2845
2846else
2847 eval "$3=yes"
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853eval ac_res=\$$3
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2855$as_echo "$ac_res" >&6; }
2856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2857
2858} # ac_fn_c_check_type
2859
2860# ac_fn_c_check_header_preproc LINENO HEADER VAR
2861# ----------------------------------------------
2862# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2863ac_fn_c_check_header_preproc ()
2864{
2865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2867$as_echo_n "checking for $2... " >&6; }
2868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h. */
2873#include <$2>
2874_ACEOF
2875if ac_fn_c_try_cpp "$LINENO"; then :
2876 eval "$3=yes"
2877else
2878 eval "$3=no"
2879fi
2880rm -f conftest.err conftest.$ac_ext
2881fi
2882eval ac_res=\$$3
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2884$as_echo "$ac_res" >&6; }
2885 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2886
2887} # ac_fn_c_check_header_preproc
2888cat >config.log <<_ACEOF 2888cat >config.log <<_ACEOF
2889This file contains any messages produced by compilers while 2889This file contains any messages produced by compilers while
2890running configure, to aid debugging if configure makes a mistake. 2890running configure, to aid debugging if configure makes a mistake.
@@ -3168,25 +3168,43 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
3168 >$cache_file 3168 >$cache_file
3169fi 3169fi
3170 3170
3171as_fn_append ac_func_list " readlinkat" 3171as_fn_append ac_header_list " linux/version.h"
3172as_fn_append ac_header_list " sys/systeminfo.h"
3173as_fn_append ac_header_list " stdio_ext.h"
3174as_fn_append ac_header_list " fcntl.h"
3175as_fn_append ac_header_list " coff.h"
3176as_fn_append ac_header_list " pty.h"
3177as_fn_append ac_header_list " sys/vlimit.h"
3178as_fn_append ac_header_list " sys/resource.h"
3179as_fn_append ac_header_list " sys/utsname.h"
3180as_fn_append ac_header_list " pwd.h"
3181as_fn_append ac_header_list " utmp.h"
3182as_fn_append ac_header_list " dirent.h"
3183as_fn_append ac_header_list " util.h"
3184as_fn_append ac_header_list " sys/socket.h"
3185as_fn_append ac_header_list " stdlib.h"
3186as_fn_append ac_header_list " unistd.h"
3172as_fn_append ac_header_list " sys/param.h" 3187as_fn_append ac_header_list " sys/param.h"
3188as_fn_append ac_header_list " pthread.h"
3189as_fn_append ac_header_list " malloc/malloc.h"
3190as_fn_append ac_header_list " maillock.h"
3191as_fn_append ac_header_list " sys/un.h"
3192as_fn_append ac_func_list " tzset"
3193as_fn_append ac_func_list " readlinkat"
3173gl_getopt_required=GNU 3194gl_getopt_required=GNU
3174as_fn_append ac_header_list " getopt.h" 3195as_fn_append ac_header_list " getopt.h"
3175as_fn_append ac_func_list " gettimeofday" 3196as_fn_append ac_func_list " gettimeofday"
3176as_fn_append ac_func_list " nanotime" 3197as_fn_append ac_func_list " nanotime"
3177as_fn_append ac_header_list " sys/time.h" 3198as_fn_append ac_header_list " sys/time.h"
3178as_fn_append ac_header_list " sys/socket.h"
3179as_fn_append ac_header_list " wchar.h" 3199as_fn_append ac_header_list " wchar.h"
3180as_fn_append ac_header_list " stdint.h" 3200as_fn_append ac_header_list " stdint.h"
3181as_fn_append ac_header_list " inttypes.h" 3201as_fn_append ac_header_list " inttypes.h"
3182as_fn_append ac_func_list " lstat" 3202as_fn_append ac_func_list " lstat"
3183as_fn_append ac_header_list " unistd.h"
3184as_fn_append ac_func_list " alarm" 3203as_fn_append ac_func_list " alarm"
3185as_fn_append ac_header_list " sys/select.h" 3204as_fn_append ac_header_list " sys/select.h"
3186as_fn_append ac_func_list " pselect" 3205as_fn_append ac_func_list " pselect"
3187as_fn_append ac_func_list " pthread_sigmask" 3206as_fn_append ac_func_list " pthread_sigmask"
3188as_fn_append ac_func_list " readlink" 3207as_fn_append ac_func_list " readlink"
3189as_fn_append ac_func_list " tzset"
3190as_fn_append ac_func_list " strtoimax" 3208as_fn_append ac_func_list " strtoimax"
3191as_fn_append ac_func_list " strtoumax" 3209as_fn_append ac_func_list " strtoumax"
3192as_fn_append ac_func_list " symlink" 3210as_fn_append ac_func_list " symlink"
@@ -3198,24 +3216,6 @@ as_fn_append ac_func_list " futimesat"
3198as_fn_append ac_func_list " futimens" 3216as_fn_append ac_func_list " futimens"
3199as_fn_append ac_func_list " utimensat" 3217as_fn_append ac_func_list " utimensat"
3200as_fn_append ac_func_list " lutimes" 3218as_fn_append ac_func_list " lutimes"
3201as_fn_append ac_header_list " linux/version.h"
3202as_fn_append ac_header_list " sys/systeminfo.h"
3203as_fn_append ac_header_list " stdio_ext.h"
3204as_fn_append ac_header_list " fcntl.h"
3205as_fn_append ac_header_list " coff.h"
3206as_fn_append ac_header_list " pty.h"
3207as_fn_append ac_header_list " sys/vlimit.h"
3208as_fn_append ac_header_list " sys/resource.h"
3209as_fn_append ac_header_list " sys/utsname.h"
3210as_fn_append ac_header_list " pwd.h"
3211as_fn_append ac_header_list " utmp.h"
3212as_fn_append ac_header_list " dirent.h"
3213as_fn_append ac_header_list " util.h"
3214as_fn_append ac_header_list " stdlib.h"
3215as_fn_append ac_header_list " pthread.h"
3216as_fn_append ac_header_list " malloc/malloc.h"
3217as_fn_append ac_header_list " maillock.h"
3218as_fn_append ac_header_list " sys/un.h"
3219# Check that the precious variables saved in the cache have kept the same 3219# Check that the precious variables saved in the cache have kept the same
3220# value. 3220# value.
3221ac_cache_corrupted=false 3221ac_cache_corrupted=false
@@ -8311,9 +8311,7321 @@ case $opsys in
8311esac 8311esac
8312 8312
8313 8313
8314# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might 8314pre_PKG_CONFIG_CFLAGS=$CFLAGS
8315# for example add -lrt to RSVG_LIBS, which would then cause gnulib to 8315pre_PKG_CONFIG_LIBS=$LIBS
8316# incorrectly conclude that -lrt is not needed to link clock_gettime. 8316
8317# Extract the first word of "pkg-config", so it can be a program name with args.
8318set dummy pkg-config; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8322 $as_echo_n "(cached) " >&6
8323else
8324 case $PKG_CONFIG in
8325 [\\/]* | ?:[\\/]*)
8326 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8327 ;;
8328 *)
8329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330for as_dir in $PATH
8331do
8332 IFS=$as_save_IFS
8333 test -z "$as_dir" && as_dir=.
8334 for ac_exec_ext in '' $ac_executable_extensions; do
8335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8336 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8337 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338 break 2
8339 fi
8340done
8341 done
8342IFS=$as_save_IFS
8343
8344 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8345 ;;
8346esac
8347fi
8348PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8349if test -n "$PKG_CONFIG"; then
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8351$as_echo "$PKG_CONFIG" >&6; }
8352else
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8354$as_echo "no" >&6; }
8355fi
8356
8357
8358
8359
8360
8361
8362if test "${with_sound}" != "no"; then
8363 # Sound support for GNU/Linux and the free BSDs.
8364 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8365do :
8366 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8367ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8368eval as_val=\$$as_ac_Header
8369 if test "x$as_val" = x""yes; then :
8370 cat >>confdefs.h <<_ACEOF
8371#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8372_ACEOF
8373 have_sound_header=yes
8374fi
8375
8376done
8377
8378 # Emulation library used on NetBSD.
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8380$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8381if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8382 $as_echo_n "(cached) " >&6
8383else
8384 ac_check_lib_save_LIBS=$LIBS
8385LIBS="-lossaudio $LIBS"
8386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8387/* end confdefs.h. */
8388
8389/* Override any GCC internal prototype to avoid an error.
8390 Use char because int might match the return type of a GCC
8391 builtin and then its argument prototype would still apply. */
8392#ifdef __cplusplus
8393extern "C"
8394#endif
8395char _oss_ioctl ();
8396int
8397main ()
8398{
8399return _oss_ioctl ();
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404if ac_fn_c_try_link "$LINENO"; then :
8405 ac_cv_lib_ossaudio__oss_ioctl=yes
8406else
8407 ac_cv_lib_ossaudio__oss_ioctl=no
8408fi
8409rm -f core conftest.err conftest.$ac_objext \
8410 conftest$ac_exeext conftest.$ac_ext
8411LIBS=$ac_check_lib_save_LIBS
8412fi
8413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8414$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8415if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8416 LIBSOUND=-lossaudio
8417else
8418 LIBSOUND=
8419fi
8420
8421
8422
8423 ALSA_REQUIRED=1.0.0
8424 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8425
8426 succeeded=no
8427
8428 if test "$PKG_CONFIG" = "no" ; then
8429 HAVE_ALSA=no
8430 else
8431 PKG_CONFIG_MIN_VERSION=0.9.0
8432 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8434$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8435
8436 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8437 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8438 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8439 edit_cflags="
8440 s,///*,/,g
8441 s/^/ /
8442 s/ -I/ $isystem/g
8443 s/^ //
8444 "
8445 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8446 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8448$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8449 succeeded=yes
8450 else
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8452$as_echo "no" >&6; }
8453 ALSA_CFLAGS=""
8454 ALSA_LIBS=""
8455 ## If we have a custom action on failure, don't print errors, but
8456 ## do set a variable so people can do so.
8457 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8458
8459 fi
8460
8461
8462
8463 else
8464 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8465 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8466 fi
8467 fi
8468
8469 if test $succeeded = yes; then
8470 HAVE_ALSA=yes
8471 else
8472 HAVE_ALSA=no
8473 fi
8474
8475 if test $HAVE_ALSA = yes; then
8476 SAVE_CFLAGS="$CFLAGS"
8477 SAVE_LIBS="$LIBS"
8478 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8479 LIBS="$ALSA_LIBS $LIBS"
8480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8481/* end confdefs.h. */
8482#include <asoundlib.h>
8483int
8484main ()
8485{
8486snd_lib_error_set_handler (0);
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491if ac_fn_c_try_compile "$LINENO"; then :
8492 emacs_alsa_normal=yes
8493else
8494 emacs_alsa_normal=no
8495fi
8496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8497 if test "$emacs_alsa_normal" != yes; then
8498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8499/* end confdefs.h. */
8500#include <alsa/asoundlib.h>
8501int
8502main ()
8503{
8504snd_lib_error_set_handler (0);
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509if ac_fn_c_try_compile "$LINENO"; then :
8510 emacs_alsa_subdir=yes
8511else
8512 emacs_alsa_subdir=no
8513fi
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8515 if test "$emacs_alsa_subdir" != yes; then
8516 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8517 fi
8518 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8519 fi
8520
8521 CFLAGS="$SAVE_CFLAGS"
8522 LIBS="$SAVE_LIBS"
8523 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8524 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8525
8526$as_echo "#define HAVE_ALSA 1" >>confdefs.h
8527
8528 fi
8529
8530 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8531 case "$opsys" in
8532 gnu-linux|freebsd|netbsd)
8533
8534$as_echo "#define HAVE_SOUND 1" >>confdefs.h
8535
8536 ;;
8537 esac
8538 fi
8539
8540
8541fi
8542
8543
8544
8545
8546 for ac_header in $ac_header_list
8547do :
8548 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8549ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8550"
8551eval as_val=\$$as_ac_Header
8552 if test "x$as_val" = x""yes; then :
8553 cat >>confdefs.h <<_ACEOF
8554#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8555_ACEOF
8556
8557fi
8558
8559done
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8590$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8592/* end confdefs.h. */
8593#include <sys/personality.h>
8594int
8595main ()
8596{
8597personality (PER_LINUX32)
8598 ;
8599 return 0;
8600}
8601_ACEOF
8602if ac_fn_c_try_compile "$LINENO"; then :
8603 emacs_cv_personality_linux32=yes
8604else
8605 emacs_cv_personality_linux32=no
8606fi
8607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8609$as_echo "$emacs_cv_personality_linux32" >&6; }
8610
8611if test $emacs_cv_personality_linux32 = yes; then
8612
8613$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8614
8615fi
8616
8617for ac_header in term.h
8618do :
8619 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8620if test "x$ac_cv_header_term_h" = x""yes; then :
8621 cat >>confdefs.h <<_ACEOF
8622#define HAVE_TERM_H 1
8623_ACEOF
8624
8625fi
8626
8627done
8628
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8630$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8631if test "${ac_cv_header_time+set}" = set; then :
8632 $as_echo_n "(cached) " >&6
8633else
8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8635/* end confdefs.h. */
8636#include <sys/types.h>
8637#include <sys/time.h>
8638#include <time.h>
8639
8640int
8641main ()
8642{
8643if ((struct tm *) 0)
8644return 0;
8645 ;
8646 return 0;
8647}
8648_ACEOF
8649if ac_fn_c_try_compile "$LINENO"; then :
8650 ac_cv_header_time=yes
8651else
8652 ac_cv_header_time=no
8653fi
8654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8655fi
8656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8657$as_echo "$ac_cv_header_time" >&6; }
8658if test $ac_cv_header_time = yes; then
8659
8660$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8661
8662fi
8663
8664ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
8665if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8666 ac_have_decl=1
8667else
8668 ac_have_decl=0
8669fi
8670
8671cat >>confdefs.h <<_ACEOF
8672#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
8673_ACEOF
8674
8675if test $ac_cv_have_decl_sys_siglist != yes; then
8676 # For Tru64, at least:
8677 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
8678if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8679 ac_have_decl=1
8680else
8681 ac_have_decl=0
8682fi
8683
8684cat >>confdefs.h <<_ACEOF
8685#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8686_ACEOF
8687
8688 if test $ac_cv_have_decl___sys_siglist = yes; then
8689
8690$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8691
8692 fi
8693fi
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8695$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8696if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8697 $as_echo_n "(cached) " >&6
8698else
8699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8700/* end confdefs.h. */
8701#include <sys/types.h>
8702#include <sys/wait.h>
8703#ifndef WEXITSTATUS
8704# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8705#endif
8706#ifndef WIFEXITED
8707# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8708#endif
8709
8710int
8711main ()
8712{
8713 int s;
8714 wait (&s);
8715 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8716 ;
8717 return 0;
8718}
8719_ACEOF
8720if ac_fn_c_try_compile "$LINENO"; then :
8721 ac_cv_header_sys_wait_h=yes
8722else
8723 ac_cv_header_sys_wait_h=no
8724fi
8725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8726fi
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8728$as_echo "$ac_cv_header_sys_wait_h" >&6; }
8729if test $ac_cv_header_sys_wait_h = yes; then
8730
8731$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8732
8733fi
8734
8735
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8737$as_echo_n "checking for speed_t... " >&6; }
8738if test "${emacs_cv_speed_t+set}" = set; then :
8739 $as_echo_n "(cached) " >&6
8740else
8741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8742/* end confdefs.h. */
8743#include <termios.h>
8744int
8745main ()
8746{
8747speed_t x = 1;
8748 ;
8749 return 0;
8750}
8751_ACEOF
8752if ac_fn_c_try_compile "$LINENO"; then :
8753 emacs_cv_speed_t=yes
8754else
8755 emacs_cv_speed_t=no
8756fi
8757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8758fi
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8760$as_echo "$emacs_cv_speed_t" >&6; }
8761if test $emacs_cv_speed_t = yes; then
8762
8763$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
8764
8765fi
8766
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
8768$as_echo_n "checking for struct exception... " >&6; }
8769if test "${emacs_cv_struct_exception+set}" = set; then :
8770 $as_echo_n "(cached) " >&6
8771else
8772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8773/* end confdefs.h. */
8774#include <math.h>
8775int
8776main ()
8777{
8778static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
8779 ;
8780 return 0;
8781}
8782_ACEOF
8783if ac_fn_c_try_compile "$LINENO"; then :
8784 emacs_cv_struct_exception=yes
8785else
8786 emacs_cv_struct_exception=no
8787fi
8788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8789fi
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
8791$as_echo "$emacs_cv_struct_exception" >&6; }
8792HAVE_EXCEPTION=$emacs_cv_struct_exception
8793if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
8794
8795$as_echo "#define NO_MATHERR 1" >>confdefs.h
8796
8797fi
8798
8799
8800
8801
8802for ac_header in net/if.h
8803do :
8804 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8805#if HAVE_SYS_SOCKET_H
8806#include <sys/socket.h>
8807#endif
8808"
8809if test "x$ac_cv_header_net_if_h" = x""yes; then :
8810 cat >>confdefs.h <<_ACEOF
8811#define HAVE_NET_IF_H 1
8812_ACEOF
8813
8814fi
8815
8816done
8817
8818for ac_header in ifaddrs.h
8819do :
8820 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8821#if HAVE_SYS_SOCKET_H
8822#include <sys/socket.h>
8823#endif
8824"
8825if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8826 cat >>confdefs.h <<_ACEOF
8827#define HAVE_IFADDRS_H 1
8828_ACEOF
8829
8830fi
8831
8832done
8833
8834for ac_header in net/if_dl.h
8835do :
8836 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8837#if HAVE_SYS_SOCKET_H
8838#include <sys/socket.h>
8839#endif
8840"
8841if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
8842 cat >>confdefs.h <<_ACEOF
8843#define HAVE_NET_IF_DL_H 1
8844_ACEOF
8845
8846fi
8847
8848done
8849
8850
8851ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8852#if HAVE_SYS_SOCKET_H
8853#include <sys/socket.h>
8854#endif
8855#if HAVE_NET_IF_H
8856#include <net/if.h>
8857#endif
8858"
8859if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
8860
8861cat >>confdefs.h <<_ACEOF
8862#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8863_ACEOF
8864
8865
8866fi
8867ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8868#if HAVE_SYS_SOCKET_H
8869#include <sys/socket.h>
8870#endif
8871#if HAVE_NET_IF_H
8872#include <net/if.h>
8873#endif
8874"
8875if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
8876
8877cat >>confdefs.h <<_ACEOF
8878#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8879_ACEOF
8880
8881
8882fi
8883ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8884#if HAVE_SYS_SOCKET_H
8885#include <sys/socket.h>
8886#endif
8887#if HAVE_NET_IF_H
8888#include <net/if.h>
8889#endif
8890"
8891if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
8892
8893cat >>confdefs.h <<_ACEOF
8894#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8895_ACEOF
8896
8897
8898fi
8899ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8900#if HAVE_SYS_SOCKET_H
8901#include <sys/socket.h>
8902#endif
8903#if HAVE_NET_IF_H
8904#include <net/if.h>
8905#endif
8906"
8907if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
8908
8909cat >>confdefs.h <<_ACEOF
8910#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8911_ACEOF
8912
8913
8914fi
8915ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
8916#if HAVE_SYS_SOCKET_H
8917#include <sys/socket.h>
8918#endif
8919#if HAVE_NET_IF_H
8920#include <net/if.h>
8921#endif
8922"
8923if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
8924
8925cat >>confdefs.h <<_ACEOF
8926#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8927_ACEOF
8928
8929
8930fi
8931ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
8932#if HAVE_SYS_SOCKET_H
8933#include <sys/socket.h>
8934#endif
8935#if HAVE_NET_IF_H
8936#include <net/if.h>
8937#endif
8938"
8939if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
8940
8941cat >>confdefs.h <<_ACEOF
8942#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
8943_ACEOF
8944
8945
8946fi
8947
8948
8949
8950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
8951$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
8952if test "${emacs_cv_attribute_aligned+set}" = set; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956/* end confdefs.h. */
8957char __attribute__ ((__aligned__ (1 << 3))) c;
8958int
8959main ()
8960{
8961
8962 ;
8963 return 0;
8964}
8965_ACEOF
8966if ac_fn_c_try_compile "$LINENO"; then :
8967 emacs_cv_attribute_aligned=yes
8968else
8969 emacs_cv_attribute_aligned=no
8970fi
8971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8972fi
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
8974$as_echo "$emacs_cv_attribute_aligned" >&6; }
8975if test $emacs_cv_attribute_aligned = yes; then
8976
8977$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
8978
8979fi
8980
8981
8982DEPFLAGS=
8983MKDEPDIR=":"
8984deps_frag=deps.mk
8985if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
8987$as_echo_n "checking whether we are using GNU Make... " >&6; }
8988 HAVE_GNU_MAKE=no
8989 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
8990 if test "x$testval" != x; then
8991 HAVE_GNU_MAKE=yes
8992 else
8993 ac_enable_autodepend=no
8994 fi
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
8996$as_echo "$HAVE_GNU_MAKE" >&6; }
8997 if test $HAVE_GNU_MAKE = yes; then
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
8999$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9000 SAVE_CFLAGS="$CFLAGS"
9001 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9003/* end confdefs.h. */
9004
9005int
9006main ()
9007{
9008
9009 ;
9010 return 0;
9011}
9012_ACEOF
9013if ac_fn_c_try_compile "$LINENO"; then :
9014
9015else
9016 ac_enable_autodepend=no
9017fi
9018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9019 CFLAGS="$SAVE_CFLAGS"
9020 test -f deps.d || ac_enable_autodepend=no
9021 rm -rf deps.d
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9023$as_echo "$ac_enable_autodepend" >&6; }
9024 fi
9025 if test $ac_enable_autodepend = yes; then
9026 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9027 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9028 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9029 deps_frag=autodeps.mk
9030 fi
9031fi
9032deps_frag=$srcdir/src/$deps_frag
9033
9034
9035
9036
9037
9038lisp_frag=$srcdir/src/lisp.mk
9039
9040
9041
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9043$as_echo_n "checking for long file names... " >&6; }
9044if test "${ac_cv_sys_long_file_names+set}" = set; then :
9045 $as_echo_n "(cached) " >&6
9046else
9047 ac_cv_sys_long_file_names=yes
9048# Test for long file names in all the places we know might matter:
9049# . the current directory, where building will happen
9050# $prefix/lib where we will be installing things
9051# $exec_prefix/lib likewise
9052# $TMPDIR if set, where it might want to write temporary files
9053# /tmp where it might want to write temporary files
9054# /var/tmp likewise
9055# /usr/tmp likewise
9056for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9057 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9058 # in the usual case where exec_prefix is '${prefix}'.
9059 case $ac_dir in #(
9060 . | /* | ?:[\\/]*) ;; #(
9061 *) continue;;
9062 esac
9063 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9064 ac_xdir=$ac_dir/cf$$
9065 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9066 ac_tf1=$ac_xdir/conftest9012345
9067 ac_tf2=$ac_xdir/conftest9012346
9068 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9069 ac_cv_sys_long_file_names=no
9070 rm -f -r "$ac_xdir" 2>/dev/null
9071 test $ac_cv_sys_long_file_names = no && break
9072done
9073fi
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9075$as_echo "$ac_cv_sys_long_file_names" >&6; }
9076if test $ac_cv_sys_long_file_names = yes; then
9077
9078$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9079
9080fi
9081
9082
9083#### Choose a window system.
9084
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9086$as_echo_n "checking for X... " >&6; }
9087
9088
9089# Check whether --with-x was given.
9090if test "${with_x+set}" = set; then :
9091 withval=$with_x;
9092fi
9093
9094# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9095if test "x$with_x" = xno; then
9096 # The user explicitly disabled X.
9097 have_x=disabled
9098else
9099 case $x_includes,$x_libraries in #(
9100 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9101 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9102 $as_echo_n "(cached) " >&6
9103else
9104 # One or both of the vars are not set, and there is no cached value.
9105ac_x_includes=no ac_x_libraries=no
9106rm -f -r conftest.dir
9107if mkdir conftest.dir; then
9108 cd conftest.dir
9109 cat >Imakefile <<'_ACEOF'
9110incroot:
9111 @echo incroot='${INCROOT}'
9112usrlibdir:
9113 @echo usrlibdir='${USRLIBDIR}'
9114libdir:
9115 @echo libdir='${LIBDIR}'
9116_ACEOF
9117 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9118 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9119 for ac_var in incroot usrlibdir libdir; do
9120 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9121 done
9122 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9123 for ac_extension in a so sl dylib la dll; do
9124 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9125 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9126 ac_im_usrlibdir=$ac_im_libdir; break
9127 fi
9128 done
9129 # Screen out bogus values from the imake configuration. They are
9130 # bogus both because they are the default anyway, and because
9131 # using them would break gcc on systems where it needs fixed includes.
9132 case $ac_im_incroot in
9133 /usr/include) ac_x_includes= ;;
9134 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9135 esac
9136 case $ac_im_usrlibdir in
9137 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9138 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9139 esac
9140 fi
9141 cd ..
9142 rm -f -r conftest.dir
9143fi
9144
9145# Standard set of common directories for X headers.
9146# Check X11 before X11Rn because it is often a symlink to the current release.
9147ac_x_header_dirs='
9148/usr/X11/include
9149/usr/X11R7/include
9150/usr/X11R6/include
9151/usr/X11R5/include
9152/usr/X11R4/include
9153
9154/usr/include/X11
9155/usr/include/X11R7
9156/usr/include/X11R6
9157/usr/include/X11R5
9158/usr/include/X11R4
9159
9160/usr/local/X11/include
9161/usr/local/X11R7/include
9162/usr/local/X11R6/include
9163/usr/local/X11R5/include
9164/usr/local/X11R4/include
9165
9166/usr/local/include/X11
9167/usr/local/include/X11R7
9168/usr/local/include/X11R6
9169/usr/local/include/X11R5
9170/usr/local/include/X11R4
9171
9172/usr/X386/include
9173/usr/x386/include
9174/usr/XFree86/include/X11
9175
9176/usr/include
9177/usr/local/include
9178/usr/unsupported/include
9179/usr/athena/include
9180/usr/local/x11r5/include
9181/usr/lpp/Xamples/include
9182
9183/usr/openwin/include
9184/usr/openwin/share/include'
9185
9186if test "$ac_x_includes" = no; then
9187 # Guess where to find include files, by looking for Xlib.h.
9188 # First, try using that file with no special directory specified.
9189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9190/* end confdefs.h. */
9191#include <X11/Xlib.h>
9192_ACEOF
9193if ac_fn_c_try_cpp "$LINENO"; then :
9194 # We can compile using X headers with no special include directory.
9195ac_x_includes=
9196else
9197 for ac_dir in $ac_x_header_dirs; do
9198 if test -r "$ac_dir/X11/Xlib.h"; then
9199 ac_x_includes=$ac_dir
9200 break
9201 fi
9202done
9203fi
9204rm -f conftest.err conftest.$ac_ext
9205fi # $ac_x_includes = no
9206
9207if test "$ac_x_libraries" = no; then
9208 # Check for the libraries.
9209 # See if we find them without any special options.
9210 # Don't add to $LIBS permanently.
9211 ac_save_LIBS=$LIBS
9212 LIBS="-lX11 $LIBS"
9213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214/* end confdefs.h. */
9215#include <X11/Xlib.h>
9216int
9217main ()
9218{
9219XrmInitialize ()
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224if ac_fn_c_try_link "$LINENO"; then :
9225 LIBS=$ac_save_LIBS
9226# We can link X programs with no special library path.
9227ac_x_libraries=
9228else
9229 LIBS=$ac_save_LIBS
9230for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9231do
9232 # Don't even attempt the hair of trying to link an X program!
9233 for ac_extension in a so sl dylib la dll; do
9234 if test -r "$ac_dir/libX11.$ac_extension"; then
9235 ac_x_libraries=$ac_dir
9236 break 2
9237 fi
9238 done
9239done
9240fi
9241rm -f core conftest.err conftest.$ac_objext \
9242 conftest$ac_exeext conftest.$ac_ext
9243fi # $ac_x_libraries = no
9244
9245case $ac_x_includes,$ac_x_libraries in #(
9246 no,* | *,no | *\'*)
9247 # Didn't find X, or a directory has "'" in its name.
9248 ac_cv_have_x="have_x=no";; #(
9249 *)
9250 # Record where we found X for the cache.
9251 ac_cv_have_x="have_x=yes\
9252 ac_x_includes='$ac_x_includes'\
9253 ac_x_libraries='$ac_x_libraries'"
9254esac
9255fi
9256;; #(
9257 *) have_x=yes;;
9258 esac
9259 eval "$ac_cv_have_x"
9260fi # $with_x != no
9261
9262if test "$have_x" != yes; then
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9264$as_echo "$have_x" >&6; }
9265 no_x=yes
9266else
9267 # If each of the values was on the command line, it overrides each guess.
9268 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9269 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9270 # Update the cache value to reflect the command line values.
9271 ac_cv_have_x="have_x=yes\
9272 ac_x_includes='$x_includes'\
9273 ac_x_libraries='$x_libraries'"
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9275$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9276fi
9277
9278if test "$no_x" = yes; then
9279 window_system=none
9280else
9281 window_system=x11
9282fi
9283
9284LD_SWITCH_X_SITE_RPATH=
9285if test "${x_libraries}" != NONE; then
9286 if test -n "${x_libraries}"; then
9287 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9288 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9289 fi
9290 x_default_search_path=""
9291 x_search_path=${x_libraries}
9292 if test -z "${x_search_path}"; then
9293 x_search_path=/usr/lib
9294 fi
9295 for x_library in `echo ${x_search_path}: | \
9296 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9297 x_search_path="\
9298${x_library}/X11/%L/%T/%N%C%S:\
9299${x_library}/X11/%l/%T/%N%C%S:\
9300${x_library}/X11/%T/%N%C%S:\
9301${x_library}/X11/%L/%T/%N%S:\
9302${x_library}/X11/%l/%T/%N%S:\
9303${x_library}/X11/%T/%N%S"
9304 if test x"${x_default_search_path}" = x; then
9305 x_default_search_path=${x_search_path}
9306 else
9307 x_default_search_path="${x_search_path}:${x_default_search_path}"
9308 fi
9309 done
9310fi
9311
9312
9313if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9314 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9315fi
9316
9317if test x"${x_includes}" = x; then
9318 bitmapdir=/usr/include/X11/bitmaps
9319else
9320 # accumulate include directories that have X11 bitmap subdirectories
9321 bmd_acc="dummyval"
9322 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9323 if test -d "${bmd}/X11/bitmaps"; then
9324 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9325 fi
9326 if test -d "${bmd}/bitmaps"; then
9327 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9328 fi
9329 done
9330 if test ${bmd_acc} != "dummyval"; then
9331 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9332 fi
9333fi
9334
9335HAVE_NS=no
9336NS_IMPL_COCOA=no
9337NS_IMPL_GNUSTEP=no
9338tmp_CPPFLAGS="$CPPFLAGS"
9339tmp_CFLAGS="$CFLAGS"
9340CPPFLAGS="$CPPFLAGS -x objective-c"
9341CFLAGS="$CFLAGS -x objective-c"
9342TEMACS_LDFLAGS2="\${LDFLAGS}"
9343GNU_OBJC_CFLAGS=
9344if test "${with_ns}" != no; then
9345 if test "${opsys}" = darwin; then
9346 NS_IMPL_COCOA=yes
9347 ns_appdir=`pwd`/nextstep/Emacs.app
9348 ns_appbindir=${ns_appdir}/Contents/MacOS
9349 ns_appresdir=${ns_appdir}/Contents/Resources
9350 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9351 elif test -f $GNUSTEP_CONFIG_FILE; then
9352 NS_IMPL_GNUSTEP=yes
9353 ns_appdir=`pwd`/nextstep/Emacs.app
9354 ns_appbindir=${ns_appdir}
9355 ns_appresdir=${ns_appdir}/Resources
9356 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9357 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9358 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9359 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9360 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9361 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9362 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9363 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9364 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9365 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9366 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9367 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9368 LIB_STANDARD=
9369 START_FILES=
9370 TEMACS_LDFLAGS2=
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9372$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9373if test "${emacs_cv_objc_exceptions+set}" = set; then :
9374 $as_echo_n "(cached) " >&6
9375else
9376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9377/* end confdefs.h. */
9378#include <GNUstepBase/GSConfig.h>
9379int
9380main ()
9381{
9382#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
93831;
9384#else
9385fail;
9386#endif
9387 ;
9388 return 0;
9389}
9390_ACEOF
9391if ac_fn_c_try_compile "$LINENO"; then :
9392 emacs_cv_objc_exceptions=yes
9393else
9394 emacs_cv_objc_exceptions=no
9395fi
9396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9397fi
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9399$as_echo "$emacs_cv_objc_exceptions" >&6; }
9400 if test $emacs_cv_objc_exceptions = yes; then
9401
9402$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9403
9404 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9405 fi
9406 fi
9407
9408 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9409
9410 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9411if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9412 HAVE_NS=yes
9413else
9414 as_fn_error "\`--with-ns' was specified, but the include
9415 files are missing or cannot be compiled." "$LINENO" 5
9416fi
9417
9418
9419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9420/* end confdefs.h. */
9421#include <Foundation/NSObjCRuntime.h>
9422int
9423main ()
9424{
9425NSInteger i;
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430if ac_fn_c_try_compile "$LINENO"; then :
9431 ns_have_nsinteger=yes
9432else
9433 ns_have_nsinteger=no
9434fi
9435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9436 if test $ns_have_nsinteger = yes; then
9437
9438$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
9439
9440 fi
9441fi
9442
9443
9444INSTALL_ARCH_INDEP_EXTRA=install-etc
9445ns_self_contained=no
9446ns_frag=/dev/null
9447NS_OBJ=
9448NS_OBJC_OBJ=
9449if test "${HAVE_NS}" = yes; then
9450 if test "$with_toolkit_scroll_bars" = "no"; then
9451 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9452 fi
9453
9454 window_system=nextstep
9455 with_xft=no
9456 # set up packaging dirs
9457 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9458 ns_self_contained=yes
9459 prefix=${ns_appresdir}
9460 exec_prefix=${ns_appbindir}
9461 libexecdir="\${ns_appbindir}/libexec"
9462 archlibdir="\${ns_appbindir}/libexec"
9463 docdir="\${ns_appresdir}/etc"
9464 etcdir="\${ns_appresdir}/etc"
9465 infodir="\${ns_appresdir}/info"
9466 mandir="\${ns_appresdir}/man"
9467 lispdir="\${ns_appresdir}/lisp"
9468 leimdir="\${ns_appresdir}/leim"
9469 INSTALL_ARCH_INDEP_EXTRA=
9470 fi
9471 ns_frag=$srcdir/src/ns.mk
9472 NS_OBJ="fontset.o fringe.o image.o"
9473 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9474fi
9475CFLAGS="$tmp_CFLAGS"
9476CPPFLAGS="$tmp_CPPFLAGS"
9477
9478
9479
9480
9481
9482
9483
9484case "${window_system}" in
9485 x11 )
9486 HAVE_X_WINDOWS=yes
9487 HAVE_X11=yes
9488 case "${with_x_toolkit}" in
9489 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9490 motif ) USE_X_TOOLKIT=MOTIF ;;
9491 gtk ) with_gtk=yes
9492 USE_X_TOOLKIT=none ;;
9493 gtk3 ) with_gtk3=yes
9494 USE_X_TOOLKIT=none ;;
9495 no ) USE_X_TOOLKIT=none ;;
9496 * ) USE_X_TOOLKIT=maybe ;;
9497 esac
9498 ;;
9499 nextstep | none )
9500 HAVE_X_WINDOWS=no
9501 HAVE_X11=no
9502 USE_X_TOOLKIT=none
9503 ;;
9504esac
9505
9506if test "$window_system" = none && test "X$with_x" != "Xno"; then
9507 # Extract the first word of "X", so it can be a program name with args.
9508set dummy X; ac_word=$2
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9510$as_echo_n "checking for $ac_word... " >&6; }
9511if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9512 $as_echo_n "(cached) " >&6
9513else
9514 if test -n "$HAVE_XSERVER"; then
9515 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9516else
9517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518for as_dir in $PATH
9519do
9520 IFS=$as_save_IFS
9521 test -z "$as_dir" && as_dir=.
9522 for ac_exec_ext in '' $ac_executable_extensions; do
9523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9524 ac_cv_prog_HAVE_XSERVER="true"
9525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526 break 2
9527 fi
9528done
9529 done
9530IFS=$as_save_IFS
9531
9532 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9533fi
9534fi
9535HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9536if test -n "$HAVE_XSERVER"; then
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9538$as_echo "$HAVE_XSERVER" >&6; }
9539else
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543
9544
9545 if test "$HAVE_XSERVER" = true ||
9546 test -n "$DISPLAY" ||
9547 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9548 as_fn_error "You seem to be running X, but no X development libraries
9549were found. You should install the relevant development files for X
9550and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9551sure you have development files for image handling, i.e.
9552tiff, gif, jpeg, png and xpm.
9553If you are sure you want Emacs compiled without X window support, pass
9554 --without-x
9555to configure." "$LINENO" 5
9556 fi
9557fi
9558
9559### If we're using X11, we should use the X menu package.
9560HAVE_MENUS=no
9561case ${HAVE_X11} in
9562 yes ) HAVE_MENUS=yes ;;
9563esac
9564
9565# Does the opsystem file prohibit the use of the GNU malloc?
9566# Assume not, until told otherwise.
9567GNU_MALLOC=yes
9568
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9570$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9571if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
9572 $as_echo_n "(cached) " >&6
9573else
9574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9575/* end confdefs.h. */
9576#include <malloc.h>
9577 static void hook (void) {}
9578int
9579main ()
9580{
9581malloc_set_state (malloc_get_state ());
9582 __after_morecore_hook = hook;
9583 __malloc_initialize_hook = hook;
9584 ;
9585 return 0;
9586}
9587_ACEOF
9588if ac_fn_c_try_link "$LINENO"; then :
9589 emacs_cv_var_doug_lea_malloc=yes
9590else
9591 emacs_cv_var_doug_lea_malloc=no
9592fi
9593rm -f core conftest.err conftest.$ac_objext \
9594 conftest$ac_exeext conftest.$ac_ext
9595fi
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9597$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9598doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9599
9600
9601system_malloc=no
9602case "$opsys" in
9603 ## darwin ld insists on the use of malloc routines in the System framework.
9604 darwin|sol2-10) system_malloc=yes ;;
9605esac
9606
9607if test "${system_malloc}" = "yes"; then
9608
9609$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9610
9611 GNU_MALLOC=no
9612 GNU_MALLOC_reason="
9613 (The GNU allocators don't work with this system configuration.)"
9614 GMALLOC_OBJ=
9615 VMLIMIT_OBJ=
9616else
9617 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9618 VMLIMIT_OBJ=vm-limit.o
9619fi
9620
9621
9622
9623if test "$doug_lea_malloc" = "yes" ; then
9624 if test "$GNU_MALLOC" = yes ; then
9625 GNU_MALLOC_reason="
9626 (Using Doug Lea's new malloc from the GNU C Library.)"
9627 fi
9628
9629$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9630
9631
9632 ## Use mmap directly for allocating larger buffers.
9633 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9634 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9635 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9636 case "$opsys" in
9637 gnu*) REL_ALLOC=no ;;
9638 esac
9639fi
9640
9641if test x"${REL_ALLOC}" = x; then
9642 REL_ALLOC=${GNU_MALLOC}
9643fi
9644
9645use_mmap_for_buffers=no
9646case "$opsys" in
9647 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
9648esac
9649
9650
9651
9652
9653
9654
9655
9656
9657for ac_func in getpagesize
9658do :
9659 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9660if test "x$ac_cv_func_getpagesize" = x""yes; then :
9661 cat >>confdefs.h <<_ACEOF
9662#define HAVE_GETPAGESIZE 1
9663_ACEOF
9664
9665fi
9666done
9667
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9669$as_echo_n "checking for working mmap... " >&6; }
9670if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9671 $as_echo_n "(cached) " >&6
9672else
9673 if test "$cross_compiling" = yes; then :
9674 ac_cv_func_mmap_fixed_mapped=no
9675else
9676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677/* end confdefs.h. */
9678$ac_includes_default
9679/* malloc might have been renamed as rpl_malloc. */
9680#undef malloc
9681
9682/* Thanks to Mike Haertel and Jim Avera for this test.
9683 Here is a matrix of mmap possibilities:
9684 mmap private not fixed
9685 mmap private fixed at somewhere currently unmapped
9686 mmap private fixed at somewhere already mapped
9687 mmap shared not fixed
9688 mmap shared fixed at somewhere currently unmapped
9689 mmap shared fixed at somewhere already mapped
9690 For private mappings, we should verify that changes cannot be read()
9691 back from the file, nor mmap's back from the file at a different
9692 address. (There have been systems where private was not correctly
9693 implemented like the infamous i386 svr4.0, and systems where the
9694 VM page cache was not coherent with the file system buffer cache
9695 like early versions of FreeBSD and possibly contemporary NetBSD.)
9696 For shared mappings, we should conversely verify that changes get
9697 propagated back to all the places they're supposed to be.
9698
9699 Grep wants private fixed already mapped.
9700 The main things grep needs to know about mmap are:
9701 * does it exist and is it safe to write into the mmap'd area
9702 * how to use it (BSD variants) */
9703
9704#include <fcntl.h>
9705#include <sys/mman.h>
9706
9707#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9708char *malloc ();
9709#endif
9710
9711/* This mess was copied from the GNU getpagesize.h. */
9712#ifndef HAVE_GETPAGESIZE
9713# ifdef _SC_PAGESIZE
9714# define getpagesize() sysconf(_SC_PAGESIZE)
9715# else /* no _SC_PAGESIZE */
9716# ifdef HAVE_SYS_PARAM_H
9717# include <sys/param.h>
9718# ifdef EXEC_PAGESIZE
9719# define getpagesize() EXEC_PAGESIZE
9720# else /* no EXEC_PAGESIZE */
9721# ifdef NBPG
9722# define getpagesize() NBPG * CLSIZE
9723# ifndef CLSIZE
9724# define CLSIZE 1
9725# endif /* no CLSIZE */
9726# else /* no NBPG */
9727# ifdef NBPC
9728# define getpagesize() NBPC
9729# else /* no NBPC */
9730# ifdef PAGESIZE
9731# define getpagesize() PAGESIZE
9732# endif /* PAGESIZE */
9733# endif /* no NBPC */
9734# endif /* no NBPG */
9735# endif /* no EXEC_PAGESIZE */
9736# else /* no HAVE_SYS_PARAM_H */
9737# define getpagesize() 8192 /* punt totally */
9738# endif /* no HAVE_SYS_PARAM_H */
9739# endif /* no _SC_PAGESIZE */
9740
9741#endif /* no HAVE_GETPAGESIZE */
9742
9743int
9744main ()
9745{
9746 char *data, *data2, *data3;
9747 const char *cdata2;
9748 int i, pagesize;
9749 int fd, fd2;
9750
9751 pagesize = getpagesize ();
9752
9753 /* First, make a file with some known garbage in it. */
9754 data = (char *) malloc (pagesize);
9755 if (!data)
9756 return 1;
9757 for (i = 0; i < pagesize; ++i)
9758 *(data + i) = rand ();
9759 umask (0);
9760 fd = creat ("conftest.mmap", 0600);
9761 if (fd < 0)
9762 return 2;
9763 if (write (fd, data, pagesize) != pagesize)
9764 return 3;
9765 close (fd);
9766
9767 /* Next, check that the tail of a page is zero-filled. File must have
9768 non-zero length, otherwise we risk SIGBUS for entire page. */
9769 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9770 if (fd2 < 0)
9771 return 4;
9772 cdata2 = "";
9773 if (write (fd2, cdata2, 1) != 1)
9774 return 5;
9775 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9776 if (data2 == MAP_FAILED)
9777 return 6;
9778 for (i = 0; i < pagesize; ++i)
9779 if (*(data2 + i))
9780 return 7;
9781 close (fd2);
9782 if (munmap (data2, pagesize))
9783 return 8;
9784
9785 /* Next, try to mmap the file at a fixed address which already has
9786 something else allocated at it. If we can, also make sure that
9787 we see the same garbage. */
9788 fd = open ("conftest.mmap", O_RDWR);
9789 if (fd < 0)
9790 return 9;
9791 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9792 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9793 return 10;
9794 for (i = 0; i < pagesize; ++i)
9795 if (*(data + i) != *(data2 + i))
9796 return 11;
9797
9798 /* Finally, make sure that changes to the mapped area do not
9799 percolate back to the file as seen by read(). (This is a bug on
9800 some variants of i386 svr4.0.) */
9801 for (i = 0; i < pagesize; ++i)
9802 *(data2 + i) = *(data2 + i) + 1;
9803 data3 = (char *) malloc (pagesize);
9804 if (!data3)
9805 return 12;
9806 if (read (fd, data3, pagesize) != pagesize)
9807 return 13;
9808 for (i = 0; i < pagesize; ++i)
9809 if (*(data + i) != *(data3 + i))
9810 return 14;
9811 close (fd);
9812 return 0;
9813}
9814_ACEOF
9815if ac_fn_c_try_run "$LINENO"; then :
9816 ac_cv_func_mmap_fixed_mapped=yes
9817else
9818 ac_cv_func_mmap_fixed_mapped=no
9819fi
9820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9821 conftest.$ac_objext conftest.beam conftest.$ac_ext
9822fi
9823
9824fi
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9826$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9827if test $ac_cv_func_mmap_fixed_mapped = yes; then
9828
9829$as_echo "#define HAVE_MMAP 1" >>confdefs.h
9830
9831fi
9832rm -f conftest.mmap conftest.txt
9833
9834if test $use_mmap_for_buffers = yes; then
9835
9836$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
9837
9838 REL_ALLOC=no
9839fi
9840
9841LIBS="$LIBS_SYSTEM $LIBS"
9842
9843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9844$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
9845if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
9846 $as_echo_n "(cached) " >&6
9847else
9848 ac_check_lib_save_LIBS=$LIBS
9849LIBS="-ldnet $LIBS"
9850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851/* end confdefs.h. */
9852
9853/* Override any GCC internal prototype to avoid an error.
9854 Use char because int might match the return type of a GCC
9855 builtin and then its argument prototype would still apply. */
9856#ifdef __cplusplus
9857extern "C"
9858#endif
9859char dnet_ntoa ();
9860int
9861main ()
9862{
9863return dnet_ntoa ();
9864 ;
9865 return 0;
9866}
9867_ACEOF
9868if ac_fn_c_try_link "$LINENO"; then :
9869 ac_cv_lib_dnet_dnet_ntoa=yes
9870else
9871 ac_cv_lib_dnet_dnet_ntoa=no
9872fi
9873rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
9875LIBS=$ac_check_lib_save_LIBS
9876fi
9877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9878$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9879if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
9880 cat >>confdefs.h <<_ACEOF
9881#define HAVE_LIBDNET 1
9882_ACEOF
9883
9884 LIBS="-ldnet $LIBS"
9885
9886fi
9887
9888
9889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
9890$as_echo_n "checking for main in -lXbsd... " >&6; }
9891if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
9892 $as_echo_n "(cached) " >&6
9893else
9894 ac_check_lib_save_LIBS=$LIBS
9895LIBS="-lXbsd $LIBS"
9896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897/* end confdefs.h. */
9898
9899
9900int
9901main ()
9902{
9903return main ();
9904 ;
9905 return 0;
9906}
9907_ACEOF
9908if ac_fn_c_try_link "$LINENO"; then :
9909 ac_cv_lib_Xbsd_main=yes
9910else
9911 ac_cv_lib_Xbsd_main=no
9912fi
9913rm -f core conftest.err conftest.$ac_objext \
9914 conftest$ac_exeext conftest.$ac_ext
9915LIBS=$ac_check_lib_save_LIBS
9916fi
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
9918$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
9919if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
9920 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9921fi
9922
9923
9924LIB_PTHREAD=
9925
9926
9927
9928if test "$ac_cv_header_pthread_h"; then
9929 if test "$GMALLOC_OBJ" = gmalloc.o; then
9930 emacs_pthread_function=pthread_atfork
9931 else
9932 emacs_pthread_function=pthread_self
9933 fi
9934 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
9936$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
9937if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
9938 $as_echo_n "(cached) " >&6
9939else
9940 ac_check_lib_save_LIBS=$LIBS
9941LIBS="-lpthread $LIBS"
9942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9943/* end confdefs.h. */
9944
9945/* Override any GCC internal prototype to avoid an error.
9946 Use char because int might match the return type of a GCC
9947 builtin and then its argument prototype would still apply. */
9948#ifdef __cplusplus
9949extern "C"
9950#endif
9951char $emacs_pthread_function ();
9952int
9953main ()
9954{
9955return $emacs_pthread_function ();
9956 ;
9957 return 0;
9958}
9959_ACEOF
9960if ac_fn_c_try_link "$LINENO"; then :
9961 eval "$as_ac_Lib=yes"
9962else
9963 eval "$as_ac_Lib=no"
9964fi
9965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
9967LIBS=$ac_check_lib_save_LIBS
9968fi
9969eval ac_res=\$$as_ac_Lib
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9971$as_echo "$ac_res" >&6; }
9972eval as_val=\$$as_ac_Lib
9973 if test "x$as_val" = x""yes; then :
9974 HAVE_PTHREAD=yes
9975fi
9976
9977fi
9978if test "$HAVE_PTHREAD" = yes; then
9979 case "${canonical}" in
9980 *-hpux*) ;;
9981 *) LIB_PTHREAD="-lpthread"
9982 LIBS="$LIB_PTHREAD $LIBS" ;;
9983 esac
9984
9985$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
9986
9987fi
9988
9989
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
9991$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
9992if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
9993 $as_echo_n "(cached) " >&6
9994else
9995 ac_check_lib_save_LIBS=$LIBS
9996LIBS="-lpthreads $LIBS"
9997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998/* end confdefs.h. */
9999
10000/* Override any GCC internal prototype to avoid an error.
10001 Use char because int might match the return type of a GCC
10002 builtin and then its argument prototype would still apply. */
10003#ifdef __cplusplus
10004extern "C"
10005#endif
10006char cma_open ();
10007int
10008main ()
10009{
10010return cma_open ();
10011 ;
10012 return 0;
10013}
10014_ACEOF
10015if ac_fn_c_try_link "$LINENO"; then :
10016 ac_cv_lib_pthreads_cma_open=yes
10017else
10018 ac_cv_lib_pthreads_cma_open=no
10019fi
10020rm -f core conftest.err conftest.$ac_objext \
10021 conftest$ac_exeext conftest.$ac_ext
10022LIBS=$ac_check_lib_save_LIBS
10023fi
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10025$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10026if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10027 cat >>confdefs.h <<_ACEOF
10028#define HAVE_LIBPTHREADS 1
10029_ACEOF
10030
10031 LIBS="-lpthreads $LIBS"
10032
10033fi
10034
10035
10036## Note: when using cpp in s/aix4.2.h, this definition depended on
10037## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10038## the system file was sourced. Hence the value of LIBS_SYSTEM
10039## added to LIBS in configure would never contain the pthreads part,
10040## but the value used in Makefiles might. FIXME?
10041##
10042## -lpthreads seems to be necessary for Xlib in X11R6, and should
10043## be harmless on older versions of X where it happens to exist.
10044test "$opsys" = "aix4-2" && \
10045 test $ac_cv_lib_pthreads_cma_open = yes && \
10046 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10047
10048
10049case ${host_os} in
10050aix*)
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10052$as_echo_n "checking for -bbigtoc option... " >&6; }
10053if test "${gdb_cv_bigtoc+set}" = set; then :
10054 $as_echo_n "(cached) " >&6
10055else
10056
10057 case $GCC in
10058 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10059 *) gdb_cv_bigtoc=-bbigtoc ;;
10060 esac
10061
10062 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064/* end confdefs.h. */
10065
10066int
10067main ()
10068{
10069int i;
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074if ac_fn_c_try_link "$LINENO"; then :
10075
10076else
10077 gdb_cv_bigtoc=
10078fi
10079rm -f core conftest.err conftest.$ac_objext \
10080 conftest$ac_exeext conftest.$ac_ext
10081
10082fi
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10084$as_echo "$gdb_cv_bigtoc" >&6; }
10085 ;;
10086esac
10087
10088# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10089# used for the tests that follow. We set them back to REAL_CFLAGS and
10090# REAL_CPPFLAGS later on.
10091
10092REAL_CFLAGS="$CFLAGS"
10093REAL_CPPFLAGS="$CPPFLAGS"
10094
10095if test "${HAVE_X11}" = "yes"; then
10096 DEFS="$C_SWITCH_X_SITE $DEFS"
10097 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10098 LIBS="-lX11 $LIBS"
10099 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10100 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10101
10102 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10103 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10104 # but it's more convenient here to set LD_RUN_PATH since this
10105 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10106 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10107 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10108 export LD_RUN_PATH
10109 fi
10110
10111 if test "${opsys}" = "gnu-linux"; then
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10113$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10115/* end confdefs.h. */
10116
10117int
10118main ()
10119{
10120XOpenDisplay ("foo");
10121 ;
10122 return 0;
10123}
10124_ACEOF
10125if ac_fn_c_try_link "$LINENO"; then :
10126 xgnu_linux_first_failure=no
10127else
10128 xgnu_linux_first_failure=yes
10129fi
10130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
10132 if test "${xgnu_linux_first_failure}" = "yes"; then
10133 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10134 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10135 OLD_CPPFLAGS="$CPPFLAGS"
10136 OLD_LIBS="$LIBS"
10137 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10138 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10139 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10140 LIBS="$LIBS -b i486-linuxaout"
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142/* end confdefs.h. */
10143
10144int
10145main ()
10146{
10147XOpenDisplay ("foo");
10148 ;
10149 return 0;
10150}
10151_ACEOF
10152if ac_fn_c_try_link "$LINENO"; then :
10153 xgnu_linux_second_failure=no
10154else
10155 xgnu_linux_second_failure=yes
10156fi
10157rm -f core conftest.err conftest.$ac_objext \
10158 conftest$ac_exeext conftest.$ac_ext
10159 if test "${xgnu_linux_second_failure}" = "yes"; then
10160 # If we get the same failure with -b, there is no use adding -b.
10161 # So take it out. This plays safe.
10162 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10163 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10164 CPPFLAGS="$OLD_CPPFLAGS"
10165 LIBS="$OLD_LIBS"
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167$as_echo "no" >&6; }
10168 else
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10170$as_echo "yes" >&6; }
10171 fi
10172 else
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10174$as_echo "no" >&6; }
10175 fi
10176 fi
10177
10178 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10179 # header files included from there.
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10181$as_echo_n "checking for Xkb... " >&6; }
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183/* end confdefs.h. */
10184#include <X11/Xlib.h>
10185#include <X11/XKBlib.h>
10186int
10187main ()
10188{
10189XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10190 ;
10191 return 0;
10192}
10193_ACEOF
10194if ac_fn_c_try_link "$LINENO"; then :
10195 emacs_xkb=yes
10196else
10197 emacs_xkb=no
10198fi
10199rm -f core conftest.err conftest.$ac_objext \
10200 conftest$ac_exeext conftest.$ac_ext
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10202$as_echo "$emacs_xkb" >&6; }
10203 if test $emacs_xkb = yes; then
10204
10205$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
10206
10207 fi
10208
10209 for ac_func in XrmSetDatabase XScreenResourceString \
10210XScreenNumberOfScreen
10211do :
10212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10214eval as_val=\$$as_ac_var
10215 if test "x$as_val" = x""yes; then :
10216 cat >>confdefs.h <<_ACEOF
10217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10218_ACEOF
10219
10220fi
10221done
10222
10223fi
10224
10225if test "${window_system}" = "x11"; then
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10227$as_echo_n "checking X11 version 6... " >&6; }
10228 if test "${emacs_cv_x11_version_6+set}" = set; then :
10229 $as_echo_n "(cached) " >&6
10230else
10231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10232/* end confdefs.h. */
10233#include <X11/Xlib.h>
10234int
10235main ()
10236{
10237#if XlibSpecificationRelease < 6
10238fail;
10239#endif
10240
10241 ;
10242 return 0;
10243}
10244_ACEOF
10245if ac_fn_c_try_link "$LINENO"; then :
10246 emacs_cv_x11_version_6=yes
10247else
10248 emacs_cv_x11_version_6=no
10249fi
10250rm -f core conftest.err conftest.$ac_objext \
10251 conftest$ac_exeext conftest.$ac_ext
10252fi
10253
10254 if test $emacs_cv_x11_version_6 = yes; then
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10256$as_echo "6 or newer" >&6; }
10257
10258$as_echo "#define HAVE_X11R6 1" >>confdefs.h
10259
10260
10261$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10262
10263 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10264 ## XIM support.
10265 case "$opsys" in
10266 sol2-*) : ;;
10267 *)
10268$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10269
10270 ;;
10271 esac
10272 else
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10274$as_echo "before 6" >&6; }
10275 fi
10276fi
10277
10278
10279### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10280HAVE_RSVG=no
10281if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10282 if test "${with_rsvg}" != "no"; then
10283 RSVG_REQUIRED=2.11.0
10284 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10285
10286
10287 succeeded=no
10288
10289 if test "$PKG_CONFIG" = "no" ; then
10290 :
10291 else
10292 PKG_CONFIG_MIN_VERSION=0.9.0
10293 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10295$as_echo_n "checking for $RSVG_MODULE... " >&6; }
10296
10297 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10298 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10299 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10300 edit_cflags="
10301 s,///*,/,g
10302 s/^/ /
10303 s/ -I/ $isystem/g
10304 s/^ //
10305 "
10306 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10307 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10309$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10310 succeeded=yes
10311 else
10312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314 RSVG_CFLAGS=""
10315 RSVG_LIBS=""
10316 ## If we have a custom action on failure, don't print errors, but
10317 ## do set a variable so people can do so.
10318 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10319
10320 fi
10321
10322
10323
10324 else
10325 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10326 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10327 fi
10328 fi
10329
10330 if test $succeeded = yes; then
10331 HAVE_RSVG=yes
10332 else
10333 :
10334 fi
10335
10336
10337
10338
10339 if test $HAVE_RSVG = yes; then
10340
10341$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10342
10343 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10344 LIBS="$RSVG_LIBS $LIBS"
10345 fi
10346 fi
10347fi
10348
10349HAVE_IMAGEMAGICK=no
10350if test "${HAVE_X11}" = "yes"; then
10351 if test "${with_imagemagick}" != "no"; then
10352 ## 6.2.8 is the earliest version known to work, but earlier versions
10353 ## might work - let us know if you find one.
10354 ## 6.0.7 does not work. See bug#7955.
10355 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
10356
10357 succeeded=no
10358
10359 if test "$PKG_CONFIG" = "no" ; then
10360 :
10361 else
10362 PKG_CONFIG_MIN_VERSION=0.9.0
10363 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10365$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10366
10367 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10368 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10369 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10370 edit_cflags="
10371 s,///*,/,g
10372 s/^/ /
10373 s/ -I/ $isystem/g
10374 s/^ //
10375 "
10376 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10377 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10379$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10380 succeeded=yes
10381 else
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10383$as_echo "no" >&6; }
10384 IMAGEMAGICK_CFLAGS=""
10385 IMAGEMAGICK_LIBS=""
10386 ## If we have a custom action on failure, don't print errors, but
10387 ## do set a variable so people can do so.
10388 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
10389
10390 fi
10391
10392
10393
10394 else
10395 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10396 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10397 fi
10398 fi
10399
10400 if test $succeeded = yes; then
10401 HAVE_IMAGEMAGICK=yes
10402 else
10403 :
10404 fi
10405
10406
10407
10408
10409 if test $HAVE_IMAGEMAGICK = yes; then
10410
10411$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10412
10413 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10414 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10415 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10416do :
10417 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10418ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10419eval as_val=\$$as_ac_var
10420 if test "x$as_val" = x""yes; then :
10421 cat >>confdefs.h <<_ACEOF
10422#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10423_ACEOF
10424
10425fi
10426done
10427
10428 fi
10429 fi
10430fi
10431
10432
10433HAVE_GTK=no
10434GTK_OBJ=
10435if test "${with_gtk3}" = "yes"; then
10436 GLIB_REQUIRED=2.28
10437 GTK_REQUIRED=3.0
10438 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10439
10440
10441 succeeded=no
10442
10443 if test "$PKG_CONFIG" = "no" ; then
10444 pkg_check_gtk=no
10445 else
10446 PKG_CONFIG_MIN_VERSION=0.9.0
10447 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10449$as_echo_n "checking for $GTK_MODULES... " >&6; }
10450
10451 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10452 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10453 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10454 edit_cflags="
10455 s,///*,/,g
10456 s/^/ /
10457 s/ -I/ $isystem/g
10458 s/^ //
10459 "
10460 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10461 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10463$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10464 succeeded=yes
10465 else
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468 GTK_CFLAGS=""
10469 GTK_LIBS=""
10470 ## If we have a custom action on failure, don't print errors, but
10471 ## do set a variable so people can do so.
10472 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10473
10474 fi
10475
10476
10477
10478 else
10479 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10480 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10481 fi
10482 fi
10483
10484 if test $succeeded = yes; then
10485 pkg_check_gtk=yes
10486 else
10487 pkg_check_gtk=no
10488 fi
10489
10490 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10491 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10492 fi
10493
10494$as_echo "#define HAVE_GTK3 1" >>confdefs.h
10495
10496 GTK_OBJ=emacsgtkfixed.o
10497fi
10498
10499if test "$pkg_check_gtk" != "yes"; then
10500 HAVE_GTK=no
10501if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10502 GLIB_REQUIRED=2.10
10503 GTK_REQUIRED=2.10
10504 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10505
10506
10507 succeeded=no
10508
10509 if test "$PKG_CONFIG" = "no" ; then
10510 pkg_check_gtk=no
10511 else
10512 PKG_CONFIG_MIN_VERSION=0.9.0
10513 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10515$as_echo_n "checking for $GTK_MODULES... " >&6; }
10516
10517 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10518 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10519 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10520 edit_cflags="
10521 s,///*,/,g
10522 s/^/ /
10523 s/ -I/ $isystem/g
10524 s/^ //
10525 "
10526 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10527 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10529$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10530 succeeded=yes
10531 else
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533$as_echo "no" >&6; }
10534 GTK_CFLAGS=""
10535 GTK_LIBS=""
10536 ## If we have a custom action on failure, don't print errors, but
10537 ## do set a variable so people can do so.
10538 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10539
10540 fi
10541
10542
10543
10544 else
10545 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10546 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10547 fi
10548 fi
10549
10550 if test $succeeded = yes; then
10551 pkg_check_gtk=yes
10552 else
10553 pkg_check_gtk=no
10554 fi
10555
10556 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10557 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10558 fi
10559fi
10560fi
10561
10562if test x"$pkg_check_gtk" = xyes; then
10563
10564
10565
10566 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10567 CFLAGS="$CFLAGS $GTK_CFLAGS"
10568 LIBS="$GTK_LIBS $LIBS"
10569 GTK_COMPILES=no
10570 for ac_func in gtk_main
10571do :
10572 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10573if test "x$ac_cv_func_gtk_main" = x""yes; then :
10574 cat >>confdefs.h <<_ACEOF
10575#define HAVE_GTK_MAIN 1
10576_ACEOF
10577 GTK_COMPILES=yes
10578fi
10579done
10580
10581 if test "${GTK_COMPILES}" != "yes"; then
10582 if test "$USE_X_TOOLKIT" != "maybe"; then
10583 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10584 fi
10585 else
10586 HAVE_GTK=yes
10587
10588$as_echo "#define USE_GTK 1" >>confdefs.h
10589
10590 GTK_OBJ="gtkutil.o $GTK_OBJ"
10591 USE_X_TOOLKIT=none
10592 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10593 :
10594 else
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10596 closing open displays. This is no problem if you just use
10597 one display, but if you use more than one and close one of them
10598 Emacs may crash." >&5
10599$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10600 closing open displays. This is no problem if you just use
10601 one display, but if you use more than one and close one of them
10602 Emacs may crash." >&2;}
10603 sleep 3
10604 fi
10605 fi
10606
10607fi
10608
10609
10610
10611if test "${HAVE_GTK}" = "yes"; then
10612
10613 if test "$with_toolkit_scroll_bars" != no; then
10614 with_toolkit_scroll_bars=yes
10615 fi
10616
10617 HAVE_GTK_FILE_SELECTION=no
10618 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10619#include <gtk/gtk.h>
10620"
10621if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10622 HAVE_GTK_FILE_SELECTION=yes
10623else
10624 HAVE_GTK_FILE_SELECTION=no
10625fi
10626
10627 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10628 for ac_func in gtk_file_selection_new
10629do :
10630 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
10631if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
10632 cat >>confdefs.h <<_ACEOF
10633#define HAVE_GTK_FILE_SELECTION_NEW 1
10634_ACEOF
10635
10636fi
10637done
10638
10639 fi
10640
10641
10642 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10643 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10644 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10645 gtk_orientable_set_orientation \
10646 gtk_window_set_has_resize_grip
10647do :
10648 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10649ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10650eval as_val=\$$as_ac_var
10651 if test "x$as_val" = x""yes; then :
10652 cat >>confdefs.h <<_ACEOF
10653#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10654_ACEOF
10655
10656fi
10657done
10658
10659fi
10660
10661HAVE_DBUS=no
10662DBUS_OBJ=
10663if test "${with_dbus}" = "yes"; then
10664
10665 succeeded=no
10666
10667 if test "$PKG_CONFIG" = "no" ; then
10668 HAVE_DBUS=no
10669 else
10670 PKG_CONFIG_MIN_VERSION=0.9.0
10671 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10673$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
10674
10675 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
10676 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
10677 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
10678 edit_cflags="
10679 s,///*,/,g
10680 s/^/ /
10681 s/ -I/ $isystem/g
10682 s/^ //
10683 "
10684 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
10685 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
10687$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
10688 succeeded=yes
10689 else
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
10692 DBUS_CFLAGS=""
10693 DBUS_LIBS=""
10694 ## If we have a custom action on failure, don't print errors, but
10695 ## do set a variable so people can do so.
10696 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
10697
10698 fi
10699
10700
10701
10702 else
10703 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10704 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10705 fi
10706 fi
10707
10708 if test $succeeded = yes; then
10709 HAVE_DBUS=yes
10710 else
10711 HAVE_DBUS=no
10712 fi
10713
10714 if test "$HAVE_DBUS" = yes; then
10715 LIBS="$LIBS $DBUS_LIBS"
10716
10717$as_echo "#define HAVE_DBUS 1" >>confdefs.h
10718
10719 for ac_func in dbus_watch_get_unix_fd \
10720 dbus_type_is_valid \
10721 dbus_validate_bus_name \
10722 dbus_validate_path \
10723 dbus_validate_interface \
10724 dbus_validate_member
10725do :
10726 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10727ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10728eval as_val=\$$as_ac_var
10729 if test "x$as_val" = x""yes; then :
10730 cat >>confdefs.h <<_ACEOF
10731#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10732_ACEOF
10733
10734fi
10735done
10736
10737 DBUS_OBJ=dbusbind.o
10738 fi
10739fi
10740
10741
10742HAVE_GSETTINGS=no
10743if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
10744
10745 succeeded=no
10746
10747 if test "$PKG_CONFIG" = "no" ; then
10748 HAVE_GSETTINGS=no
10749 else
10750 PKG_CONFIG_MIN_VERSION=0.9.0
10751 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
10753$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
10754
10755 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
10756 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
10757 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
10758 edit_cflags="
10759 s,///*,/,g
10760 s/^/ /
10761 s/ -I/ $isystem/g
10762 s/^ //
10763 "
10764 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
10765 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
10767$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
10768 succeeded=yes
10769 else
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
10772 GSETTINGS_CFLAGS=""
10773 GSETTINGS_LIBS=""
10774 ## If we have a custom action on failure, don't print errors, but
10775 ## do set a variable so people can do so.
10776 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
10777
10778 fi
10779
10780
10781
10782 else
10783 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10784 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10785 fi
10786 fi
10787
10788 if test $succeeded = yes; then
10789 HAVE_GSETTINGS=yes
10790 else
10791 HAVE_GSETTINGS=no
10792 fi
10793
10794 if test "$HAVE_GSETTINGS" = "yes"; then
10795
10796$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
10797
10798 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
10799 SETTINGS_LIBS="$GSETTINGS_LIBS"
10800 fi
10801fi
10802
10803HAVE_GCONF=no
10804if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
10805
10806 succeeded=no
10807
10808 if test "$PKG_CONFIG" = "no" ; then
10809 HAVE_GCONF=no
10810 else
10811 PKG_CONFIG_MIN_VERSION=0.9.0
10812 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
10814$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
10815
10816 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
10817 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
10818 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
10819 edit_cflags="
10820 s,///*,/,g
10821 s/^/ /
10822 s/ -I/ $isystem/g
10823 s/^ //
10824 "
10825 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
10826 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
10828$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
10829 succeeded=yes
10830 else
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833 GCONF_CFLAGS=""
10834 GCONF_LIBS=""
10835 ## If we have a custom action on failure, don't print errors, but
10836 ## do set a variable so people can do so.
10837 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
10838
10839 fi
10840
10841
10842
10843 else
10844 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10845 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10846 fi
10847 fi
10848
10849 if test $succeeded = yes; then
10850 HAVE_GCONF=yes
10851 else
10852 HAVE_GCONF=no
10853 fi
10854
10855 if test "$HAVE_GCONF" = yes; then
10856
10857$as_echo "#define HAVE_GCONF 1" >>confdefs.h
10858
10859 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
10860 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
10861 fi
10862fi
10863
10864if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
10865 SAVE_CFLAGS="$CFLAGS"
10866 SAVE_LIBS="$LIBS"
10867 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
10868 LIBS="$SETTINGS_LIBS $LIBS"
10869 for ac_func in g_type_init
10870do :
10871 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
10872if test "x$ac_cv_func_g_type_init" = x""yes; then :
10873 cat >>confdefs.h <<_ACEOF
10874#define HAVE_G_TYPE_INIT 1
10875_ACEOF
10876
10877fi
10878done
10879
10880 CFLAGS="$SAVE_CFLAGS"
10881 LIBS="$SAVE_LIBS"
10882fi
10883
10884
10885
10886
10887HAVE_LIBSELINUX=no
10888LIBSELINUX_LIBS=
10889if test "${with_selinux}" = "yes"; then
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
10891$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
10892if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
10893 $as_echo_n "(cached) " >&6
10894else
10895 ac_check_lib_save_LIBS=$LIBS
10896LIBS="-lselinux $LIBS"
10897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898/* end confdefs.h. */
10899
10900/* Override any GCC internal prototype to avoid an error.
10901 Use char because int might match the return type of a GCC
10902 builtin and then its argument prototype would still apply. */
10903#ifdef __cplusplus
10904extern "C"
10905#endif
10906char lgetfilecon ();
10907int
10908main ()
10909{
10910return lgetfilecon ();
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915if ac_fn_c_try_link "$LINENO"; then :
10916 ac_cv_lib_selinux_lgetfilecon=yes
10917else
10918 ac_cv_lib_selinux_lgetfilecon=no
10919fi
10920rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
10922LIBS=$ac_check_lib_save_LIBS
10923fi
10924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
10925$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
10926if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
10927 HAVE_LIBSELINUX=yes
10928else
10929 HAVE_LIBSELINUX=no
10930fi
10931
10932 if test "$HAVE_LIBSELINUX" = yes; then
10933
10934$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
10935
10936 LIBSELINUX_LIBS=-lselinux
10937 fi
10938fi
10939
10940
10941HAVE_GNUTLS=no
10942HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
10943if test "${with_gnutls}" = "yes" ; then
10944
10945 succeeded=no
10946
10947 if test "$PKG_CONFIG" = "no" ; then
10948 HAVE_GNUTLS=no
10949 else
10950 PKG_CONFIG_MIN_VERSION=0.9.0
10951 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
10953$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
10954
10955 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
10956 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
10957 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
10958 edit_cflags="
10959 s,///*,/,g
10960 s/^/ /
10961 s/ -I/ $isystem/g
10962 s/^ //
10963 "
10964 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
10965 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
10967$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
10968 succeeded=yes
10969 else
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972 LIBGNUTLS_CFLAGS=""
10973 LIBGNUTLS_LIBS=""
10974 ## If we have a custom action on failure, don't print errors, but
10975 ## do set a variable so people can do so.
10976 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
10977
10978 fi
10979
10980
10981
10982 else
10983 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10984 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10985 fi
10986 fi
10987
10988 if test $succeeded = yes; then
10989 HAVE_GNUTLS=yes
10990 else
10991 HAVE_GNUTLS=no
10992 fi
10993
10994 if test "${HAVE_GNUTLS}" = "yes"; then
10995
10996$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
10997
10998 fi
10999
11000 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11001 LIBS="$LIBGNUTLS_LIBS $LIBS"
11002 for ac_func in gnutls_certificate_set_verify_function
11003do :
11004 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11005if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11006 cat >>confdefs.h <<_ACEOF
11007#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11008_ACEOF
11009 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11010fi
11011done
11012
11013
11014 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11015
11016$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11017
11018 fi
11019fi
11020
11021
11022
11023
11024HAVE_XAW3D=no
11025LUCID_LIBW=
11026if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11027 if test "$with_xaw3d" != no; then
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11029$as_echo_n "checking for xaw3d... " >&6; }
11030 if test "${emacs_cv_xaw3d+set}" = set; then :
11031 $as_echo_n "(cached) " >&6
11032else
11033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034/* end confdefs.h. */
11035
11036#include <X11/Intrinsic.h>
11037#include <X11/Xaw3d/Simple.h>
11038int
11039main ()
11040{
11041
11042 ;
11043 return 0;
11044}
11045_ACEOF
11046if ac_fn_c_try_link "$LINENO"; then :
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11048$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11049if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11050 $as_echo_n "(cached) " >&6
11051else
11052 ac_check_lib_save_LIBS=$LIBS
11053LIBS="-lXaw3d $LIBS"
11054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11055/* end confdefs.h. */
11056
11057/* Override any GCC internal prototype to avoid an error.
11058 Use char because int might match the return type of a GCC
11059 builtin and then its argument prototype would still apply. */
11060#ifdef __cplusplus
11061extern "C"
11062#endif
11063char XawScrollbarSetThumb ();
11064int
11065main ()
11066{
11067return XawScrollbarSetThumb ();
11068 ;
11069 return 0;
11070}
11071_ACEOF
11072if ac_fn_c_try_link "$LINENO"; then :
11073 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
11074else
11075 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
11076fi
11077rm -f core conftest.err conftest.$ac_objext \
11078 conftest$ac_exeext conftest.$ac_ext
11079LIBS=$ac_check_lib_save_LIBS
11080fi
11081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11082$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11083if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11084 emacs_cv_xaw3d=yes
11085else
11086 emacs_cv_xaw3d=no
11087fi
11088
11089else
11090 emacs_cv_xaw3d=no
11091fi
11092rm -f core conftest.err conftest.$ac_objext \
11093 conftest$ac_exeext conftest.$ac_ext
11094fi
11095
11096 else
11097 emacs_cv_xaw3d=no
11098 fi
11099 if test $emacs_cv_xaw3d = yes; then
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11101$as_echo "yes; using Lucid toolkit" >&6; }
11102 USE_X_TOOLKIT=LUCID
11103 HAVE_XAW3D=yes
11104 LUCID_LIBW=-lXaw3d
11105
11106$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11107
11108 else
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11112$as_echo_n "checking for libXaw... " >&6; }
11113 if test "${emacs_cv_xaw+set}" = set; then :
11114 $as_echo_n "(cached) " >&6
11115else
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117/* end confdefs.h. */
11118
11119#include <X11/Intrinsic.h>
11120#include <X11/Xaw/Simple.h>
11121int
11122main ()
11123{
11124
11125 ;
11126 return 0;
11127}
11128_ACEOF
11129if ac_fn_c_try_link "$LINENO"; then :
11130 emacs_cv_xaw=yes
11131else
11132 emacs_cv_xaw=no
11133fi
11134rm -f core conftest.err conftest.$ac_objext \
11135 conftest$ac_exeext conftest.$ac_ext
11136fi
11137
11138 if test $emacs_cv_xaw = yes; then
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11140$as_echo "yes; using Lucid toolkit" >&6; }
11141 USE_X_TOOLKIT=LUCID
11142 LUCID_LIBW=-lXaw
11143 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11144 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
11145 else
11146 as_fn_error "No X toolkit could be found.
11147If you are sure you want Emacs compiled without an X toolkit, pass
11148 --with-x-toolkit=no
11149to configure. Otherwise, install the development libraries for the toolkit
11150that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
11151 fi
11152 fi
11153fi
11154
11155X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11156
11157LIBXTR6=
11158if test "${USE_X_TOOLKIT}" != "none"; then
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11160$as_echo_n "checking X11 toolkit version... " >&6; }
11161 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
11162 $as_echo_n "(cached) " >&6
11163else
11164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165/* end confdefs.h. */
11166#include <X11/Intrinsic.h>
11167int
11168main ()
11169{
11170#if XtSpecificationRelease < 6
11171fail;
11172#endif
11173
11174 ;
11175 return 0;
11176}
11177_ACEOF
11178if ac_fn_c_try_link "$LINENO"; then :
11179 emacs_cv_x11_toolkit_version_6=yes
11180else
11181 emacs_cv_x11_toolkit_version_6=no
11182fi
11183rm -f core conftest.err conftest.$ac_objext \
11184 conftest$ac_exeext conftest.$ac_ext
11185fi
11186
11187 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11188 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11190$as_echo "6 or newer" >&6; }
11191
11192$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11193
11194 LIBXTR6="-lSM -lICE"
11195 case "$opsys" in
11196 ## Use libw.a along with X11R6 Xt.
11197 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11198 esac
11199 else
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11201$as_echo "before 6" >&6; }
11202 fi
11203
11204 OLDLIBS="$LIBS"
11205 if test x$HAVE_X11XTR6 = xyes; then
11206 LIBS="-lXt -lSM -lICE $LIBS"
11207 else
11208 LIBS="-lXt $LIBS"
11209 fi
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11211$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11212if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11213 $as_echo_n "(cached) " >&6
11214else
11215 ac_check_lib_save_LIBS=$LIBS
11216LIBS="-lXmu $LIBS"
11217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218/* end confdefs.h. */
11219
11220/* Override any GCC internal prototype to avoid an error.
11221 Use char because int might match the return type of a GCC
11222 builtin and then its argument prototype would still apply. */
11223#ifdef __cplusplus
11224extern "C"
11225#endif
11226char XmuConvertStandardSelection ();
11227int
11228main ()
11229{
11230return XmuConvertStandardSelection ();
11231 ;
11232 return 0;
11233}
11234_ACEOF
11235if ac_fn_c_try_link "$LINENO"; then :
11236 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11237else
11238 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11239fi
11240rm -f core conftest.err conftest.$ac_objext \
11241 conftest$ac_exeext conftest.$ac_ext
11242LIBS=$ac_check_lib_save_LIBS
11243fi
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11245$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11246if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11247 cat >>confdefs.h <<_ACEOF
11248#define HAVE_LIBXMU 1
11249_ACEOF
11250
11251 LIBS="-lXmu $LIBS"
11252
11253fi
11254
11255 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11256 fi
11257
11258
11259LIBXMU=-lXmu
11260case $opsys in
11261 ## These systems don't supply Xmu.
11262 hpux* | aix4-2 )
11263 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11264 ;;
11265esac
11266
11267
11268# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11269if test "${HAVE_X11}" = "yes"; then
11270 if test "${USE_X_TOOLKIT}" != "none"; then
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11272$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11273if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
11274 $as_echo_n "(cached) " >&6
11275else
11276 ac_check_lib_save_LIBS=$LIBS
11277LIBS="-lXext $LIBS"
11278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11279/* end confdefs.h. */
11280
11281/* Override any GCC internal prototype to avoid an error.
11282 Use char because int might match the return type of a GCC
11283 builtin and then its argument prototype would still apply. */
11284#ifdef __cplusplus
11285extern "C"
11286#endif
11287char XShapeQueryExtension ();
11288int
11289main ()
11290{
11291return XShapeQueryExtension ();
11292 ;
11293 return 0;
11294}
11295_ACEOF
11296if ac_fn_c_try_link "$LINENO"; then :
11297 ac_cv_lib_Xext_XShapeQueryExtension=yes
11298else
11299 ac_cv_lib_Xext_XShapeQueryExtension=no
11300fi
11301rm -f core conftest.err conftest.$ac_objext \
11302 conftest$ac_exeext conftest.$ac_ext
11303LIBS=$ac_check_lib_save_LIBS
11304fi
11305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11306$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11307if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11308 cat >>confdefs.h <<_ACEOF
11309#define HAVE_LIBXEXT 1
11310_ACEOF
11311
11312 LIBS="-lXext $LIBS"
11313
11314fi
11315
11316 fi
11317fi
11318
11319LIBXP=
11320if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
11322$as_echo_n "checking for Motif version 2.1... " >&6; }
11323if test "${emacs_cv_motif_version_2_1+set}" = set; then :
11324 $as_echo_n "(cached) " >&6
11325else
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327/* end confdefs.h. */
11328#include <Xm/Xm.h>
11329int
11330main ()
11331{
11332#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11333int x = 5;
11334#else
11335Motif version prior to 2.1.
11336#endif
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341if ac_fn_c_try_compile "$LINENO"; then :
11342 emacs_cv_motif_version_2_1=yes
11343else
11344 emacs_cv_motif_version_2_1=no
11345fi
11346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11347fi
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11349$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11350 if test $emacs_cv_motif_version_2_1 = yes; then
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11352$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11353if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11354 $as_echo_n "(cached) " >&6
11355else
11356 ac_check_lib_save_LIBS=$LIBS
11357LIBS="-lXp $LIBS"
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359/* end confdefs.h. */
11360
11361/* Override any GCC internal prototype to avoid an error.
11362 Use char because int might match the return type of a GCC
11363 builtin and then its argument prototype would still apply. */
11364#ifdef __cplusplus
11365extern "C"
11366#endif
11367char XpCreateContext ();
11368int
11369main ()
11370{
11371return XpCreateContext ();
11372 ;
11373 return 0;
11374}
11375_ACEOF
11376if ac_fn_c_try_link "$LINENO"; then :
11377 ac_cv_lib_Xp_XpCreateContext=yes
11378else
11379 ac_cv_lib_Xp_XpCreateContext=no
11380fi
11381rm -f core conftest.err conftest.$ac_objext \
11382 conftest$ac_exeext conftest.$ac_ext
11383LIBS=$ac_check_lib_save_LIBS
11384fi
11385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11386$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11387if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11388 LIBXP=-lXp
11389fi
11390
11391 else
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11393$as_echo_n "checking for LessTif where some systems put it... " >&6; }
11394if test "${emacs_cv_lesstif+set}" = set; then :
11395 $as_echo_n "(cached) " >&6
11396else
11397 # We put this in CFLAGS temporarily to precede other -I options
11398 # that might be in CFLAGS temporarily.
11399 # We put this in CPPFLAGS where it precedes the other -I options.
11400 OLD_CPPFLAGS=$CPPFLAGS
11401 OLD_CFLAGS=$CFLAGS
11402 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11403 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11405/* end confdefs.h. */
11406#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11407int
11408main ()
11409{
11410int x = 5;
11411 ;
11412 return 0;
11413}
11414_ACEOF
11415if ac_fn_c_try_compile "$LINENO"; then :
11416 emacs_cv_lesstif=yes
11417else
11418 emacs_cv_lesstif=no
11419fi
11420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11421fi
11422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11423$as_echo "$emacs_cv_lesstif" >&6; }
11424 if test $emacs_cv_lesstif = yes; then
11425 # Make sure this -I option remains in CPPFLAGS after it is set
11426 # back to REAL_CPPFLAGS.
11427 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11428 # have those other -I options anyway. Ultimately, having this
11429 # directory ultimately in CPPFLAGS will be enough.
11430 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11431 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11432 else
11433 CFLAGS=$OLD_CFLAGS
11434 CPPFLAGS=$OLD_CPPFLAGS
11435 fi
11436 fi
11437 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
11438if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
11439
11440else
11441 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
11442fi
11443
11444
11445fi
11446
11447
11448USE_TOOLKIT_SCROLL_BARS=no
11449if test "${with_toolkit_scroll_bars}" != "no"; then
11450 if test "${USE_X_TOOLKIT}" != "none"; then
11451 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11452 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11453
11454 HAVE_XAW3D=no
11455 USE_TOOLKIT_SCROLL_BARS=yes
11456 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
11457 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11458
11459 USE_TOOLKIT_SCROLL_BARS=yes
11460 fi
11461 elif test "${HAVE_GTK}" = "yes"; then
11462 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11463
11464 USE_TOOLKIT_SCROLL_BARS=yes
11465 elif test "${HAVE_NS}" = "yes"; then
11466 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11467
11468 USE_TOOLKIT_SCROLL_BARS=yes
11469 fi
11470fi
11471
11472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h. */
11474
11475 #include <X11/Xlib.h>
11476 #include <X11/Xresource.h>
11477int
11478main ()
11479{
11480XIMProc callback;
11481 ;
11482 return 0;
11483}
11484_ACEOF
11485if ac_fn_c_try_compile "$LINENO"; then :
11486 HAVE_XIM=yes
11487
11488$as_echo "#define HAVE_XIM 1" >>confdefs.h
11489
11490else
11491 HAVE_XIM=no
11492fi
11493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11494
11495
11496if test "${with_xim}" != "no"; then
11497
11498$as_echo "#define USE_XIM 1" >>confdefs.h
11499
11500fi
11501
11502
11503if test "${HAVE_XIM}" != "no"; then
11504 late_CFLAGS=$CFLAGS
11505 if test "$GCC" = yes; then
11506 CFLAGS="$CFLAGS --pedantic-errors"
11507 fi
11508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11509/* end confdefs.h. */
11510
11511#include <X11/Xlib.h>
11512#include <X11/Xresource.h>
11513int
11514main ()
11515{
11516Display *display;
11517XrmDatabase db;
11518char *res_name;
11519char *res_class;
11520XIMProc callback;
11521XPointer *client_data;
11522#ifndef __GNUC__
11523/* If we're not using GCC, it's probably not XFree86, and this is
11524 probably right, but we can't use something like --pedantic-errors. */
11525extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11526 char*, XIMProc, XPointer*);
11527#endif
11528(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11529 client_data);
11530 ;
11531 return 0;
11532}
11533_ACEOF
11534if ac_fn_c_try_compile "$LINENO"; then :
11535 emacs_cv_arg6_star=yes
11536fi
11537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11538 if test "$emacs_cv_arg6_star" = yes; then
11539 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11540
11541 else
11542 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
11543
11544 fi
11545 CFLAGS=$late_CFLAGS
11546fi
11547
11548### Start of font-backend (under any platform) section.
11549# (nothing here yet -- this is a placeholder)
11550### End of font-backend (under any platform) section.
11551
11552### Start of font-backend (under X11) section.
11553if test "${HAVE_X11}" = "yes"; then
11554
11555 succeeded=no
11556
11557 if test "$PKG_CONFIG" = "no" ; then
11558 HAVE_FC=no
11559 else
11560 PKG_CONFIG_MIN_VERSION=0.9.0
11561 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
11563$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
11564
11565 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
11566 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
11567 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
11568 edit_cflags="
11569 s,///*,/,g
11570 s/^/ /
11571 s/ -I/ $isystem/g
11572 s/^ //
11573 "
11574 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
11575 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
11577$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
11578 succeeded=yes
11579 else
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11581$as_echo "no" >&6; }
11582 FONTCONFIG_CFLAGS=""
11583 FONTCONFIG_LIBS=""
11584 ## If we have a custom action on failure, don't print errors, but
11585 ## do set a variable so people can do so.
11586 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
11587
11588 fi
11589
11590
11591
11592 else
11593 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11594 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11595 fi
11596 fi
11597
11598 if test $succeeded = yes; then
11599 HAVE_FC=yes
11600 else
11601 HAVE_FC=no
11602 fi
11603
11604
11605 ## Use -lXft if available, unless `--with-xft=no'.
11606 HAVE_XFT=maybe
11607 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
11608 with_xft="no";
11609 fi
11610 if test "x${with_xft}" != "xno"; then
11611
11612
11613 succeeded=no
11614
11615 if test "$PKG_CONFIG" = "no" ; then
11616 HAVE_XFT=no
11617 else
11618 PKG_CONFIG_MIN_VERSION=0.9.0
11619 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
11621$as_echo_n "checking for xft >= 0.13.0... " >&6; }
11622
11623 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
11624 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
11625 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
11626 edit_cflags="
11627 s,///*,/,g
11628 s/^/ /
11629 s/ -I/ $isystem/g
11630 s/^ //
11631 "
11632 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
11633 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
11635$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
11636 succeeded=yes
11637 else
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
11640 XFT_CFLAGS=""
11641 XFT_LIBS=""
11642 ## If we have a custom action on failure, don't print errors, but
11643 ## do set a variable so people can do so.
11644 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11645
11646 fi
11647
11648
11649
11650 else
11651 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11652 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11653 fi
11654 fi
11655
11656 if test $succeeded = yes; then
11657 :
11658 else
11659 HAVE_XFT=no
11660 fi
11661
11662 ## Because xftfont.c uses XRenderQueryExtension, we also
11663 ## need to link to -lXrender.
11664 HAVE_XRENDER=no
11665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
11666$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
11667if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
11668 $as_echo_n "(cached) " >&6
11669else
11670 ac_check_lib_save_LIBS=$LIBS
11671LIBS="-lXrender $LIBS"
11672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673/* end confdefs.h. */
11674
11675/* Override any GCC internal prototype to avoid an error.
11676 Use char because int might match the return type of a GCC
11677 builtin and then its argument prototype would still apply. */
11678#ifdef __cplusplus
11679extern "C"
11680#endif
11681char XRenderQueryExtension ();
11682int
11683main ()
11684{
11685return XRenderQueryExtension ();
11686 ;
11687 return 0;
11688}
11689_ACEOF
11690if ac_fn_c_try_link "$LINENO"; then :
11691 ac_cv_lib_Xrender_XRenderQueryExtension=yes
11692else
11693 ac_cv_lib_Xrender_XRenderQueryExtension=no
11694fi
11695rm -f core conftest.err conftest.$ac_objext \
11696 conftest$ac_exeext conftest.$ac_ext
11697LIBS=$ac_check_lib_save_LIBS
11698fi
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
11700$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
11701if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
11702 HAVE_XRENDER=yes
11703fi
11704
11705 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
11706 OLD_CPPFLAGS="$CPPFLAGS"
11707 OLD_CFLAGS="$CFLAGS"
11708 OLD_LIBS="$LIBS"
11709 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11710 CFLAGS="$CFLAGS $XFT_CFLAGS"
11711 XFT_LIBS="-lXrender $XFT_LIBS"
11712 LIBS="$XFT_LIBS $LIBS"
11713 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
11714if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
11716$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
11717if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
11718 $as_echo_n "(cached) " >&6
11719else
11720 ac_check_lib_save_LIBS=$LIBS
11721LIBS="-lXft $XFT_LIBS $LIBS"
11722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723/* end confdefs.h. */
11724
11725/* Override any GCC internal prototype to avoid an error.
11726 Use char because int might match the return type of a GCC
11727 builtin and then its argument prototype would still apply. */
11728#ifdef __cplusplus
11729extern "C"
11730#endif
11731char XftFontOpen ();
11732int
11733main ()
11734{
11735return XftFontOpen ();
11736 ;
11737 return 0;
11738}
11739_ACEOF
11740if ac_fn_c_try_link "$LINENO"; then :
11741 ac_cv_lib_Xft_XftFontOpen=yes
11742else
11743 ac_cv_lib_Xft_XftFontOpen=no
11744fi
11745rm -f core conftest.err conftest.$ac_objext \
11746 conftest$ac_exeext conftest.$ac_ext
11747LIBS=$ac_check_lib_save_LIBS
11748fi
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11750$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
11751if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
11752 HAVE_XFT=yes
11753fi
11754
11755fi
11756
11757
11758
11759 if test "${HAVE_XFT}" = "yes"; then
11760
11761$as_echo "#define HAVE_XFT 1" >>confdefs.h
11762
11763
11764 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11765 else
11766 CPPFLAGS="$OLD_CPPFLAGS"
11767 CFLAGS="$OLD_CFLAGS"
11768 LIBS="$OLD_LIBS"
11769 fi # "${HAVE_XFT}" = "yes"
11770 fi # "$HAVE_XFT" != no
11771 fi # "x${with_xft}" != "xno"
11772
11773 ## We used to allow building with FreeType and without Xft.
11774 ## However, the ftx font backend driver is not in good shape.
11775 if test "$HAVE_XFT" != "yes"; then
11776 HAVE_XFT=no
11777 HAVE_FREETYPE=no
11778 else
11779
11780 succeeded=no
11781
11782 if test "$PKG_CONFIG" = "no" ; then
11783 HAVE_FREETYPE=no
11784 else
11785 PKG_CONFIG_MIN_VERSION=0.9.0
11786 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
11788$as_echo_n "checking for freetype2... " >&6; }
11789
11790 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
11791 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
11792 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
11793 edit_cflags="
11794 s,///*,/,g
11795 s/^/ /
11796 s/ -I/ $isystem/g
11797 s/^ //
11798 "
11799 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
11800 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
11802$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
11803 succeeded=yes
11804 else
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807 FREETYPE_CFLAGS=""
11808 FREETYPE_LIBS=""
11809 ## If we have a custom action on failure, don't print errors, but
11810 ## do set a variable so people can do so.
11811 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
11812
11813 fi
11814
11815
11816
11817 else
11818 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11819 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11820 fi
11821 fi
11822
11823 if test $succeeded = yes; then
11824 HAVE_FREETYPE=yes
11825 else
11826 HAVE_FREETYPE=no
11827 fi
11828
11829
11830 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
11831 fi
11832
11833 HAVE_LIBOTF=no
11834 if test "${HAVE_FREETYPE}" = "yes"; then
11835
11836$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
11837
11838 if test "${with_libotf}" != "no"; then
11839
11840 succeeded=no
11841
11842 if test "$PKG_CONFIG" = "no" ; then
11843 HAVE_LIBOTF=no
11844 else
11845 PKG_CONFIG_MIN_VERSION=0.9.0
11846 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
11848$as_echo_n "checking for libotf... " >&6; }
11849
11850 if $PKG_CONFIG --exists "libotf" 2>&5 &&
11851 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
11852 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
11853 edit_cflags="
11854 s,///*,/,g
11855 s/^/ /
11856 s/ -I/ $isystem/g
11857 s/^ //
11858 "
11859 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
11860 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
11862$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
11863 succeeded=yes
11864 else
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11866$as_echo "no" >&6; }
11867 LIBOTF_CFLAGS=""
11868 LIBOTF_LIBS=""
11869 ## If we have a custom action on failure, don't print errors, but
11870 ## do set a variable so people can do so.
11871 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
11872
11873 fi
11874
11875
11876
11877 else
11878 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11879 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11880 fi
11881 fi
11882
11883 if test $succeeded = yes; then
11884 HAVE_LIBOTF=yes
11885 else
11886 HAVE_LIBOTF=no
11887 fi
11888
11889 if test "$HAVE_LIBOTF" = "yes"; then
11890
11891$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
11892
11893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
11894$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
11895if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
11896 $as_echo_n "(cached) " >&6
11897else
11898 ac_check_lib_save_LIBS=$LIBS
11899LIBS="-lotf $LIBS"
11900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901/* end confdefs.h. */
11902
11903/* Override any GCC internal prototype to avoid an error.
11904 Use char because int might match the return type of a GCC
11905 builtin and then its argument prototype would still apply. */
11906#ifdef __cplusplus
11907extern "C"
11908#endif
11909char OTF_get_variation_glyphs ();
11910int
11911main ()
11912{
11913return OTF_get_variation_glyphs ();
11914 ;
11915 return 0;
11916}
11917_ACEOF
11918if ac_fn_c_try_link "$LINENO"; then :
11919 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
11920else
11921 ac_cv_lib_otf_OTF_get_variation_glyphs=no
11922fi
11923rm -f core conftest.err conftest.$ac_objext \
11924 conftest$ac_exeext conftest.$ac_ext
11925LIBS=$ac_check_lib_save_LIBS
11926fi
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
11928$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
11929if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
11930 HAVE_OTF_GET_VARIATION_GLYPHS=yes
11931else
11932 HAVE_OTF_GET_VARIATION_GLYPHS=no
11933fi
11934
11935 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
11936
11937$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
11938
11939 fi
11940 fi
11941 fi
11942 fi
11943
11944 HAVE_M17N_FLT=no
11945 if test "${HAVE_LIBOTF}" = yes; then
11946 if test "${with_m17n_flt}" != "no"; then
11947
11948 succeeded=no
11949
11950 if test "$PKG_CONFIG" = "no" ; then
11951 HAVE_M17N_FLT=no
11952 else
11953 PKG_CONFIG_MIN_VERSION=0.9.0
11954 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
11956$as_echo_n "checking for m17n-flt... " >&6; }
11957
11958 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
11959 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
11960 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
11961 edit_cflags="
11962 s,///*,/,g
11963 s/^/ /
11964 s/ -I/ $isystem/g
11965 s/^ //
11966 "
11967 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
11968 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
11970$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
11971 succeeded=yes
11972 else
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
11975 M17N_FLT_CFLAGS=""
11976 M17N_FLT_LIBS=""
11977 ## If we have a custom action on failure, don't print errors, but
11978 ## do set a variable so people can do so.
11979 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
11980
11981 fi
11982
11983
11984
11985 else
11986 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11987 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11988 fi
11989 fi
11990
11991 if test $succeeded = yes; then
11992 HAVE_M17N_FLT=yes
11993 else
11994 HAVE_M17N_FLT=no
11995 fi
11996
11997 if test "$HAVE_M17N_FLT" = "yes"; then
11998
11999$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12000
12001 fi
12002 fi
12003 fi
12004else
12005 HAVE_XFT=no
12006 HAVE_FREETYPE=no
12007 HAVE_LIBOTF=no
12008 HAVE_M17N_FLT=no
12009fi
12010
12011### End of font-backend (under X11) section.
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022### Use -lXpm if available, unless `--with-xpm=no'.
12023HAVE_XPM=no
12024LIBXPM=
12025if test "${HAVE_X11}" = "yes"; then
12026 if test "${with_xpm}" != "no"; then
12027 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12028if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12030$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12031if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
12032 $as_echo_n "(cached) " >&6
12033else
12034 ac_check_lib_save_LIBS=$LIBS
12035LIBS="-lXpm -lX11 $LIBS"
12036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12037/* end confdefs.h. */
12038
12039/* Override any GCC internal prototype to avoid an error.
12040 Use char because int might match the return type of a GCC
12041 builtin and then its argument prototype would still apply. */
12042#ifdef __cplusplus
12043extern "C"
12044#endif
12045char XpmReadFileToPixmap ();
12046int
12047main ()
12048{
12049return XpmReadFileToPixmap ();
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054if ac_fn_c_try_link "$LINENO"; then :
12055 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
12056else
12057 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
12058fi
12059rm -f core conftest.err conftest.$ac_objext \
12060 conftest$ac_exeext conftest.$ac_ext
12061LIBS=$ac_check_lib_save_LIBS
12062fi
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12064$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12065if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12066 HAVE_XPM=yes
12067fi
12068
12069fi
12070
12071
12072 if test "${HAVE_XPM}" = "yes"; then
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12074$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12076/* end confdefs.h. */
12077#include "X11/xpm.h"
12078#ifndef XpmReturnAllocPixels
12079no_return_alloc_pixels
12080#endif
12081
12082_ACEOF
12083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12084 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12085 HAVE_XPM=no
12086else
12087 HAVE_XPM=yes
12088fi
12089rm -f conftest*
12090
12091
12092 if test "${HAVE_XPM}" = "yes"; then
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12094$as_echo "yes" >&6; }
12095 else
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098 fi
12099 fi
12100 fi
12101
12102 if test "${HAVE_XPM}" = "yes"; then
12103
12104$as_echo "#define HAVE_XPM 1" >>confdefs.h
12105
12106 LIBXPM=-lXpm
12107 fi
12108fi
12109
12110
12111### Use -ljpeg if available, unless `--with-jpeg=no'.
12112HAVE_JPEG=no
12113LIBJPEG=
12114if test "${HAVE_X11}" = "yes"; then
12115 if test "${with_jpeg}" != "no"; then
12116 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12117if test "x$ac_cv_header_jerror_h" = x""yes; then :
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12119$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12120if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
12121 $as_echo_n "(cached) " >&6
12122else
12123 ac_check_lib_save_LIBS=$LIBS
12124LIBS="-ljpeg $LIBS"
12125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12126/* end confdefs.h. */
12127
12128/* Override any GCC internal prototype to avoid an error.
12129 Use char because int might match the return type of a GCC
12130 builtin and then its argument prototype would still apply. */
12131#ifdef __cplusplus
12132extern "C"
12133#endif
12134char jpeg_destroy_compress ();
12135int
12136main ()
12137{
12138return jpeg_destroy_compress ();
12139 ;
12140 return 0;
12141}
12142_ACEOF
12143if ac_fn_c_try_link "$LINENO"; then :
12144 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
12145else
12146 ac_cv_lib_jpeg_jpeg_destroy_compress=no
12147fi
12148rm -f core conftest.err conftest.$ac_objext \
12149 conftest$ac_exeext conftest.$ac_ext
12150LIBS=$ac_check_lib_save_LIBS
12151fi
12152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12153$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12154if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12155 HAVE_JPEG=yes
12156fi
12157
12158fi
12159
12160
12161 fi
12162
12163 if test "${HAVE_JPEG}" = "yes"; then
12164 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12165
12166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167/* end confdefs.h. */
12168#include <jpeglib.h>
12169 version=JPEG_LIB_VERSION
12170
12171_ACEOF
12172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12173 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12174 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12175
12176else
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12178$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12179 HAVE_JPEG=no
12180fi
12181rm -f conftest*
12182
12183 fi
12184 if test "${HAVE_JPEG}" = "yes"; then
12185 LIBJPEG=-ljpeg
12186 fi
12187fi
12188
12189
12190### Use -lpng if available, unless `--with-png=no'.
12191HAVE_PNG=no
12192LIBPNG=
12193if test "${HAVE_X11}" = "yes"; then
12194 if test "${with_png}" != "no"; then
12195 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12196 # in /usr/include/libpng.
12197 for ac_header in png.h libpng/png.h
12198do :
12199 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12200ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12201eval as_val=\$$as_ac_Header
12202 if test "x$as_val" = x""yes; then :
12203 cat >>confdefs.h <<_ACEOF
12204#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12205_ACEOF
12206 break
12207fi
12208
12209done
12210
12211 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12213$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12214if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12215 $as_echo_n "(cached) " >&6
12216else
12217 ac_check_lib_save_LIBS=$LIBS
12218LIBS="-lpng -lz -lm $LIBS"
12219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12220/* end confdefs.h. */
12221
12222/* Override any GCC internal prototype to avoid an error.
12223 Use char because int might match the return type of a GCC
12224 builtin and then its argument prototype would still apply. */
12225#ifdef __cplusplus
12226extern "C"
12227#endif
12228char png_get_channels ();
12229int
12230main ()
12231{
12232return png_get_channels ();
12233 ;
12234 return 0;
12235}
12236_ACEOF
12237if ac_fn_c_try_link "$LINENO"; then :
12238 ac_cv_lib_png_png_get_channels=yes
12239else
12240 ac_cv_lib_png_png_get_channels=no
12241fi
12242rm -f core conftest.err conftest.$ac_objext \
12243 conftest$ac_exeext conftest.$ac_ext
12244LIBS=$ac_check_lib_save_LIBS
12245fi
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12247$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12248if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12249 HAVE_PNG=yes
12250fi
12251
12252 fi
12253 fi
12254
12255 if test "${HAVE_PNG}" = "yes"; then
12256
12257$as_echo "#define HAVE_PNG 1" >>confdefs.h
12258
12259 LIBPNG="-lpng -lz -lm"
12260
12261 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12262 # include <libpng/png.h>
12263 #else
12264 # include <png.h>
12265 #endif
12266
12267"
12268if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12269
12270else
12271
12272$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
12273
12274fi
12275
12276 fi
12277fi
12278
12279
12280### Use -ltiff if available, unless `--with-tiff=no'.
12281HAVE_TIFF=no
12282LIBTIFF=
12283if test "${HAVE_X11}" = "yes"; then
12284 if test "${with_tiff}" != "no"; then
12285 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12286if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12287 tifflibs="-lz -lm"
12288 # At least one tiff package requires the jpeg library.
12289 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12291$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12292if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
12293 $as_echo_n "(cached) " >&6
12294else
12295 ac_check_lib_save_LIBS=$LIBS
12296LIBS="-ltiff $tifflibs $LIBS"
12297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298/* end confdefs.h. */
12299
12300/* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
12303#ifdef __cplusplus
12304extern "C"
12305#endif
12306char TIFFGetVersion ();
12307int
12308main ()
12309{
12310return TIFFGetVersion ();
12311 ;
12312 return 0;
12313}
12314_ACEOF
12315if ac_fn_c_try_link "$LINENO"; then :
12316 ac_cv_lib_tiff_TIFFGetVersion=yes
12317else
12318 ac_cv_lib_tiff_TIFFGetVersion=no
12319fi
12320rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
12322LIBS=$ac_check_lib_save_LIBS
12323fi
12324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12325$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
12326if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
12327 HAVE_TIFF=yes
12328fi
12329
12330fi
12331
12332
12333 fi
12334
12335 if test "${HAVE_TIFF}" = "yes"; then
12336
12337$as_echo "#define HAVE_TIFF 1" >>confdefs.h
12338
12339 LIBTIFF=-ltiff
12340 fi
12341fi
12342
12343
12344### Use -lgif or -lungif if available, unless `--with-gif=no'.
12345HAVE_GIF=no
12346LIBGIF=
12347if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
12348 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
12349if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
12350 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12351# Earlier versions can crash Emacs.
12352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12353$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
12354if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
12355 $as_echo_n "(cached) " >&6
12356else
12357 ac_check_lib_save_LIBS=$LIBS
12358LIBS="-lgif $LIBS"
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360/* end confdefs.h. */
12361
12362/* Override any GCC internal prototype to avoid an error.
12363 Use char because int might match the return type of a GCC
12364 builtin and then its argument prototype would still apply. */
12365#ifdef __cplusplus
12366extern "C"
12367#endif
12368char EGifPutExtensionLast ();
12369int
12370main ()
12371{
12372return EGifPutExtensionLast ();
12373 ;
12374 return 0;
12375}
12376_ACEOF
12377if ac_fn_c_try_link "$LINENO"; then :
12378 ac_cv_lib_gif_EGifPutExtensionLast=yes
12379else
12380 ac_cv_lib_gif_EGifPutExtensionLast=no
12381fi
12382rm -f core conftest.err conftest.$ac_objext \
12383 conftest$ac_exeext conftest.$ac_ext
12384LIBS=$ac_check_lib_save_LIBS
12385fi
12386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
12387$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
12388if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
12389 HAVE_GIF=yes
12390else
12391 HAVE_GIF=maybe
12392fi
12393
12394fi
12395
12396
12397
12398 if test "$HAVE_GIF" = yes; then
12399 LIBGIF=-lgif
12400 elif test "$HAVE_GIF" = maybe; then
12401# If gif_lib.h but no libgif, try libungif.
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
12403$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
12404if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
12405 $as_echo_n "(cached) " >&6
12406else
12407 ac_check_lib_save_LIBS=$LIBS
12408LIBS="-lungif $LIBS"
12409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410/* end confdefs.h. */
12411
12412/* Override any GCC internal prototype to avoid an error.
12413 Use char because int might match the return type of a GCC
12414 builtin and then its argument prototype would still apply. */
12415#ifdef __cplusplus
12416extern "C"
12417#endif
12418char EGifPutExtensionLast ();
12419int
12420main ()
12421{
12422return EGifPutExtensionLast ();
12423 ;
12424 return 0;
12425}
12426_ACEOF
12427if ac_fn_c_try_link "$LINENO"; then :
12428 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12429else
12430 ac_cv_lib_ungif_EGifPutExtensionLast=no
12431fi
12432rm -f core conftest.err conftest.$ac_objext \
12433 conftest$ac_exeext conftest.$ac_ext
12434LIBS=$ac_check_lib_save_LIBS
12435fi
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
12437$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
12438if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
12439 HAVE_GIF=yes
12440else
12441 HAVE_GIF=no
12442fi
12443
12444 test "$HAVE_GIF" = yes && LIBGIF=-lungif
12445 fi
12446
12447 if test "${HAVE_GIF}" = "yes"; then
12448
12449$as_echo "#define HAVE_GIF 1" >>confdefs.h
12450
12451 fi
12452fi
12453
12454
12455if test "${HAVE_X11}" = "yes"; then
12456 MISSING=""
12457 WITH_NO=""
12458 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
12459 MISSING="libXpm" && WITH_NO="--with-xpm=no"
12460 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
12461 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
12462 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
12463 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
12464 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
12465 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
12466 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
12467 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12468
12469 if test "X${MISSING}" != X; then
12470 as_fn_error "The following required libraries were not found:
12471 $MISSING
12472Maybe some development libraries/packages are missing?
12473If you don't want to link with them give
12474 $WITH_NO
12475as options to configure" "$LINENO" 5
12476 fi
12477fi
12478
12479### Use -lgpm if available, unless `--with-gpm=no'.
12480HAVE_GPM=no
12481LIBGPM=
12482if test "${with_gpm}" != "no"; then
12483 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
12484if test "x$ac_cv_header_gpm_h" = x""yes; then :
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
12486$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
12487if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
12488 $as_echo_n "(cached) " >&6
12489else
12490 ac_check_lib_save_LIBS=$LIBS
12491LIBS="-lgpm $LIBS"
12492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493/* end confdefs.h. */
12494
12495/* Override any GCC internal prototype to avoid an error.
12496 Use char because int might match the return type of a GCC
12497 builtin and then its argument prototype would still apply. */
12498#ifdef __cplusplus
12499extern "C"
12500#endif
12501char Gpm_Open ();
12502int
12503main ()
12504{
12505return Gpm_Open ();
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510if ac_fn_c_try_link "$LINENO"; then :
12511 ac_cv_lib_gpm_Gpm_Open=yes
12512else
12513 ac_cv_lib_gpm_Gpm_Open=no
12514fi
12515rm -f core conftest.err conftest.$ac_objext \
12516 conftest$ac_exeext conftest.$ac_ext
12517LIBS=$ac_check_lib_save_LIBS
12518fi
12519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12520$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
12521if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
12522 HAVE_GPM=yes
12523fi
12524
12525fi
12526
12527
12528
12529 if test "${HAVE_GPM}" = "yes"; then
12530
12531$as_echo "#define HAVE_GPM 1" >>confdefs.h
12532
12533 LIBGPM=-lgpm
12534 fi
12535fi
12536
12537
12538
12539
12540
12541
12542GNUSTEP_CFLAGS=
12543### Use NeXTstep API to implement GUI.
12544if test "${HAVE_NS}" = "yes"; then
12545
12546$as_echo "#define HAVE_NS 1" >>confdefs.h
12547
12548 if test "${NS_IMPL_COCOA}" = "yes"; then
12549
12550$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
12551
12552 fi
12553 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
12554
12555$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
12556
12557 # See also .m.o rule in Makefile.in */
12558 # FIXME: are all these flags really needed? Document here why. */
12559 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
12560 ## Extra CFLAGS applied to src/*.m files.
12561 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
12562 fi
12563 # We also have mouse menus.
12564 HAVE_MENUS=yes
12565 OTHER_FILES=ns-app
12566fi
12567
12568
12569### Use session management (-lSM -lICE) if available
12570HAVE_X_SM=no
12571LIBXSM=
12572if test "${HAVE_X11}" = "yes"; then
12573 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
12574if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
12576$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
12577if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
12578 $as_echo_n "(cached) " >&6
12579else
12580 ac_check_lib_save_LIBS=$LIBS
12581LIBS="-lSM -lICE $LIBS"
12582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12583/* end confdefs.h. */
12584
12585/* Override any GCC internal prototype to avoid an error.
12586 Use char because int might match the return type of a GCC
12587 builtin and then its argument prototype would still apply. */
12588#ifdef __cplusplus
12589extern "C"
12590#endif
12591char SmcOpenConnection ();
12592int
12593main ()
12594{
12595return SmcOpenConnection ();
12596 ;
12597 return 0;
12598}
12599_ACEOF
12600if ac_fn_c_try_link "$LINENO"; then :
12601 ac_cv_lib_SM_SmcOpenConnection=yes
12602else
12603 ac_cv_lib_SM_SmcOpenConnection=no
12604fi
12605rm -f core conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
12607LIBS=$ac_check_lib_save_LIBS
12608fi
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
12610$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
12611if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
12612 HAVE_X_SM=yes
12613fi
12614
12615fi
12616
12617
12618
12619 if test "${HAVE_X_SM}" = "yes"; then
12620
12621$as_echo "#define HAVE_X_SM 1" >>confdefs.h
12622
12623 LIBXSM="-lSM -lICE"
12624 case "$LIBS" in
12625 *-lSM*) ;;
12626 *) LIBS="$LIBXSM $LIBS" ;;
12627 esac
12628 fi
12629fi
12630
12631
12632### Use libxml (-lxml2) if available
12633HAVE_LIBXML2=no
12634if test "${with_xml2}" != "no"; then
12635 ### I'm not sure what the version number should be, so I just guessed.
12636
12637 succeeded=no
12638
12639 if test "$PKG_CONFIG" = "no" ; then
12640 HAVE_LIBXML2=no
12641 else
12642 PKG_CONFIG_MIN_VERSION=0.9.0
12643 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
12645$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
12646
12647 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
12648 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
12649 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
12650 edit_cflags="
12651 s,///*,/,g
12652 s/^/ /
12653 s/ -I/ $isystem/g
12654 s/^ //
12655 "
12656 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
12657 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
12659$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
12660 succeeded=yes
12661 else
12662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12663$as_echo "no" >&6; }
12664 LIBXML2_CFLAGS=""
12665 LIBXML2_LIBS=""
12666 ## If we have a custom action on failure, don't print errors, but
12667 ## do set a variable so people can do so.
12668 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
12669
12670 fi
12671
12672
12673
12674 else
12675 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12676 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12677 fi
12678 fi
12679
12680 if test $succeeded = yes; then
12681 HAVE_LIBXML2=yes
12682 else
12683 HAVE_LIBXML2=no
12684 fi
12685
12686 if test "${HAVE_LIBXML2}" = "yes"; then
12687 LIBS="$LIBXML2_LIBS $LIBS"
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
12689$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
12690if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
12691 $as_echo_n "(cached) " >&6
12692else
12693 ac_check_lib_save_LIBS=$LIBS
12694LIBS="-lxml2 $LIBS"
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697
12698/* Override any GCC internal prototype to avoid an error.
12699 Use char because int might match the return type of a GCC
12700 builtin and then its argument prototype would still apply. */
12701#ifdef __cplusplus
12702extern "C"
12703#endif
12704char htmlReadMemory ();
12705int
12706main ()
12707{
12708return htmlReadMemory ();
12709 ;
12710 return 0;
12711}
12712_ACEOF
12713if ac_fn_c_try_link "$LINENO"; then :
12714 ac_cv_lib_xml2_htmlReadMemory=yes
12715else
12716 ac_cv_lib_xml2_htmlReadMemory=no
12717fi
12718rm -f core conftest.err conftest.$ac_objext \
12719 conftest$ac_exeext conftest.$ac_ext
12720LIBS=$ac_check_lib_save_LIBS
12721fi
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
12723$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
12724if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
12725 HAVE_LIBXML2=yes
12726else
12727 HAVE_LIBXML2=no
12728fi
12729
12730 if test "${HAVE_LIBXML2}" = "yes"; then
12731
12732$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
12733
12734 else
12735 LIBXML2_LIBS=""
12736 LIBXML2_CFLAGS=""
12737 fi
12738 fi
12739fi
12740
12741
12742
12743# If netdb.h doesn't declare h_errno, we must declare it by hand.
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
12745$as_echo_n "checking whether netdb declares h_errno... " >&6; }
12746if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
12747 $as_echo_n "(cached) " >&6
12748else
12749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750/* end confdefs.h. */
12751#include <netdb.h>
12752int
12753main ()
12754{
12755return h_errno;
12756 ;
12757 return 0;
12758}
12759_ACEOF
12760if ac_fn_c_try_link "$LINENO"; then :
12761 emacs_cv_netdb_declares_h_errno=yes
12762else
12763 emacs_cv_netdb_declares_h_errno=no
12764fi
12765rm -f core conftest.err conftest.$ac_objext \
12766 conftest$ac_exeext conftest.$ac_ext
12767fi
12768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
12769$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
12770if test $emacs_cv_netdb_declares_h_errno = yes; then
12771
12772$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
12773
12774fi
12775
12776# fmod, logb, and frexp are found in -lm on most systems.
12777# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
12778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
12779$as_echo_n "checking for sqrt in -lm... " >&6; }
12780if test "${ac_cv_lib_m_sqrt+set}" = set; then :
12781 $as_echo_n "(cached) " >&6
12782else
12783 ac_check_lib_save_LIBS=$LIBS
12784LIBS="-lm $LIBS"
12785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12786/* end confdefs.h. */
12787
12788/* Override any GCC internal prototype to avoid an error.
12789 Use char because int might match the return type of a GCC
12790 builtin and then its argument prototype would still apply. */
12791#ifdef __cplusplus
12792extern "C"
12793#endif
12794char sqrt ();
12795int
12796main ()
12797{
12798return sqrt ();
12799 ;
12800 return 0;
12801}
12802_ACEOF
12803if ac_fn_c_try_link "$LINENO"; then :
12804 ac_cv_lib_m_sqrt=yes
12805else
12806 ac_cv_lib_m_sqrt=no
12807fi
12808rm -f core conftest.err conftest.$ac_objext \
12809 conftest$ac_exeext conftest.$ac_ext
12810LIBS=$ac_check_lib_save_LIBS
12811fi
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
12813$as_echo "$ac_cv_lib_m_sqrt" >&6; }
12814if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
12815 cat >>confdefs.h <<_ACEOF
12816#define HAVE_LIBM 1
12817_ACEOF
12818
12819 LIBS="-lm $LIBS"
12820
12821fi
12822
12823
12824# Check for mail-locking functions in a "mail" library. Probably this should
12825# have the same check as for liblockfile below.
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
12827$as_echo_n "checking for maillock in -lmail... " >&6; }
12828if test "${ac_cv_lib_mail_maillock+set}" = set; then :
12829 $as_echo_n "(cached) " >&6
12830else
12831 ac_check_lib_save_LIBS=$LIBS
12832LIBS="-lmail $LIBS"
12833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12834/* end confdefs.h. */
12835
12836/* Override any GCC internal prototype to avoid an error.
12837 Use char because int might match the return type of a GCC
12838 builtin and then its argument prototype would still apply. */
12839#ifdef __cplusplus
12840extern "C"
12841#endif
12842char maillock ();
12843int
12844main ()
12845{
12846return maillock ();
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851if ac_fn_c_try_link "$LINENO"; then :
12852 ac_cv_lib_mail_maillock=yes
12853else
12854 ac_cv_lib_mail_maillock=no
12855fi
12856rm -f core conftest.err conftest.$ac_objext \
12857 conftest$ac_exeext conftest.$ac_ext
12858LIBS=$ac_check_lib_save_LIBS
12859fi
12860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
12861$as_echo "$ac_cv_lib_mail_maillock" >&6; }
12862if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
12863 have_mail=yes
12864else
12865 have_mail=no
12866fi
12867
12868if test $have_mail = yes; then
12869 LIBS_MAIL=-lmail
12870 LIBS="$LIBS_MAIL $LIBS"
12871
12872$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
12873
12874else
12875 LIBS_MAIL=
12876fi
12877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
12878$as_echo_n "checking for maillock in -llockfile... " >&6; }
12879if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
12880 $as_echo_n "(cached) " >&6
12881else
12882 ac_check_lib_save_LIBS=$LIBS
12883LIBS="-llockfile $LIBS"
12884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885/* end confdefs.h. */
12886
12887/* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
12890#ifdef __cplusplus
12891extern "C"
12892#endif
12893char maillock ();
12894int
12895main ()
12896{
12897return maillock ();
12898 ;
12899 return 0;
12900}
12901_ACEOF
12902if ac_fn_c_try_link "$LINENO"; then :
12903 ac_cv_lib_lockfile_maillock=yes
12904else
12905 ac_cv_lib_lockfile_maillock=no
12906fi
12907rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
12909LIBS=$ac_check_lib_save_LIBS
12910fi
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
12912$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
12913if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
12914 have_lockfile=yes
12915else
12916 have_lockfile=no
12917fi
12918
12919if test $have_lockfile = yes; then
12920 LIBS_MAIL=-llockfile
12921 LIBS="$LIBS_MAIL $LIBS"
12922
12923$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
12924
12925else
12926# If we have the shared liblockfile, assume we must use it for mail
12927# locking (e.g. Debian). If we couldn't link against liblockfile
12928# (no liblockfile.a installed), ensure that we don't need to.
12929 # Extract the first word of "liblockfile.so", so it can be a program name with args.
12930set dummy liblockfile.so; ac_word=$2
12931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12932$as_echo_n "checking for $ac_word... " >&6; }
12933if test "${ac_cv_prog_liblockfile+set}" = set; then :
12934 $as_echo_n "(cached) " >&6
12935else
12936 if test -n "$liblockfile"; then
12937 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
12938else
12939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12940as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
12941for as_dir in $as_dummy
12942do
12943 IFS=$as_save_IFS
12944 test -z "$as_dir" && as_dir=.
12945 for ac_exec_ext in '' $ac_executable_extensions; do
12946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12947 ac_cv_prog_liblockfile="yes"
12948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12949 break 2
12950 fi
12951done
12952 done
12953IFS=$as_save_IFS
12954
12955 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
12956fi
12957fi
12958liblockfile=$ac_cv_prog_liblockfile
12959if test -n "$liblockfile"; then
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
12961$as_echo "$liblockfile" >&6; }
12962else
12963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12964$as_echo "no" >&6; }
12965fi
12966
12967
12968 if test $ac_cv_prog_liblockfile = yes; then
12969 as_fn_error "Shared liblockfile found but can't link against it.
12970This probably means that movemail could lose mail.
12971There may be a \`development' package to install containing liblockfile." "$LINENO" 5
12972 fi
12973fi
12974
12975
12976
12977
12978
12979## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
12980## interlock access to the mail spool. The alternative is a lock file named
12981## /usr/spool/mail/$USER.lock.
12982mail_lock=no
12983case "$opsys" in
12984 aix4-2) mail_lock="lockf" ;;
12985
12986 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
12987
12988 ## On GNU/Linux systems, both methods are used by various mail programs.
12989 ## I assume most people are using newer mailers that have heard of flock.
12990 ## Change this if you need to.
12991 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
12992 ## configure gets the right answers, and that means *NOT* using flock.
12993 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
12994 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
12995 ## Debian maintainer hasn't provided a clean fix for Emacs.
12996 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
12997 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
12998 ## correct logic. -- fx
12999 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13000 ## liblockfile is a Free Software replacement for libmail, used on
13001 ## Debian systems and elsewhere. -rfr.
13002 gnu-*)
13003 mail_lock="flock"
13004 if test $have_mail = yes || test $have_lockfile = yes; then
13005 test $ac_cv_header_maillock_h = yes && mail_lock=no
13006 fi
13007 ;;
13008esac
13009
13010BLESSMAIL_TARGET=
13011case "$mail_lock" in
13012 flock)
13013$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13014 ;;
13015
13016 lockf)
13017$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13018 ;;
13019
13020 *) BLESSMAIL_TARGET="need-blessmail" ;;
13021esac
13022
13023
13024
13025for ac_func in gethostname \
13026closedir getrusage get_current_dir_name \
13027lrand48 logb frexp fmod cbrt setsid \
13028fpathconf select euidaccess getpagesize setlocale \
13029utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
13030__fpending strsignal setitimer \
13031sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13032gai_strerror mkstemp getline getdelim fsync sync \
13033difftime posix_memalign \
13034getpwent endpwent getgrent endgrent \
13035touchlock \
13036cfmakeraw cfsetspeed copysign __executable_start
13037do :
13038 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13039ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13040eval as_val=\$$as_ac_var
13041 if test "x$as_val" = x""yes; then :
13042 cat >>confdefs.h <<_ACEOF
13043#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13044_ACEOF
13045
13046fi
13047done
13048
13049
13050if test $opsys != unixware; then
13051 for ac_func in getwd
13052do :
13053 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13054if test "x$ac_cv_func_getwd" = x""yes; then :
13055 cat >>confdefs.h <<_ACEOF
13056#define HAVE_GETWD 1
13057_ACEOF
13058
13059fi
13060done
13061
13062fi
13063
13064## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13065## has a broken `rint' in some library versions including math library
13066## version number A.09.05.
13067## You can fix the math library by installing patch number PHSS_4630.
13068## But we can fix it more reliably for Emacs by just not using rint.
13069## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h.
13070case $opsys in
13071 hpux*) : ;;
13072 *) for ac_func in random rint
13073do :
13074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13075ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13076eval as_val=\$$as_ac_var
13077 if test "x$as_val" = x""yes; then :
13078 cat >>confdefs.h <<_ACEOF
13079#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13080_ACEOF
13081
13082fi
13083done
13084 ;;
13085esac
13086
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13088$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13089if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
13090 $as_echo_n "(cached) " >&6
13091else
13092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13093/* end confdefs.h. */
13094
13095int
13096main ()
13097{
13098__builtin_unwind_init ();
13099 ;
13100 return 0;
13101}
13102_ACEOF
13103if ac_fn_c_try_link "$LINENO"; then :
13104 emacs_cv_func___builtin_unwind_init=yes
13105else
13106 emacs_cv_func___builtin_unwind_init=no
13107fi
13108rm -f core conftest.err conftest.$ac_objext \
13109 conftest$ac_exeext conftest.$ac_ext
13110fi
13111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13112$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13113if test $emacs_cv_func___builtin_unwind_init = yes; then
13114
13115$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
13116
13117fi
13118
13119
13120
13121
13122
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13124$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13125if test "${ac_cv_sys_largefile_source+set}" = set; then :
13126 $as_echo_n "(cached) " >&6
13127else
13128 while :; do
13129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h. */
13131#include <sys/types.h> /* for off_t */
13132 #include <stdio.h>
13133int
13134main ()
13135{
13136int (*fp) (FILE *, off_t, int) = fseeko;
13137 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13138 ;
13139 return 0;
13140}
13141_ACEOF
13142if ac_fn_c_try_link "$LINENO"; then :
13143 ac_cv_sys_largefile_source=no; break
13144fi
13145rm -f core conftest.err conftest.$ac_objext \
13146 conftest$ac_exeext conftest.$ac_ext
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148/* end confdefs.h. */
13149#define _LARGEFILE_SOURCE 1
13150#include <sys/types.h> /* for off_t */
13151 #include <stdio.h>
13152int
13153main ()
13154{
13155int (*fp) (FILE *, off_t, int) = fseeko;
13156 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161if ac_fn_c_try_link "$LINENO"; then :
13162 ac_cv_sys_largefile_source=1; break
13163fi
13164rm -f core conftest.err conftest.$ac_objext \
13165 conftest$ac_exeext conftest.$ac_ext
13166 ac_cv_sys_largefile_source=unknown
13167 break
13168done
13169fi
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13171$as_echo "$ac_cv_sys_largefile_source" >&6; }
13172case $ac_cv_sys_largefile_source in #(
13173 no | unknown) ;;
13174 *)
13175cat >>confdefs.h <<_ACEOF
13176#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13177_ACEOF
13178;;
13179esac
13180rm -rf conftest*
13181
13182# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13183# in glibc 2.1.3, but that breaks too many other things.
13184# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13185if test $ac_cv_sys_largefile_source != unknown; then
13186
13187$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13188
13189fi
13190
13191
13192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13193$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13194if test "${ac_cv_func_getpgrp_void+set}" = set; then :
13195 $as_echo_n "(cached) " >&6
13196else
13197 # Use it with a single arg.
13198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199/* end confdefs.h. */
13200$ac_includes_default
13201int
13202main ()
13203{
13204getpgrp (0);
13205 ;
13206 return 0;
13207}
13208_ACEOF
13209if ac_fn_c_try_compile "$LINENO"; then :
13210 ac_cv_func_getpgrp_void=no
13211else
13212 ac_cv_func_getpgrp_void=yes
13213fi
13214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13215
13216fi
13217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13218$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13219if test $ac_cv_func_getpgrp_void = yes; then
13220
13221$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
13222
13223fi
13224
13225
13226# UNIX98 PTYs.
13227for ac_func in grantpt
13228do :
13229 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13230if test "x$ac_cv_func_grantpt" = x""yes; then :
13231 cat >>confdefs.h <<_ACEOF
13232#define HAVE_GRANTPT 1
13233_ACEOF
13234
13235fi
13236done
13237
13238
13239# PTY-related GNU extensions.
13240for ac_func in getpt
13241do :
13242 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
13243if test "x$ac_cv_func_getpt" = x""yes; then :
13244 cat >>confdefs.h <<_ACEOF
13245#define HAVE_GETPT 1
13246_ACEOF
13247
13248fi
13249done
13250
13251
13252# Check this now, so that we will NOT find the above functions in ncurses.
13253# That is because we have not set up to link ncurses in lib-src.
13254# It's better to believe a function is not available
13255# than to expect to find it in ncurses.
13256# Also we need tputs and friends to be able to build at all.
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13258$as_echo_n "checking for library containing tputs... " >&6; }
13259# Run a test program that contains a call to tputs, a call that is
13260# never executed. This tests whether a pre-'main' dynamic linker
13261# works with the library. It's too much trouble to actually call
13262# tputs in the test program, due to portability hassles. When
13263# cross-compiling, assume the test program will run if it links.
13264
13265# Maybe curses should be tried earlier?
13266# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13267for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13268 OLIBS=$LIBS
13269 if test -z "$tputs_library"; then
13270 LIBS_TERMCAP=
13271 msg='none required'
13272 else
13273 LIBS_TERMCAP=-l$tputs_library
13274 msg=$LIBS_TERMCAP
13275 LIBS="$LIBS_TERMCAP $LIBS"
13276 fi
13277 if test "$cross_compiling" = yes; then :
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279/* end confdefs.h. */
13280
13281 extern void tputs (const char *, int, int (*)(int));
13282 int main (int argc, char **argv)
13283 {
13284 if (argc == 10000)
13285 tputs (argv[0], 0, 0);
13286 return 0;
13287 }
13288
13289_ACEOF
13290if ac_fn_c_try_link "$LINENO"; then :
13291
13292else
13293 msg=no
13294fi
13295rm -f core conftest.err conftest.$ac_objext \
13296 conftest$ac_exeext conftest.$ac_ext
13297else
13298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h. */
13300
13301 extern void tputs (const char *, int, int (*)(int));
13302 int main (int argc, char **argv)
13303 {
13304 if (argc == 10000)
13305 tputs (argv[0], 0, 0);
13306 return 0;
13307 }
13308
13309_ACEOF
13310if ac_fn_c_try_run "$LINENO"; then :
13311
13312else
13313 msg=no
13314fi
13315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13316 conftest.$ac_objext conftest.beam conftest.$ac_ext
13317fi
13318
13319 LIBS=$OLIBS
13320 if test "X$msg" != Xno; then
13321 break
13322 fi
13323done
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13325$as_echo "$msg" >&6; }
13326if test "X$msg" = Xno; then
13327 as_fn_error "The required function \`tputs' was not found in any library.
13328The following libraries were tried (in order):
13329 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13330Please try installing whichever of these libraries is most appropriate
13331for your system, together with its header files.
13332For example, a libncurses-dev(el) or similar package." "$LINENO" 5
13333fi
13334
13335## Use termcap instead of terminfo?
13336## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13337TERMINFO=yes
13338## FIXME? In the cases below where we unconditionally set
13339## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
13340## if that was found above to have tputs.
13341## Should we use the gnu* logic everywhere?
13342case "$opsys" in
13343 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13344 ## The ncurses library has been moved out of the System framework in
13345 ## Mac OS X 10.2. So if configure detects it, set the command-line
13346 ## option to use it.
13347 darwin) LIBS_TERMCAP="-lncurses" ;;
13348
13349 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
13350
13351 freebsd)
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13353$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13354 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
13355 $as_echo_n "(cached) " >&6
13356else
13357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13358/* end confdefs.h. */
13359#include <osreldate.h>
13360int
13361main ()
13362{
13363#if __FreeBSD_version < 400000
13364fail;
13365#endif
13366
13367 ;
13368 return 0;
13369}
13370_ACEOF
13371if ac_fn_c_try_link "$LINENO"; then :
13372 emacs_cv_freebsd_terminfo=yes
13373else
13374 emacs_cv_freebsd_terminfo=no
13375fi
13376rm -f core conftest.err conftest.$ac_objext \
13377 conftest$ac_exeext conftest.$ac_ext
13378fi
13379
13380
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13382$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13383
13384 if test $emacs_cv_freebsd_terminfo = yes; then
13385 LIBS_TERMCAP="-lncurses"
13386 else
13387 TERMINFO=no
13388 LIBS_TERMCAP="-ltermcap"
13389 fi
13390 ;;
13391
13392 netbsd)
13393 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
13394 TERMINFO=no
13395 LIBS_TERMCAP="-ltermcap"
13396 fi
13397 ;;
13398
13399 openbsd) LIBS_TERMCAP="-lncurses" ;;
13400
13401 ## hpux: Make sure we get select from libc rather than from libcurses
13402 ## because libcurses on HPUX 10.10 has a broken version of select.
13403 ## We used to use -lc -lcurses, but this may be cleaner.
13404 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
13405 # set that way, now it uses the default). Isn't this a contradiction?
13406 hpux*) LIBS_TERMCAP="-ltermcap" ;;
13407
13408esac
13409
13410TERMCAP_OBJ=tparam.o
13411if test $TERMINFO = yes; then
13412
13413$as_echo "#define TERMINFO 1" >>confdefs.h
13414
13415 TERMCAP_OBJ=terminfo.o
13416fi
13417
13418
13419
13420
13421# Do we have res_init, for detecting changes in /etc/resolv.conf?
13422# On Darwin, res_init appears not to be useful: see bug#562 and
13423# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
13424resolv=no
13425
13426if test $opsys != darwin; then
13427
13428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429/* end confdefs.h. */
13430#include <netinet/in.h>
13431#include <arpa/nameser.h>
13432#include <resolv.h>
13433int
13434main ()
13435{
13436return res_init();
13437 ;
13438 return 0;
13439}
13440_ACEOF
13441if ac_fn_c_try_link "$LINENO"; then :
13442 have_res_init=yes
13443else
13444 have_res_init=no
13445fi
13446rm -f core conftest.err conftest.$ac_objext \
13447 conftest$ac_exeext conftest.$ac_ext
13448 if test "$have_res_init" = no; then
13449 OLIBS="$LIBS"
13450 LIBS="$LIBS -lresolv"
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13452$as_echo_n "checking for res_init with -lresolv... " >&6; }
13453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454/* end confdefs.h. */
13455#include <netinet/in.h>
13456#include <arpa/nameser.h>
13457#include <resolv.h>
13458int
13459main ()
13460{
13461return res_init();
13462 ;
13463 return 0;
13464}
13465_ACEOF
13466if ac_fn_c_try_link "$LINENO"; then :
13467 have_res_init=yes
13468else
13469 have_res_init=no
13470fi
13471rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13474$as_echo "$have_res_init" >&6; }
13475 if test "$have_res_init" = yes ; then
13476 resolv=yes
13477 fi
13478 LIBS="$OLIBS"
13479 fi
13480
13481 if test "$have_res_init" = yes; then
13482
13483$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
13484
13485 fi
13486fi
13487# Do we need the Hesiod library to provide the support routines?
13488LIBHESIOD=
13489if test "$with_hesiod" != no ; then
13490 # Don't set $LIBS here -- see comments above. FIXME which comments?
13491 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13492if test "x$ac_cv_func_res_send" = x""yes; then :
13493
13494else
13495 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13496if test "x$ac_cv_func___res_send" = x""yes; then :
13497
13498else
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13500$as_echo_n "checking for res_send in -lresolv... " >&6; }
13501if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
13502 $as_echo_n "(cached) " >&6
13503else
13504 ac_check_lib_save_LIBS=$LIBS
13505LIBS="-lresolv $LIBS"
13506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507/* end confdefs.h. */
13508
13509/* Override any GCC internal prototype to avoid an error.
13510 Use char because int might match the return type of a GCC
13511 builtin and then its argument prototype would still apply. */
13512#ifdef __cplusplus
13513extern "C"
13514#endif
13515char res_send ();
13516int
13517main ()
13518{
13519return res_send ();
13520 ;
13521 return 0;
13522}
13523_ACEOF
13524if ac_fn_c_try_link "$LINENO"; then :
13525 ac_cv_lib_resolv_res_send=yes
13526else
13527 ac_cv_lib_resolv_res_send=no
13528fi
13529rm -f core conftest.err conftest.$ac_objext \
13530 conftest$ac_exeext conftest.$ac_ext
13531LIBS=$ac_check_lib_save_LIBS
13532fi
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13534$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13535if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13536 resolv=yes
13537else
13538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13539$as_echo_n "checking for __res_send in -lresolv... " >&6; }
13540if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
13541 $as_echo_n "(cached) " >&6
13542else
13543 ac_check_lib_save_LIBS=$LIBS
13544LIBS="-lresolv $LIBS"
13545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13546/* end confdefs.h. */
13547
13548/* Override any GCC internal prototype to avoid an error.
13549 Use char because int might match the return type of a GCC
13550 builtin and then its argument prototype would still apply. */
13551#ifdef __cplusplus
13552extern "C"
13553#endif
13554char __res_send ();
13555int
13556main ()
13557{
13558return __res_send ();
13559 ;
13560 return 0;
13561}
13562_ACEOF
13563if ac_fn_c_try_link "$LINENO"; then :
13564 ac_cv_lib_resolv___res_send=yes
13565else
13566 ac_cv_lib_resolv___res_send=no
13567fi
13568rm -f core conftest.err conftest.$ac_objext \
13569 conftest$ac_exeext conftest.$ac_ext
13570LIBS=$ac_check_lib_save_LIBS
13571fi
13572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13573$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13574if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13575 resolv=yes
13576fi
13577
13578fi
13579
13580fi
13581
13582fi
13583
13584 if test "$resolv" = yes ; then
13585 RESOLVLIB=-lresolv
13586 else
13587 RESOLVLIB=
13588 fi
13589 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13590if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
13591
13592else
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13594$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13595if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
13596 $as_echo_n "(cached) " >&6
13597else
13598 ac_check_lib_save_LIBS=$LIBS
13599LIBS="-lhesiod $RESOLVLIB $LIBS"
13600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h. */
13602
13603/* Override any GCC internal prototype to avoid an error.
13604 Use char because int might match the return type of a GCC
13605 builtin and then its argument prototype would still apply. */
13606#ifdef __cplusplus
13607extern "C"
13608#endif
13609char hes_getmailhost ();
13610int
13611main ()
13612{
13613return hes_getmailhost ();
13614 ;
13615 return 0;
13616}
13617_ACEOF
13618if ac_fn_c_try_link "$LINENO"; then :
13619 ac_cv_lib_hesiod_hes_getmailhost=yes
13620else
13621 ac_cv_lib_hesiod_hes_getmailhost=no
13622fi
13623rm -f core conftest.err conftest.$ac_objext \
13624 conftest$ac_exeext conftest.$ac_ext
13625LIBS=$ac_check_lib_save_LIBS
13626fi
13627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13628$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13629if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13630 hesiod=yes
13631else
13632 :
13633fi
13634
13635fi
13636
13637
13638 if test x"$hesiod" = xyes; then
13639
13640$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
13641
13642 LIBHESIOD=-lhesiod
13643 fi
13644fi
13645
13646
13647# Do we need libresolv (due to res_init or Hesiod)?
13648if test "$resolv" = yes && test $opsys != darwin; then
13649
13650$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
13651
13652 LIBRESOLV=-lresolv
13653else
13654 LIBRESOLV=
13655fi
13656
13657
13658# These tell us which Kerberos-related libraries to use.
13659COM_ERRLIB=
13660CRYPTOLIB=
13661KRB5LIB=
13662DESLIB=
13663KRB4LIB=
13664
13665if test "${with_kerberos}" != no; then
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13667$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13668if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
13669 $as_echo_n "(cached) " >&6
13670else
13671 ac_check_lib_save_LIBS=$LIBS
13672LIBS="-lcom_err $LIBS"
13673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675
13676/* Override any GCC internal prototype to avoid an error.
13677 Use char because int might match the return type of a GCC
13678 builtin and then its argument prototype would still apply. */
13679#ifdef __cplusplus
13680extern "C"
13681#endif
13682char com_err ();
13683int
13684main ()
13685{
13686return com_err ();
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691if ac_fn_c_try_link "$LINENO"; then :
13692 ac_cv_lib_com_err_com_err=yes
13693else
13694 ac_cv_lib_com_err_com_err=no
13695fi
13696rm -f core conftest.err conftest.$ac_objext \
13697 conftest$ac_exeext conftest.$ac_ext
13698LIBS=$ac_check_lib_save_LIBS
13699fi
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13701$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13702if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13703 have_com_err=yes
13704else
13705 have_com_err=no
13706fi
13707
13708 if test $have_com_err = yes; then
13709 COM_ERRLIB=-lcom_err
13710 LIBS="$COM_ERRLIB $LIBS"
13711
13712$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
13713
13714 fi
13715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13716$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13717if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
13718 $as_echo_n "(cached) " >&6
13719else
13720 ac_check_lib_save_LIBS=$LIBS
13721LIBS="-lcrypto $LIBS"
13722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13723/* end confdefs.h. */
13724
13725/* Override any GCC internal prototype to avoid an error.
13726 Use char because int might match the return type of a GCC
13727 builtin and then its argument prototype would still apply. */
13728#ifdef __cplusplus
13729extern "C"
13730#endif
13731char mit_des_cbc_encrypt ();
13732int
13733main ()
13734{
13735return mit_des_cbc_encrypt ();
13736 ;
13737 return 0;
13738}
13739_ACEOF
13740if ac_fn_c_try_link "$LINENO"; then :
13741 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
13742else
13743 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
13744fi
13745rm -f core conftest.err conftest.$ac_objext \
13746 conftest$ac_exeext conftest.$ac_ext
13747LIBS=$ac_check_lib_save_LIBS
13748fi
13749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13750$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13751if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13752 have_crypto=yes
13753else
13754 have_crypto=no
13755fi
13756
13757 if test $have_crypto = yes; then
13758 CRYPTOLIB=-lcrypto
13759 LIBS="$CRYPTOLIB $LIBS"
13760
13761$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
13762
13763 fi
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13765$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13766if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
13767 $as_echo_n "(cached) " >&6
13768else
13769 ac_check_lib_save_LIBS=$LIBS
13770LIBS="-lk5crypto $LIBS"
13771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13772/* end confdefs.h. */
13773
13774/* Override any GCC internal prototype to avoid an error.
13775 Use char because int might match the return type of a GCC
13776 builtin and then its argument prototype would still apply. */
13777#ifdef __cplusplus
13778extern "C"
13779#endif
13780char mit_des_cbc_encrypt ();
13781int
13782main ()
13783{
13784return mit_des_cbc_encrypt ();
13785 ;
13786 return 0;
13787}
13788_ACEOF
13789if ac_fn_c_try_link "$LINENO"; then :
13790 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
13791else
13792 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
13793fi
13794rm -f core conftest.err conftest.$ac_objext \
13795 conftest$ac_exeext conftest.$ac_ext
13796LIBS=$ac_check_lib_save_LIBS
13797fi
13798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13799$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13800if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13801 have_k5crypto=yes
13802else
13803 have_k5crypto=no
13804fi
13805
13806 if test $have_k5crypto = yes; then
13807 CRYPTOLIB=-lk5crypto
13808 LIBS="$CRYPTOLIB $LIBS"
13809
13810$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
13811
13812 fi
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13814$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13815if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
13816 $as_echo_n "(cached) " >&6
13817else
13818 ac_check_lib_save_LIBS=$LIBS
13819LIBS="-lkrb5 $LIBS"
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822
13823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
13826#ifdef __cplusplus
13827extern "C"
13828#endif
13829char krb5_init_context ();
13830int
13831main ()
13832{
13833return krb5_init_context ();
13834 ;
13835 return 0;
13836}
13837_ACEOF
13838if ac_fn_c_try_link "$LINENO"; then :
13839 ac_cv_lib_krb5_krb5_init_context=yes
13840else
13841 ac_cv_lib_krb5_krb5_init_context=no
13842fi
13843rm -f core conftest.err conftest.$ac_objext \
13844 conftest$ac_exeext conftest.$ac_ext
13845LIBS=$ac_check_lib_save_LIBS
13846fi
13847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
13848$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
13849if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
13850 have_krb5=yes
13851else
13852 have_krb5=no
13853fi
13854
13855 if test $have_krb5=yes; then
13856 KRB5LIB=-lkrb5
13857 LIBS="$KRB5LIB $LIBS"
13858
13859$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
13860
13861 fi
13862 if test "${with_kerberos5}" = no; then
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
13864$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
13865if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
13866 $as_echo_n "(cached) " >&6
13867else
13868 ac_check_lib_save_LIBS=$LIBS
13869LIBS="-ldes425 $LIBS"
13870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871/* end confdefs.h. */
13872
13873/* Override any GCC internal prototype to avoid an error.
13874 Use char because int might match the return type of a GCC
13875 builtin and then its argument prototype would still apply. */
13876#ifdef __cplusplus
13877extern "C"
13878#endif
13879char des_cbc_encrypt ();
13880int
13881main ()
13882{
13883return des_cbc_encrypt ();
13884 ;
13885 return 0;
13886}
13887_ACEOF
13888if ac_fn_c_try_link "$LINENO"; then :
13889 ac_cv_lib_des425_des_cbc_encrypt=yes
13890else
13891 ac_cv_lib_des425_des_cbc_encrypt=no
13892fi
13893rm -f core conftest.err conftest.$ac_objext \
13894 conftest$ac_exeext conftest.$ac_ext
13895LIBS=$ac_check_lib_save_LIBS
13896fi
13897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
13898$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
13899if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
13900 have_des425=yes
13901else
13902 have_des425=no
13903fi
13904
13905 if test $have_des425 = yes; then
13906 DESLIB=-ldes425
13907 LIBS="$DESLIB $LIBS"
13908
13909$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
13910
13911 else
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
13913$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
13914if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
13915 $as_echo_n "(cached) " >&6
13916else
13917 ac_check_lib_save_LIBS=$LIBS
13918LIBS="-ldes $LIBS"
13919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920/* end confdefs.h. */
13921
13922/* Override any GCC internal prototype to avoid an error.
13923 Use char because int might match the return type of a GCC
13924 builtin and then its argument prototype would still apply. */
13925#ifdef __cplusplus
13926extern "C"
13927#endif
13928char des_cbc_encrypt ();
13929int
13930main ()
13931{
13932return des_cbc_encrypt ();
13933 ;
13934 return 0;
13935}
13936_ACEOF
13937if ac_fn_c_try_link "$LINENO"; then :
13938 ac_cv_lib_des_des_cbc_encrypt=yes
13939else
13940 ac_cv_lib_des_des_cbc_encrypt=no
13941fi
13942rm -f core conftest.err conftest.$ac_objext \
13943 conftest$ac_exeext conftest.$ac_ext
13944LIBS=$ac_check_lib_save_LIBS
13945fi
13946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
13947$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
13948if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
13949 have_des=yes
13950else
13951 have_des=no
13952fi
13953
13954 if test $have_des = yes; then
13955 DESLIB=-ldes
13956 LIBS="$DESLIB $LIBS"
13957
13958$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
13959
13960 fi
13961 fi
13962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13963$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13964if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
13965 $as_echo_n "(cached) " >&6
13966else
13967 ac_check_lib_save_LIBS=$LIBS
13968LIBS="-lkrb4 $LIBS"
13969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970/* end confdefs.h. */
13971
13972/* Override any GCC internal prototype to avoid an error.
13973 Use char because int might match the return type of a GCC
13974 builtin and then its argument prototype would still apply. */
13975#ifdef __cplusplus
13976extern "C"
13977#endif
13978char krb_get_cred ();
13979int
13980main ()
13981{
13982return krb_get_cred ();
13983 ;
13984 return 0;
13985}
13986_ACEOF
13987if ac_fn_c_try_link "$LINENO"; then :
13988 ac_cv_lib_krb4_krb_get_cred=yes
13989else
13990 ac_cv_lib_krb4_krb_get_cred=no
13991fi
13992rm -f core conftest.err conftest.$ac_objext \
13993 conftest$ac_exeext conftest.$ac_ext
13994LIBS=$ac_check_lib_save_LIBS
13995fi
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13997$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13998if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13999 have_krb4=yes
14000else
14001 have_krb4=no
14002fi
14003
14004 if test $have_krb4 = yes; then
14005 KRB4LIB=-lkrb4
14006 LIBS="$KRB4LIB $LIBS"
14007
14008$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14009
14010 else
14011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14012$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14013if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14014 $as_echo_n "(cached) " >&6
14015else
14016 ac_check_lib_save_LIBS=$LIBS
14017LIBS="-lkrb $LIBS"
14018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019/* end confdefs.h. */
14020
14021/* Override any GCC internal prototype to avoid an error.
14022 Use char because int might match the return type of a GCC
14023 builtin and then its argument prototype would still apply. */
14024#ifdef __cplusplus
14025extern "C"
14026#endif
14027char krb_get_cred ();
14028int
14029main ()
14030{
14031return krb_get_cred ();
14032 ;
14033 return 0;
14034}
14035_ACEOF
14036if ac_fn_c_try_link "$LINENO"; then :
14037 ac_cv_lib_krb_krb_get_cred=yes
14038else
14039 ac_cv_lib_krb_krb_get_cred=no
14040fi
14041rm -f core conftest.err conftest.$ac_objext \
14042 conftest$ac_exeext conftest.$ac_ext
14043LIBS=$ac_check_lib_save_LIBS
14044fi
14045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14046$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14047if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14048 have_krb=yes
14049else
14050 have_krb=no
14051fi
14052
14053 if test $have_krb = yes; then
14054 KRB4LIB=-lkrb
14055 LIBS="$KRB4LIB $LIBS"
14056
14057$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14058
14059 fi
14060 fi
14061 fi
14062
14063 if test "${with_kerberos5}" != no; then
14064 for ac_header in krb5.h
14065do :
14066 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14067if test "x$ac_cv_header_krb5_h" = x""yes; then :
14068 cat >>confdefs.h <<_ACEOF
14069#define HAVE_KRB5_H 1
14070_ACEOF
14071 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14072"
14073if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14074
14075cat >>confdefs.h <<_ACEOF
14076#define HAVE_KRB5_ERROR_TEXT 1
14077_ACEOF
14078
14079
14080fi
14081ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14082"
14083if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
14084
14085cat >>confdefs.h <<_ACEOF
14086#define HAVE_KRB5_ERROR_E_TEXT 1
14087_ACEOF
14088
14089
14090fi
14091
14092fi
14093
14094done
14095
14096 else
14097 for ac_header in des.h
14098do :
14099 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14100if test "x$ac_cv_header_des_h" = x""yes; then :
14101 cat >>confdefs.h <<_ACEOF
14102#define HAVE_DES_H 1
14103_ACEOF
14104
14105else
14106 for ac_header in kerberosIV/des.h
14107do :
14108 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14109if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14110 cat >>confdefs.h <<_ACEOF
14111#define HAVE_KERBEROSIV_DES_H 1
14112_ACEOF
14113
14114else
14115 for ac_header in kerberos/des.h
14116do :
14117 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14118if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14119 cat >>confdefs.h <<_ACEOF
14120#define HAVE_KERBEROS_DES_H 1
14121_ACEOF
14122
14123fi
14124
14125done
14126
14127fi
14128
14129done
14130
14131fi
14132
14133done
14134
14135 for ac_header in krb.h
14136do :
14137 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14138if test "x$ac_cv_header_krb_h" = x""yes; then :
14139 cat >>confdefs.h <<_ACEOF
14140#define HAVE_KRB_H 1
14141_ACEOF
14142
14143else
14144 for ac_header in kerberosIV/krb.h
14145do :
14146 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14147if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14148 cat >>confdefs.h <<_ACEOF
14149#define HAVE_KERBEROSIV_KRB_H 1
14150_ACEOF
14151
14152else
14153 for ac_header in kerberos/krb.h
14154do :
14155 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14156if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14157 cat >>confdefs.h <<_ACEOF
14158#define HAVE_KERBEROS_KRB_H 1
14159_ACEOF
14160
14161fi
14162
14163done
14164
14165fi
14166
14167done
14168
14169fi
14170
14171done
14172
14173 fi
14174 for ac_header in com_err.h
14175do :
14176 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14177if test "x$ac_cv_header_com_err_h" = x""yes; then :
14178 cat >>confdefs.h <<_ACEOF
14179#define HAVE_COM_ERR_H 1
14180_ACEOF
14181
14182fi
14183
14184done
14185
14186fi
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197 for ac_func in $ac_func_list
14198do :
14199 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14200ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14201eval as_val=\$$as_ac_var
14202 if test "x$as_val" = x""yes; then :
14203 cat >>confdefs.h <<_ACEOF
14204#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14205_ACEOF
14206
14207fi
14208done
14209
14210
14211
14212
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14214$as_echo_n "checking whether localtime caches TZ... " >&6; }
14215if test "${emacs_cv_localtime_cache+set}" = set; then :
14216 $as_echo_n "(cached) " >&6
14217else
14218 if test x$ac_cv_func_tzset = xyes; then
14219if test "$cross_compiling" = yes; then :
14220 # If we have tzset, assume the worst when cross-compiling.
14221emacs_cv_localtime_cache=yes
14222else
14223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14224/* end confdefs.h. */
14225#include <time.h>
14226char TZ_GMT0[] = "TZ=GMT0";
14227char TZ_PST8[] = "TZ=PST8";
14228main()
14229{
14230 time_t now = time ((time_t *) 0);
14231 int hour_GMT0, hour_unset;
14232 if (putenv (TZ_GMT0) != 0)
14233 exit (1);
14234 hour_GMT0 = localtime (&now)->tm_hour;
14235 unsetenv("TZ");
14236 hour_unset = localtime (&now)->tm_hour;
14237 if (putenv (TZ_PST8) != 0)
14238 exit (1);
14239 if (localtime (&now)->tm_hour == hour_GMT0)
14240 exit (1);
14241 unsetenv("TZ");
14242 if (localtime (&now)->tm_hour != hour_unset)
14243 exit (1);
14244 exit (0);
14245}
14246_ACEOF
14247if ac_fn_c_try_run "$LINENO"; then :
14248 emacs_cv_localtime_cache=no
14249else
14250 emacs_cv_localtime_cache=yes
14251fi
14252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14253 conftest.$ac_objext conftest.beam conftest.$ac_ext
14254fi
14255
14256else
14257 # If we lack tzset, report that localtime does not cache TZ,
14258 # since we can't invalidate the cache if we don't have tzset.
14259 emacs_cv_localtime_cache=no
14260fi
14261fi
14262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14263$as_echo "$emacs_cv_localtime_cache" >&6; }
14264if test $emacs_cv_localtime_cache = yes; then
14265
14266$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
14267
14268fi
14269
14270ok_so_far=yes
14271ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14272if test "x$ac_cv_func_socket" = x""yes; then :
14273
14274else
14275 ok_so_far=no
14276fi
14277
14278if test $ok_so_far = yes; then
14279 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14280if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
14281
14282else
14283 ok_so_far=no
14284fi
14285
14286
14287fi
14288if test $ok_so_far = yes; then
14289 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14290if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
14291
14292else
14293 ok_so_far=no
14294fi
14295
14296
14297fi
14298if test $ok_so_far = yes; then
14299
14300$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
14301
14302fi
14303
14304if test -f /usr/lpp/X11/bin/smt.exp; then
14305
14306$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
14307
14308fi
14309
14310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14311$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14312if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14314$as_echo "yes" >&6; }
14315
14316$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
14317
14318else
14319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
14321fi
14322
14323ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14324if test "x$ac_cv_type_pid_t" = x""yes; then :
14325
14326else
14327
14328cat >>confdefs.h <<_ACEOF
14329#define pid_t int
14330_ACEOF
14331
14332fi
14333
14334for ac_header in vfork.h
14335do :
14336 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14337if test "x$ac_cv_header_vfork_h" = x""yes; then :
14338 cat >>confdefs.h <<_ACEOF
14339#define HAVE_VFORK_H 1
14340_ACEOF
14341
14342fi
14343
14344done
14345
14346for ac_func in fork vfork
14347do :
14348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14350eval as_val=\$$as_ac_var
14351 if test "x$as_val" = x""yes; then :
14352 cat >>confdefs.h <<_ACEOF
14353#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14354_ACEOF
14355
14356fi
14357done
14358
14359if test "x$ac_cv_func_fork" = xyes; then
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14361$as_echo_n "checking for working fork... " >&6; }
14362if test "${ac_cv_func_fork_works+set}" = set; then :
14363 $as_echo_n "(cached) " >&6
14364else
14365 if test "$cross_compiling" = yes; then :
14366 ac_cv_func_fork_works=cross
14367else
14368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14369/* end confdefs.h. */
14370$ac_includes_default
14371int
14372main ()
14373{
14374
14375 /* By Ruediger Kuhlmann. */
14376 return fork () < 0;
14377
14378 ;
14379 return 0;
14380}
14381_ACEOF
14382if ac_fn_c_try_run "$LINENO"; then :
14383 ac_cv_func_fork_works=yes
14384else
14385 ac_cv_func_fork_works=no
14386fi
14387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14388 conftest.$ac_objext conftest.beam conftest.$ac_ext
14389fi
14390
14391fi
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14393$as_echo "$ac_cv_func_fork_works" >&6; }
14394
14395else
14396 ac_cv_func_fork_works=$ac_cv_func_fork
14397fi
14398if test "x$ac_cv_func_fork_works" = xcross; then
14399 case $host in
14400 *-*-amigaos* | *-*-msdosdjgpp*)
14401 # Override, as these systems have only a dummy fork() stub
14402 ac_cv_func_fork_works=no
14403 ;;
14404 *)
14405 ac_cv_func_fork_works=yes
14406 ;;
14407 esac
14408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14409$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14410fi
14411ac_cv_func_vfork_works=$ac_cv_func_vfork
14412if test "x$ac_cv_func_vfork" = xyes; then
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14414$as_echo_n "checking for working vfork... " >&6; }
14415if test "${ac_cv_func_vfork_works+set}" = set; then :
14416 $as_echo_n "(cached) " >&6
14417else
14418 if test "$cross_compiling" = yes; then :
14419 ac_cv_func_vfork_works=cross
14420else
14421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14422/* end confdefs.h. */
14423/* Thanks to Paul Eggert for this test. */
14424$ac_includes_default
14425#include <sys/wait.h>
14426#ifdef HAVE_VFORK_H
14427# include <vfork.h>
14428#endif
14429/* On some sparc systems, changes by the child to local and incoming
14430 argument registers are propagated back to the parent. The compiler
14431 is told about this with #include <vfork.h>, but some compilers
14432 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14433 static variable whose address is put into a register that is
14434 clobbered by the vfork. */
14435static void
14436#ifdef __cplusplus
14437sparc_address_test (int arg)
14438# else
14439sparc_address_test (arg) int arg;
14440#endif
14441{
14442 static pid_t child;
14443 if (!child) {
14444 child = vfork ();
14445 if (child < 0) {
14446 perror ("vfork");
14447 _exit(2);
14448 }
14449 if (!child) {
14450 arg = getpid();
14451 write(-1, "", 0);
14452 _exit (arg);
14453 }
14454 }
14455}
14456
14457int
14458main ()
14459{
14460 pid_t parent = getpid ();
14461 pid_t child;
14462
14463 sparc_address_test (0);
14464
14465 child = vfork ();
14466
14467 if (child == 0) {
14468 /* Here is another test for sparc vfork register problems. This
14469 test uses lots of local variables, at least as many local
14470 variables as main has allocated so far including compiler
14471 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14472 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14473 reuse the register of parent for one of the local variables,
14474 since it will think that parent can't possibly be used any more
14475 in this routine. Assigning to the local variable will thus
14476 munge parent in the parent process. */
14477 pid_t
14478 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14479 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14480 /* Convince the compiler that p..p7 are live; otherwise, it might
14481 use the same hardware register for all 8 local variables. */
14482 if (p != p1 || p != p2 || p != p3 || p != p4
14483 || p != p5 || p != p6 || p != p7)
14484 _exit(1);
14485
14486 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14487 from child file descriptors. If the child closes a descriptor
14488 before it execs or exits, this munges the parent's descriptor
14489 as well. Test for this by closing stdout in the child. */
14490 _exit(close(fileno(stdout)) != 0);
14491 } else {
14492 int status;
14493 struct stat st;
14494
14495 while (wait(&status) != child)
14496 ;
14497 return (
14498 /* Was there some problem with vforking? */
14499 child < 0
14500
14501 /* Did the child fail? (This shouldn't happen.) */
14502 || status
14503
14504 /* Did the vfork/compiler bug occur? */
14505 || parent != getpid()
14506
14507 /* Did the file descriptor bug occur? */
14508 || fstat(fileno(stdout), &st) != 0
14509 );
14510 }
14511}
14512_ACEOF
14513if ac_fn_c_try_run "$LINENO"; then :
14514 ac_cv_func_vfork_works=yes
14515else
14516 ac_cv_func_vfork_works=no
14517fi
14518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14519 conftest.$ac_objext conftest.beam conftest.$ac_ext
14520fi
14521
14522fi
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14524$as_echo "$ac_cv_func_vfork_works" >&6; }
14525
14526fi;
14527if test "x$ac_cv_func_fork_works" = xcross; then
14528 ac_cv_func_vfork_works=$ac_cv_func_vfork
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14530$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14531fi
14532
14533if test "x$ac_cv_func_vfork_works" = xyes; then
14534
14535$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14536
14537else
14538
14539$as_echo "#define vfork fork" >>confdefs.h
14540
14541fi
14542if test "x$ac_cv_func_fork_works" = xyes; then
14543
14544$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14545
14546fi
14547
14548
14549for ac_func in snprintf
14550do :
14551 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
14552if test "x$ac_cv_func_snprintf" = x""yes; then :
14553 cat >>confdefs.h <<_ACEOF
14554#define HAVE_SNPRINTF 1
14555_ACEOF
14556
14557fi
14558done
14559
14560
14561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14562$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14563if test "${emacs_cv_langinfo_codeset+set}" = set; then :
14564 $as_echo_n "(cached) " >&6
14565else
14566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14567/* end confdefs.h. */
14568#include <langinfo.h>
14569int
14570main ()
14571{
14572char* cs = nl_langinfo(CODESET);
14573 ;
14574 return 0;
14575}
14576_ACEOF
14577if ac_fn_c_try_link "$LINENO"; then :
14578 emacs_cv_langinfo_codeset=yes
14579else
14580 emacs_cv_langinfo_codeset=no
14581fi
14582rm -f core conftest.err conftest.$ac_objext \
14583 conftest$ac_exeext conftest.$ac_ext
14584
14585fi
14586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
14587$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14588if test $emacs_cv_langinfo_codeset = yes; then
14589
14590$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
14591
14592fi
14593
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14595$as_echo_n "checking for mbstate_t... " >&6; }
14596if test "${ac_cv_type_mbstate_t+set}" = set; then :
14597 $as_echo_n "(cached) " >&6
14598else
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600/* end confdefs.h. */
14601$ac_includes_default
14602# include <wchar.h>
14603int
14604main ()
14605{
14606mbstate_t x; return sizeof x;
14607 ;
14608 return 0;
14609}
14610_ACEOF
14611if ac_fn_c_try_compile "$LINENO"; then :
14612 ac_cv_type_mbstate_t=yes
14613else
14614 ac_cv_type_mbstate_t=no
14615fi
14616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14617fi
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14619$as_echo "$ac_cv_type_mbstate_t" >&6; }
14620 if test $ac_cv_type_mbstate_t = yes; then
14621
14622$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
14623
14624 else
14625
14626$as_echo "#define mbstate_t int" >>confdefs.h
14627
14628 fi
14629
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
14631$as_echo_n "checking for C restricted array declarations... " >&6; }
14632if test "${emacs_cv_c_restrict_arr+set}" = set; then :
14633 $as_echo_n "(cached) " >&6
14634else
14635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14636/* end confdefs.h. */
14637void fred (int x[__restrict]);
14638int
14639main ()
14640{
14641
14642 ;
14643 return 0;
14644}
14645_ACEOF
14646if ac_fn_c_try_compile "$LINENO"; then :
14647 emacs_cv_c_restrict_arr=yes
14648else
14649 emacs_cv_c_restrict_arr=no
14650fi
14651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14652fi
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
14654$as_echo "$emacs_cv_c_restrict_arr" >&6; }
14655if test "$emacs_cv_c_restrict_arr" = yes; then
14656
14657$as_echo "#define __restrict_arr __restrict" >>confdefs.h
14658
14659fi
14660
14661
14662
14663$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
14664
14665
14666## Note: PTYs are broken on darwin <6. Use at your own risk.
14667
14668$as_echo "#define HAVE_PTYS 1" >>confdefs.h
14669
14670
14671
14672$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
14673
14674
14675
14676
14677
14678case $opsys in
14679 aix4-2)
14680 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
14681 $as_echo "#define NO_EDITRES 1" >>confdefs.h
14682
14683 fi
14684 ;;
14685
14686 hpux*)
14687 $as_echo "#define NO_EDITRES 1" >>confdefs.h
14688
14689 ;;
14690esac
14691
14692
14693case $opsys in
14694 darwin | gnu | hpux* | *bsd )
14695
14696$as_echo "#define NO_TERMIO 1" >>confdefs.h
14697
14698 ;;
14699
14700 irix6-5 | sol2* | unixware )
14701
14702$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
14703
14704 ;;
14705esac
14706
14707
14708case $opsys in
14709 hpux* | irix6-5 | openbsd | sol2* | unixware )
14710
14711$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h
14712
14713 ;;
14714
14715 aix4-2)
14716
14717$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h
14718
14719
14720$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h
14721
14722
14723$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h
14724
14725
14726$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h
14727
14728
14729
14730$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
14731
14732 ;;
14733
14734 freebsd)
14735
14736$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
14737
14738 ;;
14739
14740 darwin)
14741
14742$as_echo "#define NO_ABORT 1" >>confdefs.h
14743
14744 ;;
14745esac
14746
14747case $opsys in
14748 gnu-* | sol2-10 )
14749
14750$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
14751
14752 ;;
14753esac
14754
14755case $opsys in
14756 darwin | freebsd | netbsd | openbsd )
14757
14758$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
14759
14760 ;;
14761esac
14762
14763case $opsys in
14764 netbsd | openbsd) sound_device="/dev/audio" ;;
14765 *) sound_device="/dev/dsp" ;;
14766esac
14767
14768
14769cat >>confdefs.h <<_ACEOF
14770#define DEFAULT_SOUND_DEVICE "$sound_device"
14771_ACEOF
14772
14773
14774
14775case $opsys in
14776 darwin | gnu-linux | gnu-kfreebsd )
14777
14778$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
14779
14780 ;;
14781esac
14782
14783
14784case $opsys in
14785 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
14786
14787$as_echo "#define NARROWPROTO 1" >>confdefs.h
14788
14789 ;;
14790esac
14791
14792
14793
14794
14795
14796
14797
14798
14799case $opsys in
14800 aix4-2 )
14801 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h
14802
14803 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h
14804
14805 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h
14806
14807 ;;
14808
14809 cygwin )
14810 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
14811
14812 $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h
14813
14814 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
14815
14816 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
14817
14818 ;;
14819
14820 darwin )
14821 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
14822
14823 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
14824
14825 $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h
14826
14827 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
14828
14829 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
14830
14831 ;;
14832
14833 gnu | freebsd | netbsd | openbsd )
14834 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
14835
14836 ;;
14837
14838 gnu-linux | gnu-kfreebsd )
14839 if test "x$ac_cv_func_grantpt" = xyes; then
14840
14841$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
14842
14843 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
14844
14845 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h
14846
14847 if test "x$ac_cv_func_getpt" = xyes; then
14848 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
14849
14850 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
14851
14852 else
14853 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
14854
14855 fi
14856 else
14857 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
14858
14859 fi
14860 ;;
14861
14862 hpux*)
14863 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
14864
14865 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h
14866
14867 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h
14868
14869 ;;
14870
14871 irix6-5 )
14872 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
14873
14874 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
14875
14876 $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h
14877
14878 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
14879
14880 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
14881
14882 ;;
14883
14884 sol2* )
14885 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
14886
14887 ;;
14888
14889 unixware )
14890 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
14891
14892 ;;
14893esac
14894
14895
14896case $opsys in
14897 sol2* | unixware )
14898 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
14899
14900 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
14901
14902
14903$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
14904
14905 ;;
14906esac
14907
14908
14909
14910
14911case $opsys in
14912 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
14913 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
14914
14915 ;;
14916
14917 gnu-linux | gnu-kfreebsd )
14918
14919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
14920$as_echo_n "checking for signals via characters... " >&6; }
14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922/* end confdefs.h. */
14923
14924#include <linux/version.h>
14925#if LINUX_VERSION_CODE < 0x20400
14926# error "Linux version too old"
14927#endif
14928
14929int
14930main ()
14931{
14932
14933 ;
14934 return 0;
14935}
14936_ACEOF
14937if ac_fn_c_try_cpp "$LINENO"; then :
14938 emacs_signals_via_chars=yes
14939else
14940 emacs_signals_via_chars=no
14941fi
14942rm -f conftest.err conftest.$ac_ext
14943
14944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
14945$as_echo "$emacs_signals_via_chars" >&6; }
14946 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
14947
14948 ;;
14949esac
14950
14951
14952
14953
14954
14955
14956case $opsys in
14957 cygwin | darwin | freebsd | netbsd | openbsd )
14958 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
14959
14960 ;;
14961
14962 unixware)
14963 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
14964
14965 ;;
14966
14967 gnu | gnu-linux | gnu-kfreebsd )
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
14969$as_echo_n "checking for style of pending output formalism... " >&6; }
14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971/* end confdefs.h. */
14972
14973#include <stdio.h>
14974#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
14975# error "stdio definitions not found"
14976#endif
14977
14978int
14979main ()
14980{
14981
14982 ;
14983 return 0;
14984}
14985_ACEOF
14986if ac_fn_c_try_cpp "$LINENO"; then :
14987 emacs_pending_output=new
14988else
14989 emacs_pending_output=unknown
14990fi
14991rm -f conftest.err conftest.$ac_ext
14992
14993 if test $emacs_pending_output = unknown; then
14994 case $opsys in
14995 gnu-linux | gnu-kfreebsd)
14996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997/* end confdefs.h. */
14998
14999#include <stdio.h>
15000#ifndef __UCLIBC__
15001# error "not using uclibc"
15002#endif
15003
15004int
15005main ()
15006{
15007
15008 ;
15009 return 0;
15010}
15011_ACEOF
15012if ac_fn_c_try_cpp "$LINENO"; then :
15013 emacs_pending_output=uclibc
15014else
15015 emacs_pending_output=old
15016fi
15017rm -f conftest.err conftest.$ac_ext
15018 ;;
15019 esac
15020 fi
15021
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
15023$as_echo "$emacs_pending_output" >&6; }
15024
15025 case $emacs_pending_output in
15026 new)
15027 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
15028
15029 ;;
15030 uclibc)
15031 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
15032
15033 ;;
15034 old)
15035 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
15036
15037 ;;
15038 esac
15039 ;;
15040esac
15041
15042
15043
15044
15045
15046case $opsys in
15047 gnu)
15048 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
15049
15050 ;;
15051
15052 hpux*)
15053 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
15054
15055 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
15056
15057 ;;
15058 irix6-5)
15059 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
15060
15061 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
15062
15063 ;;
15064esac
15065
15066
15067
15068
15069
15070case $opsys in
15071 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15072 ;;
15073
15074 gnu | freebsd | netbsd | openbsd )
15075
15076$as_echo "#define TABDLY OXTABS" >>confdefs.h
15077
15078 $as_echo "#define TAB3 OXTABS" >>confdefs.h
15079
15080 ;;
15081
15082 gnu-linux | gnu-kfreebsd )
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085
15086#ifndef __i386__
15087# error "not i386"
15088#endif
15089
15090int
15091main ()
15092{
15093
15094 ;
15095 return 0;
15096}
15097_ACEOF
15098if ac_fn_c_try_cpp "$LINENO"; then :
15099 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
15100
15101fi
15102rm -f conftest.err conftest.$ac_ext
15103
15104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15105/* end confdefs.h. */
15106
15107#ifndef __ia64__
15108# error "not ia64"
15109#endif
15110
15111int
15112main ()
15113{
15114
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_cpp "$LINENO"; then :
15120
15121$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
15122
15123fi
15124rm -f conftest.err conftest.$ac_ext
15125 ;;
15126
15127 hpux*)
15128
15129$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
15130
15131 ;;
15132
15133 irix6-5)
15134 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
15135
15136 ;;
15137esac
15138
15139
15140
15141
15142
15143
15144
15145case $opsys in
15146 aix4-2 | hpux* | unixware)
15147 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15148
15149 ;;
15150
15151 gnu-linux | gnu-kfreebsd )
15152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15153/* end confdefs.h. */
15154
15155#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15156 || defined __alpha__ || defined __mips__ || defined __s390__ \
15157 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15158 || defined __ia64__ || defined __sh__
15159/* ok */
15160#else
15161# error "setjmp not known to work on this arch"
15162#endif
15163
15164int
15165main ()
15166{
15167
15168 ;
15169 return 0;
15170}
15171_ACEOF
15172if ac_fn_c_try_cpp "$LINENO"; then :
15173 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15174
15175else
15176 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15177
15178fi
15179rm -f conftest.err conftest.$ac_ext
15180 ;;
15181esac
15182
15183
15184if test x$GCC = xyes; then
15185 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15186
15187else
15188 case $opsys in
15189 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15190 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15191
15192 ;;
15193 esac
15194fi
15195
15196case $opsys in
15197 hpux* | sol2* )
15198
15199$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
15200
15201 ;;
15202esac
15203
15204
15205
15206
15207
15208
15209
15210case $opsys in
15211 aix4-2)
15212 $as_echo "#define USG /**/" >>confdefs.h
15213
15214 $as_echo "#define USG5 /**/" >>confdefs.h
15215
15216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15217/* end confdefs.h. */
15218
15219#ifndef _AIX
15220# error "_AIX not defined"
15221#endif
15222
15223int
15224main ()
15225{
15226
15227 ;
15228 return 0;
15229}
15230_ACEOF
15231if ac_fn_c_try_cpp "$LINENO"; then :
15232
15233else
15234
15235$as_echo "#define _AIX /**/" >>confdefs.h
15236
15237fi
15238rm -f conftest.err conftest.$ac_ext
15239 ;;
15240
15241 cygwin)
15242 opsysfile=
15243
15244$as_echo "#define CYGWIN 1" >>confdefs.h
15245
15246 ;;
15247
15248 darwin)
15249 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15250
15251 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
15252
15253
15254$as_echo "#define DARWIN_OS /**/" >>confdefs.h
15255
15256 ;;
15257
15258 freebsd)
15259 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15260
15261
15262$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
15263
15264 ;;
15265
15266 gnu | netbsd | openbsd )
15267 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15268
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270/* end confdefs.h. */
15271
15272#ifndef BSD_SYSTEM
15273# error "BSD_SYSTEM not defined"
15274#endif
15275
15276int
15277main ()
15278{
15279
15280 ;
15281 return 0;
15282}
15283_ACEOF
15284if ac_fn_c_try_cpp "$LINENO"; then :
15285
15286else
15287 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
15288
15289fi
15290rm -f conftest.err conftest.$ac_ext
15291 ;;
15292
15293 gnu-linux | gnu-kfreebsd )
15294 $as_echo "#define USG /**/" >>confdefs.h
15295
15296
15297$as_echo "#define GNU_LINUX /**/" >>confdefs.h
15298
15299 ;;
15300
15301 hpux*)
15302 $as_echo "#define USG /**/" >>confdefs.h
15303
15304 $as_echo "#define USG5 /**/" >>confdefs.h
15305
15306
15307$as_echo "#define HPUX /**/" >>confdefs.h
15308
15309 ;;
15310
15311 irix6-5)
15312 $as_echo "#define USG /**/" >>confdefs.h
15313
15314 $as_echo "#define USG5 /**/" >>confdefs.h
15315
15316
15317$as_echo "#define IRIX6_5 /**/" >>confdefs.h
15318
15319 ;;
15320
15321 sol2*)
15322 $as_echo "#define USG /**/" >>confdefs.h
15323
15324 $as_echo "#define USG5 /**/" >>confdefs.h
15325
15326
15327$as_echo "#define SOLARIS2 /**/" >>confdefs.h
15328
15329 ;;
15330
15331 unixware)
15332 $as_echo "#define USG /**/" >>confdefs.h
15333
15334 $as_echo "#define USG5 /**/" >>confdefs.h
15335
15336 ;;
15337esac
15338
15339
15340case $opsys in
15341 cygwin)
15342
15343$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
15344
15345 ;;
15346
15347 gnu) opsysfile= ;;
15348
15349 gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
15350
15351 hpux11)
15352
15353$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
15354
15355
15356$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
15357
15358
15359 opsysfile="s/hpux10-20.h"
15360 ;;
15361
15362 irix6-5)
15363
15364$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
15365
15366
15367$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
15368
15369 ;;
15370
15371 openbsd) opsysfile="s/netbsd.h" ;;
15372
15373 sol2-10)
15374
15375$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15376
15377 opsysfile="s/sol2-6.h"
15378 ;;
15379esac
15380
15381# Set up the CFLAGS for real compilation, so we can substitute it.
15382CFLAGS="$REAL_CFLAGS"
15383CPPFLAGS="$REAL_CPPFLAGS"
15384
15385## Hack to detect a buggy GCC version.
15386if test "x$GCC" = xyes \
15387 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15388 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15389 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15390 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15391fi
15392
15393version=$PACKAGE_VERSION
15394
15395### Specify what sort of things we'll be editing into Makefile and config.h.
15396### Use configuration here uncanonicalized to avoid exceeding size limits.
15397
15398
15399## Unused?
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15423## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15424## end of LIBX_BASE, but nothing ever set it.
15425
15426
15427
15428
15429## Used in lwlib/Makefile.in.
15430
15431if test -n "${opsysfile}"; then
15432 S_FILE="\$(srcdir)/${opsysfile}"
15433else
15434 S_FILE=
15435fi
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445cat >>confdefs.h <<_ACEOF
15446#define EMACS_CONFIGURATION "${canonical}"
15447_ACEOF
15448
15449
15450cat >>confdefs.h <<_ACEOF
15451#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15452_ACEOF
15453
15454if test -n "$opsysfile"; then
15455
15456cat >>confdefs.h <<_ACEOF
15457#define config_opsysfile "${opsysfile}"
15458_ACEOF
15459
15460fi
15461
15462XMENU_OBJ=
15463XOBJ=
15464FONT_OBJ=
15465if test "${HAVE_X_WINDOWS}" = "yes" ; then
15466
15467$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
15468
15469 XMENU_OBJ=xmenu.o
15470 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
15471 FONT_OBJ=xfont.o
15472 if test "$HAVE_XFT" = "yes"; then
15473 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15474 elif test "$HAVE_FREETYPE" = "yes"; then
15475 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15476 fi
15477
15478fi
15479
15480
15481
15482
15483WIDGET_OBJ=
15484MOTIF_LIBW=
15485if test "${USE_X_TOOLKIT}" != "none" ; then
15486 WIDGET_OBJ=widget.o
15487
15488$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
15489
15490 if test "${USE_X_TOOLKIT}" = "LUCID"; then
15491
15492$as_echo "#define USE_LUCID 1" >>confdefs.h
15493
15494 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
15495
15496$as_echo "#define USE_MOTIF 1" >>confdefs.h
15497
15498 MOTIF_LIBW=-lXm
15499 case "$opsys" in
15500 gnu-linux)
15501 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15502 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15503 ;;
15504
15505 unixware)
15506 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15507 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15508 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15509 ;;
15510
15511 aix4-2)
15512 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15513 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15514 ;;
15515 esac
15516 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15517 fi
15518fi
15519
15520
15521TOOLKIT_LIBW=
15522case "$USE_X_TOOLKIT" in
15523 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15524 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15525 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15526esac
15527
15528
15529if test "$USE_X_TOOLKIT" = "none"; then
15530 LIBXT_OTHER="\$(LIBXSM)"
15531 OLDXMENU_TARGET="really-oldXMenu"
15532else
15533 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15534 OLDXMENU_TARGET="really-lwlib"
15535fi
15536
15537
15538## The X Menu stuff is present in the X10 distribution, but missing
15539## from X11. If we have X10, just use the installed library;
15540## otherwise, use our own copy.
15541if test "${HAVE_X11}" = "yes" ; then
15542
15543$as_echo "#define HAVE_X11 1" >>confdefs.h
15544
15545
15546 if test "$USE_X_TOOLKIT" = "none"; then
15547 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15548 else
15549 OLDXMENU="\${lwlibdir}/liblw.a"
15550 fi
15551 LIBXMENU="\$(OLDXMENU)"
15552 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15553 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
15554else
15555 ## For a syntactically valid Makefile; not actually used for anything.
15556 ## See comments in src/Makefile.in.
15557 OLDXMENU=nothing
15558 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15559 if test "${HAVE_X_WINDOWS}" = "yes"; then
15560 LIBXMENU="-lXMenu"
15561 else
15562 LIBXMENU=
15563 fi
15564 LIBX_OTHER=
15565 OLDXMENU_DEPS=
15566fi
15567
15568if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15569 OLDXMENU_TARGET=
15570 OLDXMENU=nothing
15571 LIBXMENU=
15572 OLDXMENU_DEPS=
15573fi
15574
15575
15576
15577
15578
15579
15580
15581if test "${HAVE_MENUS}" = "yes" ; then
15582
15583$as_echo "#define HAVE_MENUS 1" >>confdefs.h
15584
15585fi
15586
15587if test "${GNU_MALLOC}" = "yes" ; then
15588
15589$as_echo "#define GNU_MALLOC 1" >>confdefs.h
15590
15591fi
15592
15593RALLOC_OBJ=
15594if test "${REL_ALLOC}" = "yes" ; then
15595
15596$as_echo "#define REL_ALLOC 1" >>confdefs.h
15597
15598
15599 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
15600fi
15601
15602
15603if test "$opsys" = "cygwin"; then
15604 CYGWIN_OBJ="sheap.o"
15605 ## Cygwin differs because of its unexec().
15606 PRE_ALLOC_OBJ=
15607 POST_ALLOC_OBJ=lastfile.o
15608else
15609 CYGWIN_OBJ=
15610 PRE_ALLOC_OBJ=lastfile.o
15611 POST_ALLOC_OBJ=
15612fi
15613
15614
15615
15616
15617# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
15618# it temporarily reverts them to their pre-pkg-config values,
15619# because gnulib needs to work with both src (which uses the
15620# pkg-config stuff) and lib-src (which does not). For example, gnulib
15621# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
15622# and it therefore needs to run in an environment where LIBS does not
15623# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
15624# for some package unrelated to lib-src.
15625SAVE_CFLAGS=$CFLAGS
15626SAVE_LIBS=$LIBS
15627CFLAGS=$pre_PKG_CONFIG_CFLAGS
15628LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
8317 15629
8318 15630
8319 15631
@@ -8522,22 +15834,6 @@ fi
8522 15834
8523 15835
8524 15836
8525 for ac_func in $ac_func_list
8526do :
8527 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8528ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8529eval as_val=\$$as_ac_var
8530 if test "x$as_val" = x""yes; then :
8531 cat >>confdefs.h <<_ACEOF
8532#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8533_ACEOF
8534
8535fi
8536done
8537
8538
8539
8540
8541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 15837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8542$as_echo_n "checking whether byte ordering is bigendian... " >&6; } 15838$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8543if test "${ac_cv_c_bigendian+set}" = set; then : 15839if test "${ac_cv_c_bigendian+set}" = set; then :
@@ -9095,26 +16391,6 @@ _ACEOF
9095 16391
9096 16392
9097 16393
9098
9099 for ac_header in $ac_header_list
9100do :
9101 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9102ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9103"
9104eval as_val=\$$as_ac_Header
9105 if test "x$as_val" = x""yes; then :
9106 cat >>confdefs.h <<_ACEOF
9107#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9108_ACEOF
9109
9110fi
9111
9112done
9113
9114
9115
9116
9117
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 16394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9119$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } 16395$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9120if test "${gl_cv_have_include_next+set}" = set; then : 16396if test "${gl_cv_have_include_next+set}" = set; then :
@@ -9933,8 +17209,6 @@ _ACEOF
9933 17209
9934 17210
9935 17211
9936
9937
9938 if test $gl_cv_have_include_next = yes; then 17212 if test $gl_cv_have_include_next = yes; then
9939 gl_cv_next_sys_time_h='<'sys/time.h'>' 17213 gl_cv_next_sys_time_h='<'sys/time.h'>'
9940 else 17214 else
@@ -11270,8 +18544,6 @@ _ACEOF
11270 18544
11271 18545
11272 18546
11273
11274
11275 GNULIB_PSELECT=0; 18547 GNULIB_PSELECT=0;
11276 GNULIB_SELECT=0; 18548 GNULIB_SELECT=0;
11277 HAVE_PSELECT=1; 18549 HAVE_PSELECT=1;
@@ -11522,17 +18794,6 @@ fi
11522 HAVE_SIGSET_T=0 18794 HAVE_SIGSET_T=0
11523 fi 18795 fi
11524 18796
11525ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11526if test "x$ac_cv_type_pid_t" = x""yes; then :
11527
11528else
11529
11530cat >>confdefs.h <<_ACEOF
11531#define pid_t int
11532_ACEOF
11533
11534fi
11535
11536 18797
11537 18798
11538 if test $ac_cv_header_sys_socket_h = no; then 18799 if test $ac_cv_header_sys_socket_h = no; then
@@ -11891,8 +19152,6 @@ fi
11891 19152
11892 19153
11893 19154
11894
11895
11896ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" 19155ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
11897if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : 19156if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
11898 ac_have_decl=1 19157 ac_have_decl=1
@@ -16327,7253 +23586,8 @@ fi
16327 LIBGNU_LTLIBDEPS="$gl_ltlibdeps" 23586 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
16328 23587
16329 23588
16330 23589CFLAGS=$SAVE_CFLAGS
16331# Extract the first word of "pkg-config", so it can be a program name with args. 23590LIBS=$SAVE_LIBS
16332set dummy pkg-config; ac_word=$2
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16334$as_echo_n "checking for $ac_word... " >&6; }
16335if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
16336 $as_echo_n "(cached) " >&6
16337else
16338 case $PKG_CONFIG in
16339 [\\/]* | ?:[\\/]*)
16340 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
16341 ;;
16342 *)
16343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16344for as_dir in $PATH
16345do
16346 IFS=$as_save_IFS
16347 test -z "$as_dir" && as_dir=.
16348 for ac_exec_ext in '' $ac_executable_extensions; do
16349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16350 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
16351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16352 break 2
16353 fi
16354done
16355 done
16356IFS=$as_save_IFS
16357
16358 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
16359 ;;
16360esac
16361fi
16362PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16363if test -n "$PKG_CONFIG"; then
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16365$as_echo "$PKG_CONFIG" >&6; }
16366else
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16368$as_echo "no" >&6; }
16369fi
16370
16371
16372
16373
16374
16375
16376if test "${with_sound}" != "no"; then
16377 # Sound support for GNU/Linux and the free BSDs.
16378 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
16379do :
16380 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16381ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16382eval as_val=\$$as_ac_Header
16383 if test "x$as_val" = x""yes; then :
16384 cat >>confdefs.h <<_ACEOF
16385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16386_ACEOF
16387 have_sound_header=yes
16388fi
16389
16390done
16391
16392 # Emulation library used on NetBSD.
16393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
16394$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
16395if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
16396 $as_echo_n "(cached) " >&6
16397else
16398 ac_check_lib_save_LIBS=$LIBS
16399LIBS="-lossaudio $LIBS"
16400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16401/* end confdefs.h. */
16402
16403/* Override any GCC internal prototype to avoid an error.
16404 Use char because int might match the return type of a GCC
16405 builtin and then its argument prototype would still apply. */
16406#ifdef __cplusplus
16407extern "C"
16408#endif
16409char _oss_ioctl ();
16410int
16411main ()
16412{
16413return _oss_ioctl ();
16414 ;
16415 return 0;
16416}
16417_ACEOF
16418if ac_fn_c_try_link "$LINENO"; then :
16419 ac_cv_lib_ossaudio__oss_ioctl=yes
16420else
16421 ac_cv_lib_ossaudio__oss_ioctl=no
16422fi
16423rm -f core conftest.err conftest.$ac_objext \
16424 conftest$ac_exeext conftest.$ac_ext
16425LIBS=$ac_check_lib_save_LIBS
16426fi
16427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
16428$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
16429if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
16430 LIBSOUND=-lossaudio
16431else
16432 LIBSOUND=
16433fi
16434
16435
16436
16437 ALSA_REQUIRED=1.0.0
16438 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
16439
16440 succeeded=no
16441
16442 if test "$PKG_CONFIG" = "no" ; then
16443 HAVE_ALSA=no
16444 else
16445 PKG_CONFIG_MIN_VERSION=0.9.0
16446 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
16448$as_echo_n "checking for $ALSA_MODULES... " >&6; }
16449
16450 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
16451 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
16452 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
16453 edit_cflags="
16454 s,///*,/,g
16455 s/^/ /
16456 s/ -I/ $isystem/g
16457 s/^ //
16458 "
16459 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
16460 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
16462$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
16463 succeeded=yes
16464 else
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16466$as_echo "no" >&6; }
16467 ALSA_CFLAGS=""
16468 ALSA_LIBS=""
16469 ## If we have a custom action on failure, don't print errors, but
16470 ## do set a variable so people can do so.
16471 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
16472
16473 fi
16474
16475
16476
16477 else
16478 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
16479 echo "*** See http://www.freedesktop.org/software/pkgconfig"
16480 fi
16481 fi
16482
16483 if test $succeeded = yes; then
16484 HAVE_ALSA=yes
16485 else
16486 HAVE_ALSA=no
16487 fi
16488
16489 if test $HAVE_ALSA = yes; then
16490 SAVE_CFLAGS="$CFLAGS"
16491 SAVE_LIBS="$LIBS"
16492 CFLAGS="$ALSA_CFLAGS $CFLAGS"
16493 LIBS="$ALSA_LIBS $LIBS"
16494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16495/* end confdefs.h. */
16496#include <asoundlib.h>
16497int
16498main ()
16499{
16500snd_lib_error_set_handler (0);
16501 ;
16502 return 0;
16503}
16504_ACEOF
16505if ac_fn_c_try_compile "$LINENO"; then :
16506 emacs_alsa_normal=yes
16507else
16508 emacs_alsa_normal=no
16509fi
16510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16511 if test "$emacs_alsa_normal" != yes; then
16512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513/* end confdefs.h. */
16514#include <alsa/asoundlib.h>
16515int
16516main ()
16517{
16518snd_lib_error_set_handler (0);
16519 ;
16520 return 0;
16521}
16522_ACEOF
16523if ac_fn_c_try_compile "$LINENO"; then :
16524 emacs_alsa_subdir=yes
16525else
16526 emacs_alsa_subdir=no
16527fi
16528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16529 if test "$emacs_alsa_subdir" != yes; then
16530 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
16531 fi
16532 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
16533 fi
16534
16535 CFLAGS="$SAVE_CFLAGS"
16536 LIBS="$SAVE_LIBS"
16537 LIBSOUND="$LIBSOUND $ALSA_LIBS"
16538 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
16539
16540$as_echo "#define HAVE_ALSA 1" >>confdefs.h
16541
16542 fi
16543
16544 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
16545 case "$opsys" in
16546 gnu-linux|freebsd|netbsd)
16547
16548$as_echo "#define HAVE_SOUND 1" >>confdefs.h
16549
16550 ;;
16551 esac
16552 fi
16553
16554
16555fi
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
16586$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
16587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16588/* end confdefs.h. */
16589#include <sys/personality.h>
16590int
16591main ()
16592{
16593personality (PER_LINUX32)
16594 ;
16595 return 0;
16596}
16597_ACEOF
16598if ac_fn_c_try_compile "$LINENO"; then :
16599 emacs_cv_personality_linux32=yes
16600else
16601 emacs_cv_personality_linux32=no
16602fi
16603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
16605$as_echo "$emacs_cv_personality_linux32" >&6; }
16606
16607if test $emacs_cv_personality_linux32 = yes; then
16608
16609$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
16610
16611fi
16612
16613for ac_header in term.h
16614do :
16615 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
16616if test "x$ac_cv_header_term_h" = x""yes; then :
16617 cat >>confdefs.h <<_ACEOF
16618#define HAVE_TERM_H 1
16619_ACEOF
16620
16621fi
16622
16623done
16624
16625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
16626$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
16627if test "${ac_cv_header_time+set}" = set; then :
16628 $as_echo_n "(cached) " >&6
16629else
16630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16631/* end confdefs.h. */
16632#include <sys/types.h>
16633#include <sys/time.h>
16634#include <time.h>
16635
16636int
16637main ()
16638{
16639if ((struct tm *) 0)
16640return 0;
16641 ;
16642 return 0;
16643}
16644_ACEOF
16645if ac_fn_c_try_compile "$LINENO"; then :
16646 ac_cv_header_time=yes
16647else
16648 ac_cv_header_time=no
16649fi
16650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16651fi
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
16653$as_echo "$ac_cv_header_time" >&6; }
16654if test $ac_cv_header_time = yes; then
16655
16656$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
16657
16658fi
16659
16660ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
16661if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
16662 ac_have_decl=1
16663else
16664 ac_have_decl=0
16665fi
16666
16667cat >>confdefs.h <<_ACEOF
16668#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
16669_ACEOF
16670
16671if test $ac_cv_have_decl_sys_siglist != yes; then
16672 # For Tru64, at least:
16673 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
16674if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
16675 ac_have_decl=1
16676else
16677 ac_have_decl=0
16678fi
16679
16680cat >>confdefs.h <<_ACEOF
16681#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
16682_ACEOF
16683
16684 if test $ac_cv_have_decl___sys_siglist = yes; then
16685
16686$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
16687
16688 fi
16689fi
16690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
16691$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
16692if test "${ac_cv_header_sys_wait_h+set}" = set; then :
16693 $as_echo_n "(cached) " >&6
16694else
16695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16696/* end confdefs.h. */
16697#include <sys/types.h>
16698#include <sys/wait.h>
16699#ifndef WEXITSTATUS
16700# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
16701#endif
16702#ifndef WIFEXITED
16703# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
16704#endif
16705
16706int
16707main ()
16708{
16709 int s;
16710 wait (&s);
16711 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
16712 ;
16713 return 0;
16714}
16715_ACEOF
16716if ac_fn_c_try_compile "$LINENO"; then :
16717 ac_cv_header_sys_wait_h=yes
16718else
16719 ac_cv_header_sys_wait_h=no
16720fi
16721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16722fi
16723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
16724$as_echo "$ac_cv_header_sys_wait_h" >&6; }
16725if test $ac_cv_header_sys_wait_h = yes; then
16726
16727$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
16728
16729fi
16730
16731
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
16733$as_echo_n "checking for speed_t... " >&6; }
16734if test "${emacs_cv_speed_t+set}" = set; then :
16735 $as_echo_n "(cached) " >&6
16736else
16737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16738/* end confdefs.h. */
16739#include <termios.h>
16740int
16741main ()
16742{
16743speed_t x = 1;
16744 ;
16745 return 0;
16746}
16747_ACEOF
16748if ac_fn_c_try_compile "$LINENO"; then :
16749 emacs_cv_speed_t=yes
16750else
16751 emacs_cv_speed_t=no
16752fi
16753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16754fi
16755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
16756$as_echo "$emacs_cv_speed_t" >&6; }
16757if test $emacs_cv_speed_t = yes; then
16758
16759$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
16760
16761fi
16762
16763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
16764$as_echo_n "checking for struct exception... " >&6; }
16765if test "${emacs_cv_struct_exception+set}" = set; then :
16766 $as_echo_n "(cached) " >&6
16767else
16768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16769/* end confdefs.h. */
16770#include <math.h>
16771int
16772main ()
16773{
16774static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
16775 ;
16776 return 0;
16777}
16778_ACEOF
16779if ac_fn_c_try_compile "$LINENO"; then :
16780 emacs_cv_struct_exception=yes
16781else
16782 emacs_cv_struct_exception=no
16783fi
16784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16785fi
16786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
16787$as_echo "$emacs_cv_struct_exception" >&6; }
16788HAVE_EXCEPTION=$emacs_cv_struct_exception
16789if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
16790
16791$as_echo "#define NO_MATHERR 1" >>confdefs.h
16792
16793fi
16794
16795
16796for ac_header in net/if.h
16797do :
16798 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
16799#if HAVE_SYS_SOCKET_H
16800#include <sys/socket.h>
16801#endif
16802"
16803if test "x$ac_cv_header_net_if_h" = x""yes; then :
16804 cat >>confdefs.h <<_ACEOF
16805#define HAVE_NET_IF_H 1
16806_ACEOF
16807
16808fi
16809
16810done
16811
16812for ac_header in ifaddrs.h
16813do :
16814 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
16815#if HAVE_SYS_SOCKET_H
16816#include <sys/socket.h>
16817#endif
16818"
16819if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
16820 cat >>confdefs.h <<_ACEOF
16821#define HAVE_IFADDRS_H 1
16822_ACEOF
16823
16824fi
16825
16826done
16827
16828for ac_header in net/if_dl.h
16829do :
16830 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
16831#if HAVE_SYS_SOCKET_H
16832#include <sys/socket.h>
16833#endif
16834"
16835if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
16836 cat >>confdefs.h <<_ACEOF
16837#define HAVE_NET_IF_DL_H 1
16838_ACEOF
16839
16840fi
16841
16842done
16843
16844
16845ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
16846#if HAVE_SYS_SOCKET_H
16847#include <sys/socket.h>
16848#endif
16849#if HAVE_NET_IF_H
16850#include <net/if.h>
16851#endif
16852"
16853if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
16854
16855cat >>confdefs.h <<_ACEOF
16856#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
16857_ACEOF
16858
16859
16860fi
16861ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
16862#if HAVE_SYS_SOCKET_H
16863#include <sys/socket.h>
16864#endif
16865#if HAVE_NET_IF_H
16866#include <net/if.h>
16867#endif
16868"
16869if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
16870
16871cat >>confdefs.h <<_ACEOF
16872#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
16873_ACEOF
16874
16875
16876fi
16877ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
16878#if HAVE_SYS_SOCKET_H
16879#include <sys/socket.h>
16880#endif
16881#if HAVE_NET_IF_H
16882#include <net/if.h>
16883#endif
16884"
16885if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
16886
16887cat >>confdefs.h <<_ACEOF
16888#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
16889_ACEOF
16890
16891
16892fi
16893ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
16894#if HAVE_SYS_SOCKET_H
16895#include <sys/socket.h>
16896#endif
16897#if HAVE_NET_IF_H
16898#include <net/if.h>
16899#endif
16900"
16901if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
16902
16903cat >>confdefs.h <<_ACEOF
16904#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
16905_ACEOF
16906
16907
16908fi
16909ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
16910#if HAVE_SYS_SOCKET_H
16911#include <sys/socket.h>
16912#endif
16913#if HAVE_NET_IF_H
16914#include <net/if.h>
16915#endif
16916"
16917if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
16918
16919cat >>confdefs.h <<_ACEOF
16920#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
16921_ACEOF
16922
16923
16924fi
16925ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
16926#if HAVE_SYS_SOCKET_H
16927#include <sys/socket.h>
16928#endif
16929#if HAVE_NET_IF_H
16930#include <net/if.h>
16931#endif
16932"
16933if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
16934
16935cat >>confdefs.h <<_ACEOF
16936#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
16937_ACEOF
16938
16939
16940fi
16941
16942
16943
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
16945$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
16946if test "${emacs_cv_attribute_aligned+set}" = set; then :
16947 $as_echo_n "(cached) " >&6
16948else
16949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16950/* end confdefs.h. */
16951char __attribute__ ((__aligned__ (1 << 3))) c;
16952int
16953main ()
16954{
16955
16956 ;
16957 return 0;
16958}
16959_ACEOF
16960if ac_fn_c_try_compile "$LINENO"; then :
16961 emacs_cv_attribute_aligned=yes
16962else
16963 emacs_cv_attribute_aligned=no
16964fi
16965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16966fi
16967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
16968$as_echo "$emacs_cv_attribute_aligned" >&6; }
16969if test $emacs_cv_attribute_aligned = yes; then
16970
16971$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
16972
16973fi
16974
16975
16976DEPFLAGS=
16977MKDEPDIR=":"
16978deps_frag=deps.mk
16979if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
16981$as_echo_n "checking whether we are using GNU Make... " >&6; }
16982 HAVE_GNU_MAKE=no
16983 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
16984 if test "x$testval" != x; then
16985 HAVE_GNU_MAKE=yes
16986 else
16987 ac_enable_autodepend=no
16988 fi
16989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
16990$as_echo "$HAVE_GNU_MAKE" >&6; }
16991 if test $HAVE_GNU_MAKE = yes; then
16992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
16993$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
16994 SAVE_CFLAGS="$CFLAGS"
16995 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997/* end confdefs.h. */
16998
16999int
17000main ()
17001{
17002
17003 ;
17004 return 0;
17005}
17006_ACEOF
17007if ac_fn_c_try_compile "$LINENO"; then :
17008
17009else
17010 ac_enable_autodepend=no
17011fi
17012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17013 CFLAGS="$SAVE_CFLAGS"
17014 test -f deps.d || ac_enable_autodepend=no
17015 rm -rf deps.d
17016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
17017$as_echo "$ac_enable_autodepend" >&6; }
17018 fi
17019 if test $ac_enable_autodepend = yes; then
17020 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
17021 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
17022 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
17023 deps_frag=autodeps.mk
17024 fi
17025fi
17026deps_frag=$srcdir/src/$deps_frag
17027
17028
17029
17030
17031
17032lisp_frag=$srcdir/src/lisp.mk
17033
17034
17035
17036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
17037$as_echo_n "checking for long file names... " >&6; }
17038if test "${ac_cv_sys_long_file_names+set}" = set; then :
17039 $as_echo_n "(cached) " >&6
17040else
17041 ac_cv_sys_long_file_names=yes
17042# Test for long file names in all the places we know might matter:
17043# . the current directory, where building will happen
17044# $prefix/lib where we will be installing things
17045# $exec_prefix/lib likewise
17046# $TMPDIR if set, where it might want to write temporary files
17047# /tmp where it might want to write temporary files
17048# /var/tmp likewise
17049# /usr/tmp likewise
17050for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
17051 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
17052 # in the usual case where exec_prefix is '${prefix}'.
17053 case $ac_dir in #(
17054 . | /* | ?:[\\/]*) ;; #(
17055 *) continue;;
17056 esac
17057 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
17058 ac_xdir=$ac_dir/cf$$
17059 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
17060 ac_tf1=$ac_xdir/conftest9012345
17061 ac_tf2=$ac_xdir/conftest9012346
17062 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
17063 ac_cv_sys_long_file_names=no
17064 rm -f -r "$ac_xdir" 2>/dev/null
17065 test $ac_cv_sys_long_file_names = no && break
17066done
17067fi
17068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
17069$as_echo "$ac_cv_sys_long_file_names" >&6; }
17070if test $ac_cv_sys_long_file_names = yes; then
17071
17072$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
17073
17074fi
17075
17076
17077#### Choose a window system.
17078
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17080$as_echo_n "checking for X... " >&6; }
17081
17082
17083# Check whether --with-x was given.
17084if test "${with_x+set}" = set; then :
17085 withval=$with_x;
17086fi
17087
17088# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17089if test "x$with_x" = xno; then
17090 # The user explicitly disabled X.
17091 have_x=disabled
17092else
17093 case $x_includes,$x_libraries in #(
17094 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
17095 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
17096 $as_echo_n "(cached) " >&6
17097else
17098 # One or both of the vars are not set, and there is no cached value.
17099ac_x_includes=no ac_x_libraries=no
17100rm -f -r conftest.dir
17101if mkdir conftest.dir; then
17102 cd conftest.dir
17103 cat >Imakefile <<'_ACEOF'
17104incroot:
17105 @echo incroot='${INCROOT}'
17106usrlibdir:
17107 @echo usrlibdir='${USRLIBDIR}'
17108libdir:
17109 @echo libdir='${LIBDIR}'
17110_ACEOF
17111 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17112 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
17113 for ac_var in incroot usrlibdir libdir; do
17114 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17115 done
17116 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17117 for ac_extension in a so sl dylib la dll; do
17118 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17119 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17120 ac_im_usrlibdir=$ac_im_libdir; break
17121 fi
17122 done
17123 # Screen out bogus values from the imake configuration. They are
17124 # bogus both because they are the default anyway, and because
17125 # using them would break gcc on systems where it needs fixed includes.
17126 case $ac_im_incroot in
17127 /usr/include) ac_x_includes= ;;
17128 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17129 esac
17130 case $ac_im_usrlibdir in
17131 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17132 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17133 esac
17134 fi
17135 cd ..
17136 rm -f -r conftest.dir
17137fi
17138
17139# Standard set of common directories for X headers.
17140# Check X11 before X11Rn because it is often a symlink to the current release.
17141ac_x_header_dirs='
17142/usr/X11/include
17143/usr/X11R7/include
17144/usr/X11R6/include
17145/usr/X11R5/include
17146/usr/X11R4/include
17147
17148/usr/include/X11
17149/usr/include/X11R7
17150/usr/include/X11R6
17151/usr/include/X11R5
17152/usr/include/X11R4
17153
17154/usr/local/X11/include
17155/usr/local/X11R7/include
17156/usr/local/X11R6/include
17157/usr/local/X11R5/include
17158/usr/local/X11R4/include
17159
17160/usr/local/include/X11
17161/usr/local/include/X11R7
17162/usr/local/include/X11R6
17163/usr/local/include/X11R5
17164/usr/local/include/X11R4
17165
17166/usr/X386/include
17167/usr/x386/include
17168/usr/XFree86/include/X11
17169
17170/usr/include
17171/usr/local/include
17172/usr/unsupported/include
17173/usr/athena/include
17174/usr/local/x11r5/include
17175/usr/lpp/Xamples/include
17176
17177/usr/openwin/include
17178/usr/openwin/share/include'
17179
17180if test "$ac_x_includes" = no; then
17181 # Guess where to find include files, by looking for Xlib.h.
17182 # First, try using that file with no special directory specified.
17183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17184/* end confdefs.h. */
17185#include <X11/Xlib.h>
17186_ACEOF
17187if ac_fn_c_try_cpp "$LINENO"; then :
17188 # We can compile using X headers with no special include directory.
17189ac_x_includes=
17190else
17191 for ac_dir in $ac_x_header_dirs; do
17192 if test -r "$ac_dir/X11/Xlib.h"; then
17193 ac_x_includes=$ac_dir
17194 break
17195 fi
17196done
17197fi
17198rm -f conftest.err conftest.$ac_ext
17199fi # $ac_x_includes = no
17200
17201if test "$ac_x_libraries" = no; then
17202 # Check for the libraries.
17203 # See if we find them without any special options.
17204 # Don't add to $LIBS permanently.
17205 ac_save_LIBS=$LIBS
17206 LIBS="-lX11 $LIBS"
17207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208/* end confdefs.h. */
17209#include <X11/Xlib.h>
17210int
17211main ()
17212{
17213XrmInitialize ()
17214 ;
17215 return 0;
17216}
17217_ACEOF
17218if ac_fn_c_try_link "$LINENO"; then :
17219 LIBS=$ac_save_LIBS
17220# We can link X programs with no special library path.
17221ac_x_libraries=
17222else
17223 LIBS=$ac_save_LIBS
17224for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17225do
17226 # Don't even attempt the hair of trying to link an X program!
17227 for ac_extension in a so sl dylib la dll; do
17228 if test -r "$ac_dir/libX11.$ac_extension"; then
17229 ac_x_libraries=$ac_dir
17230 break 2
17231 fi
17232 done
17233done
17234fi
17235rm -f core conftest.err conftest.$ac_objext \
17236 conftest$ac_exeext conftest.$ac_ext
17237fi # $ac_x_libraries = no
17238
17239case $ac_x_includes,$ac_x_libraries in #(
17240 no,* | *,no | *\'*)
17241 # Didn't find X, or a directory has "'" in its name.
17242 ac_cv_have_x="have_x=no";; #(
17243 *)
17244 # Record where we found X for the cache.
17245 ac_cv_have_x="have_x=yes\
17246 ac_x_includes='$ac_x_includes'\
17247 ac_x_libraries='$ac_x_libraries'"
17248esac
17249fi
17250;; #(
17251 *) have_x=yes;;
17252 esac
17253 eval "$ac_cv_have_x"
17254fi # $with_x != no
17255
17256if test "$have_x" != yes; then
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17258$as_echo "$have_x" >&6; }
17259 no_x=yes
17260else
17261 # If each of the values was on the command line, it overrides each guess.
17262 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17263 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17264 # Update the cache value to reflect the command line values.
17265 ac_cv_have_x="have_x=yes\
17266 ac_x_includes='$x_includes'\
17267 ac_x_libraries='$x_libraries'"
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17269$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17270fi
17271
17272if test "$no_x" = yes; then
17273 window_system=none
17274else
17275 window_system=x11
17276fi
17277
17278LD_SWITCH_X_SITE_RPATH=
17279if test "${x_libraries}" != NONE; then
17280 if test -n "${x_libraries}"; then
17281 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
17282 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
17283 fi
17284 x_default_search_path=""
17285 x_search_path=${x_libraries}
17286 if test -z "${x_search_path}"; then
17287 x_search_path=/usr/lib
17288 fi
17289 for x_library in `echo ${x_search_path}: | \
17290 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
17291 x_search_path="\
17292${x_library}/X11/%L/%T/%N%C%S:\
17293${x_library}/X11/%l/%T/%N%C%S:\
17294${x_library}/X11/%T/%N%C%S:\
17295${x_library}/X11/%L/%T/%N%S:\
17296${x_library}/X11/%l/%T/%N%S:\
17297${x_library}/X11/%T/%N%S"
17298 if test x"${x_default_search_path}" = x; then
17299 x_default_search_path=${x_search_path}
17300 else
17301 x_default_search_path="${x_search_path}:${x_default_search_path}"
17302 fi
17303 done
17304fi
17305
17306
17307if test "${x_includes}" != NONE && test -n "${x_includes}"; then
17308 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
17309fi
17310
17311if test x"${x_includes}" = x; then
17312 bitmapdir=/usr/include/X11/bitmaps
17313else
17314 # accumulate include directories that have X11 bitmap subdirectories
17315 bmd_acc="dummyval"
17316 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
17317 if test -d "${bmd}/X11/bitmaps"; then
17318 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
17319 fi
17320 if test -d "${bmd}/bitmaps"; then
17321 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
17322 fi
17323 done
17324 if test ${bmd_acc} != "dummyval"; then
17325 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
17326 fi
17327fi
17328
17329HAVE_NS=no
17330NS_IMPL_COCOA=no
17331NS_IMPL_GNUSTEP=no
17332tmp_CPPFLAGS="$CPPFLAGS"
17333tmp_CFLAGS="$CFLAGS"
17334CPPFLAGS="$CPPFLAGS -x objective-c"
17335CFLAGS="$CFLAGS -x objective-c"
17336TEMACS_LDFLAGS2="\${LDFLAGS}"
17337GNU_OBJC_CFLAGS=
17338if test "${with_ns}" != no; then
17339 if test "${opsys}" = darwin; then
17340 NS_IMPL_COCOA=yes
17341 ns_appdir=`pwd`/nextstep/Emacs.app
17342 ns_appbindir=${ns_appdir}/Contents/MacOS
17343 ns_appresdir=${ns_appdir}/Contents/Resources
17344 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
17345 elif test -f $GNUSTEP_CONFIG_FILE; then
17346 NS_IMPL_GNUSTEP=yes
17347 ns_appdir=`pwd`/nextstep/Emacs.app
17348 ns_appbindir=${ns_appdir}
17349 ns_appresdir=${ns_appdir}/Resources
17350 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
17351 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
17352 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
17353 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
17354 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
17355 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
17356 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
17357 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
17358 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
17359 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
17360 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
17361 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
17362 LIB_STANDARD=
17363 START_FILES=
17364 TEMACS_LDFLAGS2=
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
17366$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
17367if test "${emacs_cv_objc_exceptions+set}" = set; then :
17368 $as_echo_n "(cached) " >&6
17369else
17370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17371/* end confdefs.h. */
17372#include <GNUstepBase/GSConfig.h>
17373int
17374main ()
17375{
17376#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
173771;
17378#else
17379fail;
17380#endif
17381 ;
17382 return 0;
17383}
17384_ACEOF
17385if ac_fn_c_try_compile "$LINENO"; then :
17386 emacs_cv_objc_exceptions=yes
17387else
17388 emacs_cv_objc_exceptions=no
17389fi
17390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17391fi
17392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
17393$as_echo "$emacs_cv_objc_exceptions" >&6; }
17394 if test $emacs_cv_objc_exceptions = yes; then
17395
17396$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
17397
17398 GNU_OBJC_CFLAGS="-fobjc-exceptions"
17399 fi
17400 fi
17401
17402 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
17403
17404 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
17405if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
17406 HAVE_NS=yes
17407else
17408 as_fn_error "\`--with-ns' was specified, but the include
17409 files are missing or cannot be compiled." "$LINENO" 5
17410fi
17411
17412
17413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17414/* end confdefs.h. */
17415#include <Foundation/NSObjCRuntime.h>
17416int
17417main ()
17418{
17419NSInteger i;
17420 ;
17421 return 0;
17422}
17423_ACEOF
17424if ac_fn_c_try_compile "$LINENO"; then :
17425 ns_have_nsinteger=yes
17426else
17427 ns_have_nsinteger=no
17428fi
17429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17430 if test $ns_have_nsinteger = yes; then
17431
17432$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
17433
17434 fi
17435fi
17436
17437
17438INSTALL_ARCH_INDEP_EXTRA=install-etc
17439ns_self_contained=no
17440ns_frag=/dev/null
17441NS_OBJ=
17442NS_OBJC_OBJ=
17443if test "${HAVE_NS}" = yes; then
17444 if test "$with_toolkit_scroll_bars" = "no"; then
17445 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
17446 fi
17447
17448 window_system=nextstep
17449 with_xft=no
17450 # set up packaging dirs
17451 if test "${EN_NS_SELF_CONTAINED}" = yes; then
17452 ns_self_contained=yes
17453 prefix=${ns_appresdir}
17454 exec_prefix=${ns_appbindir}
17455 libexecdir="\${ns_appbindir}/libexec"
17456 archlibdir="\${ns_appbindir}/libexec"
17457 docdir="\${ns_appresdir}/etc"
17458 etcdir="\${ns_appresdir}/etc"
17459 infodir="\${ns_appresdir}/info"
17460 mandir="\${ns_appresdir}/man"
17461 lispdir="\${ns_appresdir}/lisp"
17462 leimdir="\${ns_appresdir}/leim"
17463 INSTALL_ARCH_INDEP_EXTRA=
17464 fi
17465 ns_frag=$srcdir/src/ns.mk
17466 NS_OBJ="fontset.o fringe.o image.o"
17467 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
17468fi
17469CFLAGS="$tmp_CFLAGS"
17470CPPFLAGS="$tmp_CPPFLAGS"
17471
17472
17473
17474
17475
17476
17477
17478case "${window_system}" in
17479 x11 )
17480 HAVE_X_WINDOWS=yes
17481 HAVE_X11=yes
17482 case "${with_x_toolkit}" in
17483 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
17484 motif ) USE_X_TOOLKIT=MOTIF ;;
17485 gtk ) with_gtk=yes
17486 USE_X_TOOLKIT=none ;;
17487 gtk3 ) with_gtk3=yes
17488 USE_X_TOOLKIT=none ;;
17489 no ) USE_X_TOOLKIT=none ;;
17490 * ) USE_X_TOOLKIT=maybe ;;
17491 esac
17492 ;;
17493 nextstep | none )
17494 HAVE_X_WINDOWS=no
17495 HAVE_X11=no
17496 USE_X_TOOLKIT=none
17497 ;;
17498esac
17499
17500if test "$window_system" = none && test "X$with_x" != "Xno"; then
17501 # Extract the first word of "X", so it can be a program name with args.
17502set dummy X; ac_word=$2
17503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17504$as_echo_n "checking for $ac_word... " >&6; }
17505if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
17506 $as_echo_n "(cached) " >&6
17507else
17508 if test -n "$HAVE_XSERVER"; then
17509 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
17510else
17511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17512for as_dir in $PATH
17513do
17514 IFS=$as_save_IFS
17515 test -z "$as_dir" && as_dir=.
17516 for ac_exec_ext in '' $ac_executable_extensions; do
17517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17518 ac_cv_prog_HAVE_XSERVER="true"
17519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17520 break 2
17521 fi
17522done
17523 done
17524IFS=$as_save_IFS
17525
17526 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
17527fi
17528fi
17529HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
17530if test -n "$HAVE_XSERVER"; then
17531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
17532$as_echo "$HAVE_XSERVER" >&6; }
17533else
17534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17535$as_echo "no" >&6; }
17536fi
17537
17538
17539 if test "$HAVE_XSERVER" = true ||
17540 test -n "$DISPLAY" ||
17541 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
17542 as_fn_error "You seem to be running X, but no X development libraries
17543were found. You should install the relevant development files for X
17544and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
17545sure you have development files for image handling, i.e.
17546tiff, gif, jpeg, png and xpm.
17547If you are sure you want Emacs compiled without X window support, pass
17548 --without-x
17549to configure." "$LINENO" 5
17550 fi
17551fi
17552
17553### If we're using X11, we should use the X menu package.
17554HAVE_MENUS=no
17555case ${HAVE_X11} in
17556 yes ) HAVE_MENUS=yes ;;
17557esac
17558
17559# Does the opsystem file prohibit the use of the GNU malloc?
17560# Assume not, until told otherwise.
17561GNU_MALLOC=yes
17562
17563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
17564$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
17565if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
17566 $as_echo_n "(cached) " >&6
17567else
17568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17569/* end confdefs.h. */
17570#include <malloc.h>
17571 static void hook (void) {}
17572int
17573main ()
17574{
17575malloc_set_state (malloc_get_state ());
17576 __after_morecore_hook = hook;
17577 __malloc_initialize_hook = hook;
17578 ;
17579 return 0;
17580}
17581_ACEOF
17582if ac_fn_c_try_link "$LINENO"; then :
17583 emacs_cv_var_doug_lea_malloc=yes
17584else
17585 emacs_cv_var_doug_lea_malloc=no
17586fi
17587rm -f core conftest.err conftest.$ac_objext \
17588 conftest$ac_exeext conftest.$ac_ext
17589fi
17590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
17591$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
17592doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
17593
17594
17595system_malloc=no
17596case "$opsys" in
17597 ## darwin ld insists on the use of malloc routines in the System framework.
17598 darwin|sol2-10) system_malloc=yes ;;
17599esac
17600
17601if test "${system_malloc}" = "yes"; then
17602
17603$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
17604
17605 GNU_MALLOC=no
17606 GNU_MALLOC_reason="
17607 (The GNU allocators don't work with this system configuration.)"
17608 GMALLOC_OBJ=
17609 VMLIMIT_OBJ=
17610else
17611 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
17612 VMLIMIT_OBJ=vm-limit.o
17613fi
17614
17615
17616
17617if test "$doug_lea_malloc" = "yes" ; then
17618 if test "$GNU_MALLOC" = yes ; then
17619 GNU_MALLOC_reason="
17620 (Using Doug Lea's new malloc from the GNU C Library.)"
17621 fi
17622
17623$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
17624
17625
17626 ## Use mmap directly for allocating larger buffers.
17627 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
17628 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
17629 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
17630 case "$opsys" in
17631 gnu*) REL_ALLOC=no ;;
17632 esac
17633fi
17634
17635if test x"${REL_ALLOC}" = x; then
17636 REL_ALLOC=${GNU_MALLOC}
17637fi
17638
17639use_mmap_for_buffers=no
17640case "$opsys" in
17641 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
17642esac
17643
17644
17645
17646
17647for ac_func in getpagesize
17648do :
17649 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
17650if test "x$ac_cv_func_getpagesize" = x""yes; then :
17651 cat >>confdefs.h <<_ACEOF
17652#define HAVE_GETPAGESIZE 1
17653_ACEOF
17654
17655fi
17656done
17657
17658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
17659$as_echo_n "checking for working mmap... " >&6; }
17660if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
17661 $as_echo_n "(cached) " >&6
17662else
17663 if test "$cross_compiling" = yes; then :
17664 ac_cv_func_mmap_fixed_mapped=no
17665else
17666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17667/* end confdefs.h. */
17668$ac_includes_default
17669/* malloc might have been renamed as rpl_malloc. */
17670#undef malloc
17671
17672/* Thanks to Mike Haertel and Jim Avera for this test.
17673 Here is a matrix of mmap possibilities:
17674 mmap private not fixed
17675 mmap private fixed at somewhere currently unmapped
17676 mmap private fixed at somewhere already mapped
17677 mmap shared not fixed
17678 mmap shared fixed at somewhere currently unmapped
17679 mmap shared fixed at somewhere already mapped
17680 For private mappings, we should verify that changes cannot be read()
17681 back from the file, nor mmap's back from the file at a different
17682 address. (There have been systems where private was not correctly
17683 implemented like the infamous i386 svr4.0, and systems where the
17684 VM page cache was not coherent with the file system buffer cache
17685 like early versions of FreeBSD and possibly contemporary NetBSD.)
17686 For shared mappings, we should conversely verify that changes get
17687 propagated back to all the places they're supposed to be.
17688
17689 Grep wants private fixed already mapped.
17690 The main things grep needs to know about mmap are:
17691 * does it exist and is it safe to write into the mmap'd area
17692 * how to use it (BSD variants) */
17693
17694#include <fcntl.h>
17695#include <sys/mman.h>
17696
17697#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
17698char *malloc ();
17699#endif
17700
17701/* This mess was copied from the GNU getpagesize.h. */
17702#ifndef HAVE_GETPAGESIZE
17703# ifdef _SC_PAGESIZE
17704# define getpagesize() sysconf(_SC_PAGESIZE)
17705# else /* no _SC_PAGESIZE */
17706# ifdef HAVE_SYS_PARAM_H
17707# include <sys/param.h>
17708# ifdef EXEC_PAGESIZE
17709# define getpagesize() EXEC_PAGESIZE
17710# else /* no EXEC_PAGESIZE */
17711# ifdef NBPG
17712# define getpagesize() NBPG * CLSIZE
17713# ifndef CLSIZE
17714# define CLSIZE 1
17715# endif /* no CLSIZE */
17716# else /* no NBPG */
17717# ifdef NBPC
17718# define getpagesize() NBPC
17719# else /* no NBPC */
17720# ifdef PAGESIZE
17721# define getpagesize() PAGESIZE
17722# endif /* PAGESIZE */
17723# endif /* no NBPC */
17724# endif /* no NBPG */
17725# endif /* no EXEC_PAGESIZE */
17726# else /* no HAVE_SYS_PARAM_H */
17727# define getpagesize() 8192 /* punt totally */
17728# endif /* no HAVE_SYS_PARAM_H */
17729# endif /* no _SC_PAGESIZE */
17730
17731#endif /* no HAVE_GETPAGESIZE */
17732
17733int
17734main ()
17735{
17736 char *data, *data2, *data3;
17737 const char *cdata2;
17738 int i, pagesize;
17739 int fd, fd2;
17740
17741 pagesize = getpagesize ();
17742
17743 /* First, make a file with some known garbage in it. */
17744 data = (char *) malloc (pagesize);
17745 if (!data)
17746 return 1;
17747 for (i = 0; i < pagesize; ++i)
17748 *(data + i) = rand ();
17749 umask (0);
17750 fd = creat ("conftest.mmap", 0600);
17751 if (fd < 0)
17752 return 2;
17753 if (write (fd, data, pagesize) != pagesize)
17754 return 3;
17755 close (fd);
17756
17757 /* Next, check that the tail of a page is zero-filled. File must have
17758 non-zero length, otherwise we risk SIGBUS for entire page. */
17759 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
17760 if (fd2 < 0)
17761 return 4;
17762 cdata2 = "";
17763 if (write (fd2, cdata2, 1) != 1)
17764 return 5;
17765 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
17766 if (data2 == MAP_FAILED)
17767 return 6;
17768 for (i = 0; i < pagesize; ++i)
17769 if (*(data2 + i))
17770 return 7;
17771 close (fd2);
17772 if (munmap (data2, pagesize))
17773 return 8;
17774
17775 /* Next, try to mmap the file at a fixed address which already has
17776 something else allocated at it. If we can, also make sure that
17777 we see the same garbage. */
17778 fd = open ("conftest.mmap", O_RDWR);
17779 if (fd < 0)
17780 return 9;
17781 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
17782 MAP_PRIVATE | MAP_FIXED, fd, 0L))
17783 return 10;
17784 for (i = 0; i < pagesize; ++i)
17785 if (*(data + i) != *(data2 + i))
17786 return 11;
17787
17788 /* Finally, make sure that changes to the mapped area do not
17789 percolate back to the file as seen by read(). (This is a bug on
17790 some variants of i386 svr4.0.) */
17791 for (i = 0; i < pagesize; ++i)
17792 *(data2 + i) = *(data2 + i) + 1;
17793 data3 = (char *) malloc (pagesize);
17794 if (!data3)
17795 return 12;
17796 if (read (fd, data3, pagesize) != pagesize)
17797 return 13;
17798 for (i = 0; i < pagesize; ++i)
17799 if (*(data + i) != *(data3 + i))
17800 return 14;
17801 close (fd);
17802 return 0;
17803}
17804_ACEOF
17805if ac_fn_c_try_run "$LINENO"; then :
17806 ac_cv_func_mmap_fixed_mapped=yes
17807else
17808 ac_cv_func_mmap_fixed_mapped=no
17809fi
17810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17811 conftest.$ac_objext conftest.beam conftest.$ac_ext
17812fi
17813
17814fi
17815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
17816$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
17817if test $ac_cv_func_mmap_fixed_mapped = yes; then
17818
17819$as_echo "#define HAVE_MMAP 1" >>confdefs.h
17820
17821fi
17822rm -f conftest.mmap conftest.txt
17823
17824if test $use_mmap_for_buffers = yes; then
17825
17826$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
17827
17828 REL_ALLOC=no
17829fi
17830
17831LIBS="$LIBS_SYSTEM $LIBS"
17832
17833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
17834$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
17835if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
17836 $as_echo_n "(cached) " >&6
17837else
17838 ac_check_lib_save_LIBS=$LIBS
17839LIBS="-ldnet $LIBS"
17840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17841/* end confdefs.h. */
17842
17843/* Override any GCC internal prototype to avoid an error.
17844 Use char because int might match the return type of a GCC
17845 builtin and then its argument prototype would still apply. */
17846#ifdef __cplusplus
17847extern "C"
17848#endif
17849char dnet_ntoa ();
17850int
17851main ()
17852{
17853return dnet_ntoa ();
17854 ;
17855 return 0;
17856}
17857_ACEOF
17858if ac_fn_c_try_link "$LINENO"; then :
17859 ac_cv_lib_dnet_dnet_ntoa=yes
17860else
17861 ac_cv_lib_dnet_dnet_ntoa=no
17862fi
17863rm -f core conftest.err conftest.$ac_objext \
17864 conftest$ac_exeext conftest.$ac_ext
17865LIBS=$ac_check_lib_save_LIBS
17866fi
17867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
17868$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
17869if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
17870 cat >>confdefs.h <<_ACEOF
17871#define HAVE_LIBDNET 1
17872_ACEOF
17873
17874 LIBS="-ldnet $LIBS"
17875
17876fi
17877
17878
17879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
17880$as_echo_n "checking for main in -lXbsd... " >&6; }
17881if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
17882 $as_echo_n "(cached) " >&6
17883else
17884 ac_check_lib_save_LIBS=$LIBS
17885LIBS="-lXbsd $LIBS"
17886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17887/* end confdefs.h. */
17888
17889
17890int
17891main ()
17892{
17893return main ();
17894 ;
17895 return 0;
17896}
17897_ACEOF
17898if ac_fn_c_try_link "$LINENO"; then :
17899 ac_cv_lib_Xbsd_main=yes
17900else
17901 ac_cv_lib_Xbsd_main=no
17902fi
17903rm -f core conftest.err conftest.$ac_objext \
17904 conftest$ac_exeext conftest.$ac_ext
17905LIBS=$ac_check_lib_save_LIBS
17906fi
17907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
17908$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
17909if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
17910 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
17911fi
17912
17913
17914LIB_PTHREAD=
17915
17916
17917
17918if test "$ac_cv_header_pthread_h"; then
17919 if test "$GMALLOC_OBJ" = gmalloc.o; then
17920 emacs_pthread_function=pthread_atfork
17921 else
17922 emacs_pthread_function=pthread_self
17923 fi
17924 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
17925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
17926$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
17927if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
17928 $as_echo_n "(cached) " >&6
17929else
17930 ac_check_lib_save_LIBS=$LIBS
17931LIBS="-lpthread $LIBS"
17932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17933/* end confdefs.h. */
17934
17935/* Override any GCC internal prototype to avoid an error.
17936 Use char because int might match the return type of a GCC
17937 builtin and then its argument prototype would still apply. */
17938#ifdef __cplusplus
17939extern "C"
17940#endif
17941char $emacs_pthread_function ();
17942int
17943main ()
17944{
17945return $emacs_pthread_function ();
17946 ;
17947 return 0;
17948}
17949_ACEOF
17950if ac_fn_c_try_link "$LINENO"; then :
17951 eval "$as_ac_Lib=yes"
17952else
17953 eval "$as_ac_Lib=no"
17954fi
17955rm -f core conftest.err conftest.$ac_objext \
17956 conftest$ac_exeext conftest.$ac_ext
17957LIBS=$ac_check_lib_save_LIBS
17958fi
17959eval ac_res=\$$as_ac_Lib
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17961$as_echo "$ac_res" >&6; }
17962eval as_val=\$$as_ac_Lib
17963 if test "x$as_val" = x""yes; then :
17964 HAVE_PTHREAD=yes
17965fi
17966
17967fi
17968if test "$HAVE_PTHREAD" = yes; then
17969 case "${canonical}" in
17970 *-hpux*) ;;
17971 *) LIB_PTHREAD="-lpthread"
17972 LIBS="$LIB_PTHREAD $LIBS" ;;
17973 esac
17974
17975$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
17976
17977fi
17978
17979
17980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
17981$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
17982if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
17983 $as_echo_n "(cached) " >&6
17984else
17985 ac_check_lib_save_LIBS=$LIBS
17986LIBS="-lpthreads $LIBS"
17987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17988/* end confdefs.h. */
17989
17990/* Override any GCC internal prototype to avoid an error.
17991 Use char because int might match the return type of a GCC
17992 builtin and then its argument prototype would still apply. */
17993#ifdef __cplusplus
17994extern "C"
17995#endif
17996char cma_open ();
17997int
17998main ()
17999{
18000return cma_open ();
18001 ;
18002 return 0;
18003}
18004_ACEOF
18005if ac_fn_c_try_link "$LINENO"; then :
18006 ac_cv_lib_pthreads_cma_open=yes
18007else
18008 ac_cv_lib_pthreads_cma_open=no
18009fi
18010rm -f core conftest.err conftest.$ac_objext \
18011 conftest$ac_exeext conftest.$ac_ext
18012LIBS=$ac_check_lib_save_LIBS
18013fi
18014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
18015$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
18016if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
18017 cat >>confdefs.h <<_ACEOF
18018#define HAVE_LIBPTHREADS 1
18019_ACEOF
18020
18021 LIBS="-lpthreads $LIBS"
18022
18023fi
18024
18025
18026## Note: when using cpp in s/aix4.2.h, this definition depended on
18027## HAVE_LIBPTHREADS. That was not defined earlier in configure when
18028## the system file was sourced. Hence the value of LIBS_SYSTEM
18029## added to LIBS in configure would never contain the pthreads part,
18030## but the value used in Makefiles might. FIXME?
18031##
18032## -lpthreads seems to be necessary for Xlib in X11R6, and should
18033## be harmless on older versions of X where it happens to exist.
18034test "$opsys" = "aix4-2" && \
18035 test $ac_cv_lib_pthreads_cma_open = yes && \
18036 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
18037
18038
18039case ${host_os} in
18040aix*)
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
18042$as_echo_n "checking for -bbigtoc option... " >&6; }
18043if test "${gdb_cv_bigtoc+set}" = set; then :
18044 $as_echo_n "(cached) " >&6
18045else
18046
18047 case $GCC in
18048 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
18049 *) gdb_cv_bigtoc=-bbigtoc ;;
18050 esac
18051
18052 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
18053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18054/* end confdefs.h. */
18055
18056int
18057main ()
18058{
18059int i;
18060 ;
18061 return 0;
18062}
18063_ACEOF
18064if ac_fn_c_try_link "$LINENO"; then :
18065
18066else
18067 gdb_cv_bigtoc=
18068fi
18069rm -f core conftest.err conftest.$ac_objext \
18070 conftest$ac_exeext conftest.$ac_ext
18071
18072fi
18073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
18074$as_echo "$gdb_cv_bigtoc" >&6; }
18075 ;;
18076esac
18077
18078# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
18079# used for the tests that follow. We set them back to REAL_CFLAGS and
18080# REAL_CPPFLAGS later on.
18081
18082REAL_CFLAGS="$CFLAGS"
18083REAL_CPPFLAGS="$CPPFLAGS"
18084
18085if test "${HAVE_X11}" = "yes"; then
18086 DEFS="$C_SWITCH_X_SITE $DEFS"
18087 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
18088 LIBS="-lX11 $LIBS"
18089 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
18090 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
18091
18092 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
18093 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
18094 # but it's more convenient here to set LD_RUN_PATH since this
18095 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
18096 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
18097 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
18098 export LD_RUN_PATH
18099 fi
18100
18101 if test "${opsys}" = "gnu-linux"; then
18102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
18103$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
18104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18105/* end confdefs.h. */
18106
18107int
18108main ()
18109{
18110XOpenDisplay ("foo");
18111 ;
18112 return 0;
18113}
18114_ACEOF
18115if ac_fn_c_try_link "$LINENO"; then :
18116 xgnu_linux_first_failure=no
18117else
18118 xgnu_linux_first_failure=yes
18119fi
18120rm -f core conftest.err conftest.$ac_objext \
18121 conftest$ac_exeext conftest.$ac_ext
18122 if test "${xgnu_linux_first_failure}" = "yes"; then
18123 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
18124 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
18125 OLD_CPPFLAGS="$CPPFLAGS"
18126 OLD_LIBS="$LIBS"
18127 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
18128 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
18129 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
18130 LIBS="$LIBS -b i486-linuxaout"
18131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18132/* end confdefs.h. */
18133
18134int
18135main ()
18136{
18137XOpenDisplay ("foo");
18138 ;
18139 return 0;
18140}
18141_ACEOF
18142if ac_fn_c_try_link "$LINENO"; then :
18143 xgnu_linux_second_failure=no
18144else
18145 xgnu_linux_second_failure=yes
18146fi
18147rm -f core conftest.err conftest.$ac_objext \
18148 conftest$ac_exeext conftest.$ac_ext
18149 if test "${xgnu_linux_second_failure}" = "yes"; then
18150 # If we get the same failure with -b, there is no use adding -b.
18151 # So take it out. This plays safe.
18152 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
18153 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
18154 CPPFLAGS="$OLD_CPPFLAGS"
18155 LIBS="$OLD_LIBS"
18156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18157$as_echo "no" >&6; }
18158 else
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18160$as_echo "yes" >&6; }
18161 fi
18162 else
18163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18164$as_echo "no" >&6; }
18165 fi
18166 fi
18167
18168 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
18169 # header files included from there.
18170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
18171$as_echo_n "checking for Xkb... " >&6; }
18172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18173/* end confdefs.h. */
18174#include <X11/Xlib.h>
18175#include <X11/XKBlib.h>
18176int
18177main ()
18178{
18179XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
18180 ;
18181 return 0;
18182}
18183_ACEOF
18184if ac_fn_c_try_link "$LINENO"; then :
18185 emacs_xkb=yes
18186else
18187 emacs_xkb=no
18188fi
18189rm -f core conftest.err conftest.$ac_objext \
18190 conftest$ac_exeext conftest.$ac_ext
18191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
18192$as_echo "$emacs_xkb" >&6; }
18193 if test $emacs_xkb = yes; then
18194
18195$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
18196
18197 fi
18198
18199 for ac_func in XrmSetDatabase XScreenResourceString \
18200XScreenNumberOfScreen
18201do :
18202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18203ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18204eval as_val=\$$as_ac_var
18205 if test "x$as_val" = x""yes; then :
18206 cat >>confdefs.h <<_ACEOF
18207#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18208_ACEOF
18209
18210fi
18211done
18212
18213fi
18214
18215if test "${window_system}" = "x11"; then
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
18217$as_echo_n "checking X11 version 6... " >&6; }
18218 if test "${emacs_cv_x11_version_6+set}" = set; then :
18219 $as_echo_n "(cached) " >&6
18220else
18221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18222/* end confdefs.h. */
18223#include <X11/Xlib.h>
18224int
18225main ()
18226{
18227#if XlibSpecificationRelease < 6
18228fail;
18229#endif
18230
18231 ;
18232 return 0;
18233}
18234_ACEOF
18235if ac_fn_c_try_link "$LINENO"; then :
18236 emacs_cv_x11_version_6=yes
18237else
18238 emacs_cv_x11_version_6=no
18239fi
18240rm -f core conftest.err conftest.$ac_objext \
18241 conftest$ac_exeext conftest.$ac_ext
18242fi
18243
18244 if test $emacs_cv_x11_version_6 = yes; then
18245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
18246$as_echo "6 or newer" >&6; }
18247
18248$as_echo "#define HAVE_X11R6 1" >>confdefs.h
18249
18250
18251$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
18252
18253 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
18254 ## XIM support.
18255 case "$opsys" in
18256 sol2-*) : ;;
18257 *)
18258$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
18259
18260 ;;
18261 esac
18262 else
18263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
18264$as_echo "before 6" >&6; }
18265 fi
18266fi
18267
18268
18269### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
18270HAVE_RSVG=no
18271if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
18272 if test "${with_rsvg}" != "no"; then
18273 RSVG_REQUIRED=2.11.0
18274 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
18275
18276
18277 succeeded=no
18278
18279 if test "$PKG_CONFIG" = "no" ; then
18280 :
18281 else
18282 PKG_CONFIG_MIN_VERSION=0.9.0
18283 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
18285$as_echo_n "checking for $RSVG_MODULE... " >&6; }
18286
18287 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
18288 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
18289 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
18290 edit_cflags="
18291 s,///*,/,g
18292 s/^/ /
18293 s/ -I/ $isystem/g
18294 s/^ //
18295 "
18296 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
18297 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
18298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
18299$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
18300 succeeded=yes
18301 else
18302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18303$as_echo "no" >&6; }
18304 RSVG_CFLAGS=""
18305 RSVG_LIBS=""
18306 ## If we have a custom action on failure, don't print errors, but
18307 ## do set a variable so people can do so.
18308 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
18309
18310 fi
18311
18312
18313
18314 else
18315 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18316 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18317 fi
18318 fi
18319
18320 if test $succeeded = yes; then
18321 HAVE_RSVG=yes
18322 else
18323 :
18324 fi
18325
18326
18327
18328
18329 if test $HAVE_RSVG = yes; then
18330
18331$as_echo "#define HAVE_RSVG 1" >>confdefs.h
18332
18333 CFLAGS="$CFLAGS $RSVG_CFLAGS"
18334 LIBS="$RSVG_LIBS $LIBS"
18335 fi
18336 fi
18337fi
18338
18339HAVE_IMAGEMAGICK=no
18340if test "${HAVE_X11}" = "yes"; then
18341 if test "${with_imagemagick}" != "no"; then
18342 ## 6.2.8 is the earliest version known to work, but earlier versions
18343 ## might work - let us know if you find one.
18344 ## 6.0.7 does not work. See bug#7955.
18345 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
18346
18347 succeeded=no
18348
18349 if test "$PKG_CONFIG" = "no" ; then
18350 :
18351 else
18352 PKG_CONFIG_MIN_VERSION=0.9.0
18353 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
18355$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
18356
18357 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
18358 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
18359 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
18360 edit_cflags="
18361 s,///*,/,g
18362 s/^/ /
18363 s/ -I/ $isystem/g
18364 s/^ //
18365 "
18366 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
18367 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
18368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
18369$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
18370 succeeded=yes
18371 else
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18373$as_echo "no" >&6; }
18374 IMAGEMAGICK_CFLAGS=""
18375 IMAGEMAGICK_LIBS=""
18376 ## If we have a custom action on failure, don't print errors, but
18377 ## do set a variable so people can do so.
18378 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
18379
18380 fi
18381
18382
18383
18384 else
18385 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18386 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18387 fi
18388 fi
18389
18390 if test $succeeded = yes; then
18391 HAVE_IMAGEMAGICK=yes
18392 else
18393 :
18394 fi
18395
18396
18397
18398
18399 if test $HAVE_IMAGEMAGICK = yes; then
18400
18401$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
18402
18403 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
18404 LIBS="$IMAGEMAGICK_LIBS $LIBS"
18405 for ac_func in MagickExportImagePixels MagickMergeImageLayers
18406do :
18407 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18408ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18409eval as_val=\$$as_ac_var
18410 if test "x$as_val" = x""yes; then :
18411 cat >>confdefs.h <<_ACEOF
18412#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18413_ACEOF
18414
18415fi
18416done
18417
18418 fi
18419 fi
18420fi
18421
18422
18423HAVE_GTK=no
18424GTK_OBJ=
18425if test "${with_gtk3}" = "yes"; then
18426 GLIB_REQUIRED=2.28
18427 GTK_REQUIRED=3.0
18428 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
18429
18430
18431 succeeded=no
18432
18433 if test "$PKG_CONFIG" = "no" ; then
18434 pkg_check_gtk=no
18435 else
18436 PKG_CONFIG_MIN_VERSION=0.9.0
18437 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
18439$as_echo_n "checking for $GTK_MODULES... " >&6; }
18440
18441 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
18442 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
18443 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
18444 edit_cflags="
18445 s,///*,/,g
18446 s/^/ /
18447 s/ -I/ $isystem/g
18448 s/^ //
18449 "
18450 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
18451 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
18452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
18453$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
18454 succeeded=yes
18455 else
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18457$as_echo "no" >&6; }
18458 GTK_CFLAGS=""
18459 GTK_LIBS=""
18460 ## If we have a custom action on failure, don't print errors, but
18461 ## do set a variable so people can do so.
18462 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
18463
18464 fi
18465
18466
18467
18468 else
18469 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18470 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18471 fi
18472 fi
18473
18474 if test $succeeded = yes; then
18475 pkg_check_gtk=yes
18476 else
18477 pkg_check_gtk=no
18478 fi
18479
18480 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
18481 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
18482 fi
18483
18484$as_echo "#define HAVE_GTK3 1" >>confdefs.h
18485
18486 GTK_OBJ=emacsgtkfixed.o
18487fi
18488
18489if test "$pkg_check_gtk" != "yes"; then
18490 HAVE_GTK=no
18491if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
18492 GLIB_REQUIRED=2.10
18493 GTK_REQUIRED=2.10
18494 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
18495
18496
18497 succeeded=no
18498
18499 if test "$PKG_CONFIG" = "no" ; then
18500 pkg_check_gtk=no
18501 else
18502 PKG_CONFIG_MIN_VERSION=0.9.0
18503 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
18505$as_echo_n "checking for $GTK_MODULES... " >&6; }
18506
18507 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
18508 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
18509 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
18510 edit_cflags="
18511 s,///*,/,g
18512 s/^/ /
18513 s/ -I/ $isystem/g
18514 s/^ //
18515 "
18516 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
18517 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
18518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
18519$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
18520 succeeded=yes
18521 else
18522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18523$as_echo "no" >&6; }
18524 GTK_CFLAGS=""
18525 GTK_LIBS=""
18526 ## If we have a custom action on failure, don't print errors, but
18527 ## do set a variable so people can do so.
18528 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
18529
18530 fi
18531
18532
18533
18534 else
18535 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18536 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18537 fi
18538 fi
18539
18540 if test $succeeded = yes; then
18541 pkg_check_gtk=yes
18542 else
18543 pkg_check_gtk=no
18544 fi
18545
18546 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
18547 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
18548 fi
18549fi
18550fi
18551
18552if test x"$pkg_check_gtk" = xyes; then
18553
18554
18555
18556 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
18557 CFLAGS="$CFLAGS $GTK_CFLAGS"
18558 LIBS="$GTK_LIBS $LIBS"
18559 GTK_COMPILES=no
18560 for ac_func in gtk_main
18561do :
18562 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
18563if test "x$ac_cv_func_gtk_main" = x""yes; then :
18564 cat >>confdefs.h <<_ACEOF
18565#define HAVE_GTK_MAIN 1
18566_ACEOF
18567 GTK_COMPILES=yes
18568fi
18569done
18570
18571 if test "${GTK_COMPILES}" != "yes"; then
18572 if test "$USE_X_TOOLKIT" != "maybe"; then
18573 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
18574 fi
18575 else
18576 HAVE_GTK=yes
18577
18578$as_echo "#define USE_GTK 1" >>confdefs.h
18579
18580 GTK_OBJ="gtkutil.o $GTK_OBJ"
18581 USE_X_TOOLKIT=none
18582 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
18583 :
18584 else
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
18586 closing open displays. This is no problem if you just use
18587 one display, but if you use more than one and close one of them
18588 Emacs may crash." >&5
18589$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
18590 closing open displays. This is no problem if you just use
18591 one display, but if you use more than one and close one of them
18592 Emacs may crash." >&2;}
18593 sleep 3
18594 fi
18595 fi
18596
18597fi
18598
18599
18600
18601if test "${HAVE_GTK}" = "yes"; then
18602
18603 if test "$with_toolkit_scroll_bars" != no; then
18604 with_toolkit_scroll_bars=yes
18605 fi
18606
18607 HAVE_GTK_FILE_SELECTION=no
18608 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
18609#include <gtk/gtk.h>
18610"
18611if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
18612 HAVE_GTK_FILE_SELECTION=yes
18613else
18614 HAVE_GTK_FILE_SELECTION=no
18615fi
18616
18617 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
18618 for ac_func in gtk_file_selection_new
18619do :
18620 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
18621if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
18622 cat >>confdefs.h <<_ACEOF
18623#define HAVE_GTK_FILE_SELECTION_NEW 1
18624_ACEOF
18625
18626fi
18627done
18628
18629 fi
18630
18631
18632 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
18633 gtk_dialog_get_action_area gtk_widget_get_sensitive \
18634 gtk_widget_get_mapped gtk_adjustment_get_page_size \
18635 gtk_orientable_set_orientation \
18636 gtk_window_set_has_resize_grip
18637do :
18638 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18639ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18640eval as_val=\$$as_ac_var
18641 if test "x$as_val" = x""yes; then :
18642 cat >>confdefs.h <<_ACEOF
18643#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18644_ACEOF
18645
18646fi
18647done
18648
18649fi
18650
18651HAVE_DBUS=no
18652DBUS_OBJ=
18653if test "${with_dbus}" = "yes"; then
18654
18655 succeeded=no
18656
18657 if test "$PKG_CONFIG" = "no" ; then
18658 HAVE_DBUS=no
18659 else
18660 PKG_CONFIG_MIN_VERSION=0.9.0
18661 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
18663$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
18664
18665 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
18666 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
18667 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
18668 edit_cflags="
18669 s,///*,/,g
18670 s/^/ /
18671 s/ -I/ $isystem/g
18672 s/^ //
18673 "
18674 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
18675 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
18676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
18677$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
18678 succeeded=yes
18679 else
18680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18681$as_echo "no" >&6; }
18682 DBUS_CFLAGS=""
18683 DBUS_LIBS=""
18684 ## If we have a custom action on failure, don't print errors, but
18685 ## do set a variable so people can do so.
18686 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
18687
18688 fi
18689
18690
18691
18692 else
18693 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18694 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18695 fi
18696 fi
18697
18698 if test $succeeded = yes; then
18699 HAVE_DBUS=yes
18700 else
18701 HAVE_DBUS=no
18702 fi
18703
18704 if test "$HAVE_DBUS" = yes; then
18705 LIBS="$LIBS $DBUS_LIBS"
18706
18707$as_echo "#define HAVE_DBUS 1" >>confdefs.h
18708
18709 for ac_func in dbus_watch_get_unix_fd \
18710 dbus_type_is_valid \
18711 dbus_validate_bus_name \
18712 dbus_validate_path \
18713 dbus_validate_interface \
18714 dbus_validate_member
18715do :
18716 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18717ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18718eval as_val=\$$as_ac_var
18719 if test "x$as_val" = x""yes; then :
18720 cat >>confdefs.h <<_ACEOF
18721#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18722_ACEOF
18723
18724fi
18725done
18726
18727 DBUS_OBJ=dbusbind.o
18728 fi
18729fi
18730
18731
18732HAVE_GSETTINGS=no
18733if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
18734
18735 succeeded=no
18736
18737 if test "$PKG_CONFIG" = "no" ; then
18738 HAVE_GSETTINGS=no
18739 else
18740 PKG_CONFIG_MIN_VERSION=0.9.0
18741 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
18743$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
18744
18745 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
18746 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
18747 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
18748 edit_cflags="
18749 s,///*,/,g
18750 s/^/ /
18751 s/ -I/ $isystem/g
18752 s/^ //
18753 "
18754 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
18755 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
18757$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
18758 succeeded=yes
18759 else
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18761$as_echo "no" >&6; }
18762 GSETTINGS_CFLAGS=""
18763 GSETTINGS_LIBS=""
18764 ## If we have a custom action on failure, don't print errors, but
18765 ## do set a variable so people can do so.
18766 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
18767
18768 fi
18769
18770
18771
18772 else
18773 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18774 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18775 fi
18776 fi
18777
18778 if test $succeeded = yes; then
18779 HAVE_GSETTINGS=yes
18780 else
18781 HAVE_GSETTINGS=no
18782 fi
18783
18784 if test "$HAVE_GSETTINGS" = "yes"; then
18785
18786$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
18787
18788 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
18789 SETTINGS_LIBS="$GSETTINGS_LIBS"
18790 fi
18791fi
18792
18793HAVE_GCONF=no
18794if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
18795
18796 succeeded=no
18797
18798 if test "$PKG_CONFIG" = "no" ; then
18799 HAVE_GCONF=no
18800 else
18801 PKG_CONFIG_MIN_VERSION=0.9.0
18802 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
18804$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
18805
18806 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
18807 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
18808 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
18809 edit_cflags="
18810 s,///*,/,g
18811 s/^/ /
18812 s/ -I/ $isystem/g
18813 s/^ //
18814 "
18815 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
18816 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
18818$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
18819 succeeded=yes
18820 else
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18822$as_echo "no" >&6; }
18823 GCONF_CFLAGS=""
18824 GCONF_LIBS=""
18825 ## If we have a custom action on failure, don't print errors, but
18826 ## do set a variable so people can do so.
18827 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
18828
18829 fi
18830
18831
18832
18833 else
18834 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18835 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18836 fi
18837 fi
18838
18839 if test $succeeded = yes; then
18840 HAVE_GCONF=yes
18841 else
18842 HAVE_GCONF=no
18843 fi
18844
18845 if test "$HAVE_GCONF" = yes; then
18846
18847$as_echo "#define HAVE_GCONF 1" >>confdefs.h
18848
18849 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
18850 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
18851 fi
18852fi
18853
18854if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
18855 SAVE_CFLAGS="$CFLAGS"
18856 SAVE_LIBS="$LIBS"
18857 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
18858 LIBS="$SETTINGS_LIBS $LIBS"
18859 for ac_func in g_type_init
18860do :
18861 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
18862if test "x$ac_cv_func_g_type_init" = x""yes; then :
18863 cat >>confdefs.h <<_ACEOF
18864#define HAVE_G_TYPE_INIT 1
18865_ACEOF
18866
18867fi
18868done
18869
18870 CFLAGS="$SAVE_CFLAGS"
18871 LIBS="$SAVE_LIBS"
18872fi
18873
18874
18875
18876
18877HAVE_LIBSELINUX=no
18878LIBSELINUX_LIBS=
18879if test "${with_selinux}" = "yes"; then
18880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
18881$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
18882if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
18883 $as_echo_n "(cached) " >&6
18884else
18885 ac_check_lib_save_LIBS=$LIBS
18886LIBS="-lselinux $LIBS"
18887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18888/* end confdefs.h. */
18889
18890/* Override any GCC internal prototype to avoid an error.
18891 Use char because int might match the return type of a GCC
18892 builtin and then its argument prototype would still apply. */
18893#ifdef __cplusplus
18894extern "C"
18895#endif
18896char lgetfilecon ();
18897int
18898main ()
18899{
18900return lgetfilecon ();
18901 ;
18902 return 0;
18903}
18904_ACEOF
18905if ac_fn_c_try_link "$LINENO"; then :
18906 ac_cv_lib_selinux_lgetfilecon=yes
18907else
18908 ac_cv_lib_selinux_lgetfilecon=no
18909fi
18910rm -f core conftest.err conftest.$ac_objext \
18911 conftest$ac_exeext conftest.$ac_ext
18912LIBS=$ac_check_lib_save_LIBS
18913fi
18914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
18915$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
18916if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
18917 HAVE_LIBSELINUX=yes
18918else
18919 HAVE_LIBSELINUX=no
18920fi
18921
18922 if test "$HAVE_LIBSELINUX" = yes; then
18923
18924$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
18925
18926 LIBSELINUX_LIBS=-lselinux
18927 fi
18928fi
18929
18930
18931HAVE_GNUTLS=no
18932HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
18933if test "${with_gnutls}" = "yes" ; then
18934
18935 succeeded=no
18936
18937 if test "$PKG_CONFIG" = "no" ; then
18938 HAVE_GNUTLS=no
18939 else
18940 PKG_CONFIG_MIN_VERSION=0.9.0
18941 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
18942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
18943$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
18944
18945 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
18946 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
18947 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
18948 edit_cflags="
18949 s,///*,/,g
18950 s/^/ /
18951 s/ -I/ $isystem/g
18952 s/^ //
18953 "
18954 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
18955 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
18956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
18957$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
18958 succeeded=yes
18959 else
18960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18961$as_echo "no" >&6; }
18962 LIBGNUTLS_CFLAGS=""
18963 LIBGNUTLS_LIBS=""
18964 ## If we have a custom action on failure, don't print errors, but
18965 ## do set a variable so people can do so.
18966 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
18967
18968 fi
18969
18970
18971
18972 else
18973 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
18974 echo "*** See http://www.freedesktop.org/software/pkgconfig"
18975 fi
18976 fi
18977
18978 if test $succeeded = yes; then
18979 HAVE_GNUTLS=yes
18980 else
18981 HAVE_GNUTLS=no
18982 fi
18983
18984 if test "${HAVE_GNUTLS}" = "yes"; then
18985
18986$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
18987
18988 fi
18989
18990 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
18991 LIBS="$LIBGNUTLS_LIBS $LIBS"
18992 for ac_func in gnutls_certificate_set_verify_function
18993do :
18994 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
18995if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
18996 cat >>confdefs.h <<_ACEOF
18997#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
18998_ACEOF
18999 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
19000fi
19001done
19002
19003
19004 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
19005
19006$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
19007
19008 fi
19009fi
19010
19011
19012
19013
19014HAVE_XAW3D=no
19015LUCID_LIBW=
19016if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
19017 if test "$with_xaw3d" != no; then
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
19019$as_echo_n "checking for xaw3d... " >&6; }
19020 if test "${emacs_cv_xaw3d+set}" = set; then :
19021 $as_echo_n "(cached) " >&6
19022else
19023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19024/* end confdefs.h. */
19025
19026#include <X11/Intrinsic.h>
19027#include <X11/Xaw3d/Simple.h>
19028int
19029main ()
19030{
19031
19032 ;
19033 return 0;
19034}
19035_ACEOF
19036if ac_fn_c_try_link "$LINENO"; then :
19037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
19038$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
19039if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
19040 $as_echo_n "(cached) " >&6
19041else
19042 ac_check_lib_save_LIBS=$LIBS
19043LIBS="-lXaw3d $LIBS"
19044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19045/* end confdefs.h. */
19046
19047/* Override any GCC internal prototype to avoid an error.
19048 Use char because int might match the return type of a GCC
19049 builtin and then its argument prototype would still apply. */
19050#ifdef __cplusplus
19051extern "C"
19052#endif
19053char XawScrollbarSetThumb ();
19054int
19055main ()
19056{
19057return XawScrollbarSetThumb ();
19058 ;
19059 return 0;
19060}
19061_ACEOF
19062if ac_fn_c_try_link "$LINENO"; then :
19063 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
19064else
19065 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
19066fi
19067rm -f core conftest.err conftest.$ac_objext \
19068 conftest$ac_exeext conftest.$ac_ext
19069LIBS=$ac_check_lib_save_LIBS
19070fi
19071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
19072$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
19073if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
19074 emacs_cv_xaw3d=yes
19075else
19076 emacs_cv_xaw3d=no
19077fi
19078
19079else
19080 emacs_cv_xaw3d=no
19081fi
19082rm -f core conftest.err conftest.$ac_objext \
19083 conftest$ac_exeext conftest.$ac_ext
19084fi
19085
19086 else
19087 emacs_cv_xaw3d=no
19088 fi
19089 if test $emacs_cv_xaw3d = yes; then
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
19091$as_echo "yes; using Lucid toolkit" >&6; }
19092 USE_X_TOOLKIT=LUCID
19093 HAVE_XAW3D=yes
19094 LUCID_LIBW=-lXaw3d
19095
19096$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
19097
19098 else
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19100$as_echo "no" >&6; }
19101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
19102$as_echo_n "checking for libXaw... " >&6; }
19103 if test "${emacs_cv_xaw+set}" = set; then :
19104 $as_echo_n "(cached) " >&6
19105else
19106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19107/* end confdefs.h. */
19108
19109#include <X11/Intrinsic.h>
19110#include <X11/Xaw/Simple.h>
19111int
19112main ()
19113{
19114
19115 ;
19116 return 0;
19117}
19118_ACEOF
19119if ac_fn_c_try_link "$LINENO"; then :
19120 emacs_cv_xaw=yes
19121else
19122 emacs_cv_xaw=no
19123fi
19124rm -f core conftest.err conftest.$ac_objext \
19125 conftest$ac_exeext conftest.$ac_ext
19126fi
19127
19128 if test $emacs_cv_xaw = yes; then
19129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
19130$as_echo "yes; using Lucid toolkit" >&6; }
19131 USE_X_TOOLKIT=LUCID
19132 LUCID_LIBW=-lXaw
19133 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
19134 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
19135 else
19136 as_fn_error "No X toolkit could be found.
19137If you are sure you want Emacs compiled without an X toolkit, pass
19138 --with-x-toolkit=no
19139to configure. Otherwise, install the development libraries for the toolkit
19140that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
19141 fi
19142 fi
19143fi
19144
19145X_TOOLKIT_TYPE=$USE_X_TOOLKIT
19146
19147LIBXTR6=
19148if test "${USE_X_TOOLKIT}" != "none"; then
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
19150$as_echo_n "checking X11 toolkit version... " >&6; }
19151 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
19152 $as_echo_n "(cached) " >&6
19153else
19154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19155/* end confdefs.h. */
19156#include <X11/Intrinsic.h>
19157int
19158main ()
19159{
19160#if XtSpecificationRelease < 6
19161fail;
19162#endif
19163
19164 ;
19165 return 0;
19166}
19167_ACEOF
19168if ac_fn_c_try_link "$LINENO"; then :
19169 emacs_cv_x11_toolkit_version_6=yes
19170else
19171 emacs_cv_x11_toolkit_version_6=no
19172fi
19173rm -f core conftest.err conftest.$ac_objext \
19174 conftest$ac_exeext conftest.$ac_ext
19175fi
19176
19177 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
19178 if test $emacs_cv_x11_toolkit_version_6 = yes; then
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
19180$as_echo "6 or newer" >&6; }
19181
19182$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
19183
19184 LIBXTR6="-lSM -lICE"
19185 case "$opsys" in
19186 ## Use libw.a along with X11R6 Xt.
19187 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
19188 esac
19189 else
19190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
19191$as_echo "before 6" >&6; }
19192 fi
19193
19194 OLDLIBS="$LIBS"
19195 if test x$HAVE_X11XTR6 = xyes; then
19196 LIBS="-lXt -lSM -lICE $LIBS"
19197 else
19198 LIBS="-lXt $LIBS"
19199 fi
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
19201$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
19202if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
19203 $as_echo_n "(cached) " >&6
19204else
19205 ac_check_lib_save_LIBS=$LIBS
19206LIBS="-lXmu $LIBS"
19207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19208/* end confdefs.h. */
19209
19210/* Override any GCC internal prototype to avoid an error.
19211 Use char because int might match the return type of a GCC
19212 builtin and then its argument prototype would still apply. */
19213#ifdef __cplusplus
19214extern "C"
19215#endif
19216char XmuConvertStandardSelection ();
19217int
19218main ()
19219{
19220return XmuConvertStandardSelection ();
19221 ;
19222 return 0;
19223}
19224_ACEOF
19225if ac_fn_c_try_link "$LINENO"; then :
19226 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
19227else
19228 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
19229fi
19230rm -f core conftest.err conftest.$ac_objext \
19231 conftest$ac_exeext conftest.$ac_ext
19232LIBS=$ac_check_lib_save_LIBS
19233fi
19234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
19235$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
19236if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
19237 cat >>confdefs.h <<_ACEOF
19238#define HAVE_LIBXMU 1
19239_ACEOF
19240
19241 LIBS="-lXmu $LIBS"
19242
19243fi
19244
19245 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
19246 fi
19247
19248
19249LIBXMU=-lXmu
19250case $opsys in
19251 ## These systems don't supply Xmu.
19252 hpux* | aix4-2 )
19253 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
19254 ;;
19255esac
19256
19257
19258# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
19259if test "${HAVE_X11}" = "yes"; then
19260 if test "${USE_X_TOOLKIT}" != "none"; then
19261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
19262$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
19263if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
19264 $as_echo_n "(cached) " >&6
19265else
19266 ac_check_lib_save_LIBS=$LIBS
19267LIBS="-lXext $LIBS"
19268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19269/* end confdefs.h. */
19270
19271/* Override any GCC internal prototype to avoid an error.
19272 Use char because int might match the return type of a GCC
19273 builtin and then its argument prototype would still apply. */
19274#ifdef __cplusplus
19275extern "C"
19276#endif
19277char XShapeQueryExtension ();
19278int
19279main ()
19280{
19281return XShapeQueryExtension ();
19282 ;
19283 return 0;
19284}
19285_ACEOF
19286if ac_fn_c_try_link "$LINENO"; then :
19287 ac_cv_lib_Xext_XShapeQueryExtension=yes
19288else
19289 ac_cv_lib_Xext_XShapeQueryExtension=no
19290fi
19291rm -f core conftest.err conftest.$ac_objext \
19292 conftest$ac_exeext conftest.$ac_ext
19293LIBS=$ac_check_lib_save_LIBS
19294fi
19295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
19296$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
19297if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
19298 cat >>confdefs.h <<_ACEOF
19299#define HAVE_LIBXEXT 1
19300_ACEOF
19301
19302 LIBS="-lXext $LIBS"
19303
19304fi
19305
19306 fi
19307fi
19308
19309LIBXP=
19310if test "${USE_X_TOOLKIT}" = "MOTIF"; then
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
19312$as_echo_n "checking for Motif version 2.1... " >&6; }
19313if test "${emacs_cv_motif_version_2_1+set}" = set; then :
19314 $as_echo_n "(cached) " >&6
19315else
19316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19317/* end confdefs.h. */
19318#include <Xm/Xm.h>
19319int
19320main ()
19321{
19322#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
19323int x = 5;
19324#else
19325Motif version prior to 2.1.
19326#endif
19327 ;
19328 return 0;
19329}
19330_ACEOF
19331if ac_fn_c_try_compile "$LINENO"; then :
19332 emacs_cv_motif_version_2_1=yes
19333else
19334 emacs_cv_motif_version_2_1=no
19335fi
19336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19337fi
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
19339$as_echo "$emacs_cv_motif_version_2_1" >&6; }
19340 if test $emacs_cv_motif_version_2_1 = yes; then
19341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
19342$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
19343if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
19344 $as_echo_n "(cached) " >&6
19345else
19346 ac_check_lib_save_LIBS=$LIBS
19347LIBS="-lXp $LIBS"
19348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19349/* end confdefs.h. */
19350
19351/* Override any GCC internal prototype to avoid an error.
19352 Use char because int might match the return type of a GCC
19353 builtin and then its argument prototype would still apply. */
19354#ifdef __cplusplus
19355extern "C"
19356#endif
19357char XpCreateContext ();
19358int
19359main ()
19360{
19361return XpCreateContext ();
19362 ;
19363 return 0;
19364}
19365_ACEOF
19366if ac_fn_c_try_link "$LINENO"; then :
19367 ac_cv_lib_Xp_XpCreateContext=yes
19368else
19369 ac_cv_lib_Xp_XpCreateContext=no
19370fi
19371rm -f core conftest.err conftest.$ac_objext \
19372 conftest$ac_exeext conftest.$ac_ext
19373LIBS=$ac_check_lib_save_LIBS
19374fi
19375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
19376$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
19377if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
19378 LIBXP=-lXp
19379fi
19380
19381 else
19382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
19383$as_echo_n "checking for LessTif where some systems put it... " >&6; }
19384if test "${emacs_cv_lesstif+set}" = set; then :
19385 $as_echo_n "(cached) " >&6
19386else
19387 # We put this in CFLAGS temporarily to precede other -I options
19388 # that might be in CFLAGS temporarily.
19389 # We put this in CPPFLAGS where it precedes the other -I options.
19390 OLD_CPPFLAGS=$CPPFLAGS
19391 OLD_CFLAGS=$CFLAGS
19392 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
19393 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
19394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395/* end confdefs.h. */
19396#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
19397int
19398main ()
19399{
19400int x = 5;
19401 ;
19402 return 0;
19403}
19404_ACEOF
19405if ac_fn_c_try_compile "$LINENO"; then :
19406 emacs_cv_lesstif=yes
19407else
19408 emacs_cv_lesstif=no
19409fi
19410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19411fi
19412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
19413$as_echo "$emacs_cv_lesstif" >&6; }
19414 if test $emacs_cv_lesstif = yes; then
19415 # Make sure this -I option remains in CPPFLAGS after it is set
19416 # back to REAL_CPPFLAGS.
19417 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
19418 # have those other -I options anyway. Ultimately, having this
19419 # directory ultimately in CPPFLAGS will be enough.
19420 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
19421 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
19422 else
19423 CFLAGS=$OLD_CFLAGS
19424 CPPFLAGS=$OLD_CPPFLAGS
19425 fi
19426 fi
19427 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
19428if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
19429
19430else
19431 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
19432fi
19433
19434
19435fi
19436
19437
19438USE_TOOLKIT_SCROLL_BARS=no
19439if test "${with_toolkit_scroll_bars}" != "no"; then
19440 if test "${USE_X_TOOLKIT}" != "none"; then
19441 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
19442 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
19443
19444 HAVE_XAW3D=no
19445 USE_TOOLKIT_SCROLL_BARS=yes
19446 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
19447 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
19448
19449 USE_TOOLKIT_SCROLL_BARS=yes
19450 fi
19451 elif test "${HAVE_GTK}" = "yes"; then
19452 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
19453
19454 USE_TOOLKIT_SCROLL_BARS=yes
19455 elif test "${HAVE_NS}" = "yes"; then
19456 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
19457
19458 USE_TOOLKIT_SCROLL_BARS=yes
19459 fi
19460fi
19461
19462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19463/* end confdefs.h. */
19464
19465 #include <X11/Xlib.h>
19466 #include <X11/Xresource.h>
19467int
19468main ()
19469{
19470XIMProc callback;
19471 ;
19472 return 0;
19473}
19474_ACEOF
19475if ac_fn_c_try_compile "$LINENO"; then :
19476 HAVE_XIM=yes
19477
19478$as_echo "#define HAVE_XIM 1" >>confdefs.h
19479
19480else
19481 HAVE_XIM=no
19482fi
19483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19484
19485
19486if test "${with_xim}" != "no"; then
19487
19488$as_echo "#define USE_XIM 1" >>confdefs.h
19489
19490fi
19491
19492
19493if test "${HAVE_XIM}" != "no"; then
19494 late_CFLAGS=$CFLAGS
19495 if test "$GCC" = yes; then
19496 CFLAGS="$CFLAGS --pedantic-errors"
19497 fi
19498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19499/* end confdefs.h. */
19500
19501#include <X11/Xlib.h>
19502#include <X11/Xresource.h>
19503int
19504main ()
19505{
19506Display *display;
19507XrmDatabase db;
19508char *res_name;
19509char *res_class;
19510XIMProc callback;
19511XPointer *client_data;
19512#ifndef __GNUC__
19513/* If we're not using GCC, it's probably not XFree86, and this is
19514 probably right, but we can't use something like --pedantic-errors. */
19515extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
19516 char*, XIMProc, XPointer*);
19517#endif
19518(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
19519 client_data);
19520 ;
19521 return 0;
19522}
19523_ACEOF
19524if ac_fn_c_try_compile "$LINENO"; then :
19525 emacs_cv_arg6_star=yes
19526fi
19527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19528 if test "$emacs_cv_arg6_star" = yes; then
19529 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
19530
19531 else
19532 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
19533
19534 fi
19535 CFLAGS=$late_CFLAGS
19536fi
19537
19538### Start of font-backend (under any platform) section.
19539# (nothing here yet -- this is a placeholder)
19540### End of font-backend (under any platform) section.
19541
19542### Start of font-backend (under X11) section.
19543if test "${HAVE_X11}" = "yes"; then
19544
19545 succeeded=no
19546
19547 if test "$PKG_CONFIG" = "no" ; then
19548 HAVE_FC=no
19549 else
19550 PKG_CONFIG_MIN_VERSION=0.9.0
19551 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
19552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
19553$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
19554
19555 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
19556 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
19557 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
19558 edit_cflags="
19559 s,///*,/,g
19560 s/^/ /
19561 s/ -I/ $isystem/g
19562 s/^ //
19563 "
19564 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
19565 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
19566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
19567$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
19568 succeeded=yes
19569 else
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19571$as_echo "no" >&6; }
19572 FONTCONFIG_CFLAGS=""
19573 FONTCONFIG_LIBS=""
19574 ## If we have a custom action on failure, don't print errors, but
19575 ## do set a variable so people can do so.
19576 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
19577
19578 fi
19579
19580
19581
19582 else
19583 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
19584 echo "*** See http://www.freedesktop.org/software/pkgconfig"
19585 fi
19586 fi
19587
19588 if test $succeeded = yes; then
19589 HAVE_FC=yes
19590 else
19591 HAVE_FC=no
19592 fi
19593
19594
19595 ## Use -lXft if available, unless `--with-xft=no'.
19596 HAVE_XFT=maybe
19597 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
19598 with_xft="no";
19599 fi
19600 if test "x${with_xft}" != "xno"; then
19601
19602
19603 succeeded=no
19604
19605 if test "$PKG_CONFIG" = "no" ; then
19606 HAVE_XFT=no
19607 else
19608 PKG_CONFIG_MIN_VERSION=0.9.0
19609 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
19610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
19611$as_echo_n "checking for xft >= 0.13.0... " >&6; }
19612
19613 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
19614 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
19615 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
19616 edit_cflags="
19617 s,///*,/,g
19618 s/^/ /
19619 s/ -I/ $isystem/g
19620 s/^ //
19621 "
19622 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
19623 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
19624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
19625$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
19626 succeeded=yes
19627 else
19628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19629$as_echo "no" >&6; }
19630 XFT_CFLAGS=""
19631 XFT_LIBS=""
19632 ## If we have a custom action on failure, don't print errors, but
19633 ## do set a variable so people can do so.
19634 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
19635
19636 fi
19637
19638
19639
19640 else
19641 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
19642 echo "*** See http://www.freedesktop.org/software/pkgconfig"
19643 fi
19644 fi
19645
19646 if test $succeeded = yes; then
19647 :
19648 else
19649 HAVE_XFT=no
19650 fi
19651
19652 ## Because xftfont.c uses XRenderQueryExtension, we also
19653 ## need to link to -lXrender.
19654 HAVE_XRENDER=no
19655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
19656$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
19657if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
19658 $as_echo_n "(cached) " >&6
19659else
19660 ac_check_lib_save_LIBS=$LIBS
19661LIBS="-lXrender $LIBS"
19662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19663/* end confdefs.h. */
19664
19665/* Override any GCC internal prototype to avoid an error.
19666 Use char because int might match the return type of a GCC
19667 builtin and then its argument prototype would still apply. */
19668#ifdef __cplusplus
19669extern "C"
19670#endif
19671char XRenderQueryExtension ();
19672int
19673main ()
19674{
19675return XRenderQueryExtension ();
19676 ;
19677 return 0;
19678}
19679_ACEOF
19680if ac_fn_c_try_link "$LINENO"; then :
19681 ac_cv_lib_Xrender_XRenderQueryExtension=yes
19682else
19683 ac_cv_lib_Xrender_XRenderQueryExtension=no
19684fi
19685rm -f core conftest.err conftest.$ac_objext \
19686 conftest$ac_exeext conftest.$ac_ext
19687LIBS=$ac_check_lib_save_LIBS
19688fi
19689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
19690$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
19691if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
19692 HAVE_XRENDER=yes
19693fi
19694
19695 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
19696 OLD_CPPFLAGS="$CPPFLAGS"
19697 OLD_CFLAGS="$CFLAGS"
19698 OLD_LIBS="$LIBS"
19699 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
19700 CFLAGS="$CFLAGS $XFT_CFLAGS"
19701 XFT_LIBS="-lXrender $XFT_LIBS"
19702 LIBS="$XFT_LIBS $LIBS"
19703 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
19704if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
19705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
19706$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
19707if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
19708 $as_echo_n "(cached) " >&6
19709else
19710 ac_check_lib_save_LIBS=$LIBS
19711LIBS="-lXft $XFT_LIBS $LIBS"
19712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19713/* end confdefs.h. */
19714
19715/* Override any GCC internal prototype to avoid an error.
19716 Use char because int might match the return type of a GCC
19717 builtin and then its argument prototype would still apply. */
19718#ifdef __cplusplus
19719extern "C"
19720#endif
19721char XftFontOpen ();
19722int
19723main ()
19724{
19725return XftFontOpen ();
19726 ;
19727 return 0;
19728}
19729_ACEOF
19730if ac_fn_c_try_link "$LINENO"; then :
19731 ac_cv_lib_Xft_XftFontOpen=yes
19732else
19733 ac_cv_lib_Xft_XftFontOpen=no
19734fi
19735rm -f core conftest.err conftest.$ac_objext \
19736 conftest$ac_exeext conftest.$ac_ext
19737LIBS=$ac_check_lib_save_LIBS
19738fi
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
19740$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
19741if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
19742 HAVE_XFT=yes
19743fi
19744
19745fi
19746
19747
19748
19749 if test "${HAVE_XFT}" = "yes"; then
19750
19751$as_echo "#define HAVE_XFT 1" >>confdefs.h
19752
19753
19754 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
19755 else
19756 CPPFLAGS="$OLD_CPPFLAGS"
19757 CFLAGS="$OLD_CFLAGS"
19758 LIBS="$OLD_LIBS"
19759 fi # "${HAVE_XFT}" = "yes"
19760 fi # "$HAVE_XFT" != no
19761 fi # "x${with_xft}" != "xno"
19762
19763 ## We used to allow building with FreeType and without Xft.
19764 ## However, the ftx font backend driver is not in good shape.
19765 if test "$HAVE_XFT" != "yes"; then
19766 HAVE_XFT=no
19767 HAVE_FREETYPE=no
19768 else
19769
19770 succeeded=no
19771
19772 if test "$PKG_CONFIG" = "no" ; then
19773 HAVE_FREETYPE=no
19774 else
19775 PKG_CONFIG_MIN_VERSION=0.9.0
19776 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
19777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
19778$as_echo_n "checking for freetype2... " >&6; }
19779
19780 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
19781 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
19782 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
19783 edit_cflags="
19784 s,///*,/,g
19785 s/^/ /
19786 s/ -I/ $isystem/g
19787 s/^ //
19788 "
19789 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
19790 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
19791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
19792$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
19793 succeeded=yes
19794 else
19795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19796$as_echo "no" >&6; }
19797 FREETYPE_CFLAGS=""
19798 FREETYPE_LIBS=""
19799 ## If we have a custom action on failure, don't print errors, but
19800 ## do set a variable so people can do so.
19801 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
19802
19803 fi
19804
19805
19806
19807 else
19808 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
19809 echo "*** See http://www.freedesktop.org/software/pkgconfig"
19810 fi
19811 fi
19812
19813 if test $succeeded = yes; then
19814 HAVE_FREETYPE=yes
19815 else
19816 HAVE_FREETYPE=no
19817 fi
19818
19819
19820 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
19821 fi
19822
19823 HAVE_LIBOTF=no
19824 if test "${HAVE_FREETYPE}" = "yes"; then
19825
19826$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
19827
19828 if test "${with_libotf}" != "no"; then
19829
19830 succeeded=no
19831
19832 if test "$PKG_CONFIG" = "no" ; then
19833 HAVE_LIBOTF=no
19834 else
19835 PKG_CONFIG_MIN_VERSION=0.9.0
19836 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
19837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
19838$as_echo_n "checking for libotf... " >&6; }
19839
19840 if $PKG_CONFIG --exists "libotf" 2>&5 &&
19841 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
19842 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
19843 edit_cflags="
19844 s,///*,/,g
19845 s/^/ /
19846 s/ -I/ $isystem/g
19847 s/^ //
19848 "
19849 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
19850 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
19852$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
19853 succeeded=yes
19854 else
19855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19856$as_echo "no" >&6; }
19857 LIBOTF_CFLAGS=""
19858 LIBOTF_LIBS=""
19859 ## If we have a custom action on failure, don't print errors, but
19860 ## do set a variable so people can do so.
19861 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
19862
19863 fi
19864
19865
19866
19867 else
19868 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
19869 echo "*** See http://www.freedesktop.org/software/pkgconfig"
19870 fi
19871 fi
19872
19873 if test $succeeded = yes; then
19874 HAVE_LIBOTF=yes
19875 else
19876 HAVE_LIBOTF=no
19877 fi
19878
19879 if test "$HAVE_LIBOTF" = "yes"; then
19880
19881$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
19882
19883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
19884$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
19885if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
19886 $as_echo_n "(cached) " >&6
19887else
19888 ac_check_lib_save_LIBS=$LIBS
19889LIBS="-lotf $LIBS"
19890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19891/* end confdefs.h. */
19892
19893/* Override any GCC internal prototype to avoid an error.
19894 Use char because int might match the return type of a GCC
19895 builtin and then its argument prototype would still apply. */
19896#ifdef __cplusplus
19897extern "C"
19898#endif
19899char OTF_get_variation_glyphs ();
19900int
19901main ()
19902{
19903return OTF_get_variation_glyphs ();
19904 ;
19905 return 0;
19906}
19907_ACEOF
19908if ac_fn_c_try_link "$LINENO"; then :
19909 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
19910else
19911 ac_cv_lib_otf_OTF_get_variation_glyphs=no
19912fi
19913rm -f core conftest.err conftest.$ac_objext \
19914 conftest$ac_exeext conftest.$ac_ext
19915LIBS=$ac_check_lib_save_LIBS
19916fi
19917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
19918$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
19919if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
19920 HAVE_OTF_GET_VARIATION_GLYPHS=yes
19921else
19922 HAVE_OTF_GET_VARIATION_GLYPHS=no
19923fi
19924
19925 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
19926
19927$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
19928
19929 fi
19930 fi
19931 fi
19932 fi
19933
19934 HAVE_M17N_FLT=no
19935 if test "${HAVE_LIBOTF}" = yes; then
19936 if test "${with_m17n_flt}" != "no"; then
19937
19938 succeeded=no
19939
19940 if test "$PKG_CONFIG" = "no" ; then
19941 HAVE_M17N_FLT=no
19942 else
19943 PKG_CONFIG_MIN_VERSION=0.9.0
19944 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
19945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
19946$as_echo_n "checking for m17n-flt... " >&6; }
19947
19948 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
19949 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
19950 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
19951 edit_cflags="
19952 s,///*,/,g
19953 s/^/ /
19954 s/ -I/ $isystem/g
19955 s/^ //
19956 "
19957 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
19958 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
19959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
19960$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
19961 succeeded=yes
19962 else
19963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19964$as_echo "no" >&6; }
19965 M17N_FLT_CFLAGS=""
19966 M17N_FLT_LIBS=""
19967 ## If we have a custom action on failure, don't print errors, but
19968 ## do set a variable so people can do so.
19969 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
19970
19971 fi
19972
19973
19974
19975 else
19976 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
19977 echo "*** See http://www.freedesktop.org/software/pkgconfig"
19978 fi
19979 fi
19980
19981 if test $succeeded = yes; then
19982 HAVE_M17N_FLT=yes
19983 else
19984 HAVE_M17N_FLT=no
19985 fi
19986
19987 if test "$HAVE_M17N_FLT" = "yes"; then
19988
19989$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
19990
19991 fi
19992 fi
19993 fi
19994else
19995 HAVE_XFT=no
19996 HAVE_FREETYPE=no
19997 HAVE_LIBOTF=no
19998 HAVE_M17N_FLT=no
19999fi
20000
20001### End of font-backend (under X11) section.
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012### Use -lXpm if available, unless `--with-xpm=no'.
20013HAVE_XPM=no
20014LIBXPM=
20015if test "${HAVE_X11}" = "yes"; then
20016 if test "${with_xpm}" != "no"; then
20017 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
20018if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
20019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
20020$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
20021if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
20022 $as_echo_n "(cached) " >&6
20023else
20024 ac_check_lib_save_LIBS=$LIBS
20025LIBS="-lXpm -lX11 $LIBS"
20026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20027/* end confdefs.h. */
20028
20029/* Override any GCC internal prototype to avoid an error.
20030 Use char because int might match the return type of a GCC
20031 builtin and then its argument prototype would still apply. */
20032#ifdef __cplusplus
20033extern "C"
20034#endif
20035char XpmReadFileToPixmap ();
20036int
20037main ()
20038{
20039return XpmReadFileToPixmap ();
20040 ;
20041 return 0;
20042}
20043_ACEOF
20044if ac_fn_c_try_link "$LINENO"; then :
20045 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
20046else
20047 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
20048fi
20049rm -f core conftest.err conftest.$ac_objext \
20050 conftest$ac_exeext conftest.$ac_ext
20051LIBS=$ac_check_lib_save_LIBS
20052fi
20053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
20054$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
20055if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
20056 HAVE_XPM=yes
20057fi
20058
20059fi
20060
20061
20062 if test "${HAVE_XPM}" = "yes"; then
20063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
20064$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
20065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20066/* end confdefs.h. */
20067#include "X11/xpm.h"
20068#ifndef XpmReturnAllocPixels
20069no_return_alloc_pixels
20070#endif
20071
20072_ACEOF
20073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20074 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
20075 HAVE_XPM=no
20076else
20077 HAVE_XPM=yes
20078fi
20079rm -f conftest*
20080
20081
20082 if test "${HAVE_XPM}" = "yes"; then
20083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20084$as_echo "yes" >&6; }
20085 else
20086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20087$as_echo "no" >&6; }
20088 fi
20089 fi
20090 fi
20091
20092 if test "${HAVE_XPM}" = "yes"; then
20093
20094$as_echo "#define HAVE_XPM 1" >>confdefs.h
20095
20096 LIBXPM=-lXpm
20097 fi
20098fi
20099
20100
20101### Use -ljpeg if available, unless `--with-jpeg=no'.
20102HAVE_JPEG=no
20103LIBJPEG=
20104if test "${HAVE_X11}" = "yes"; then
20105 if test "${with_jpeg}" != "no"; then
20106 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
20107if test "x$ac_cv_header_jerror_h" = x""yes; then :
20108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
20109$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
20110if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
20111 $as_echo_n "(cached) " >&6
20112else
20113 ac_check_lib_save_LIBS=$LIBS
20114LIBS="-ljpeg $LIBS"
20115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20116/* end confdefs.h. */
20117
20118/* Override any GCC internal prototype to avoid an error.
20119 Use char because int might match the return type of a GCC
20120 builtin and then its argument prototype would still apply. */
20121#ifdef __cplusplus
20122extern "C"
20123#endif
20124char jpeg_destroy_compress ();
20125int
20126main ()
20127{
20128return jpeg_destroy_compress ();
20129 ;
20130 return 0;
20131}
20132_ACEOF
20133if ac_fn_c_try_link "$LINENO"; then :
20134 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
20135else
20136 ac_cv_lib_jpeg_jpeg_destroy_compress=no
20137fi
20138rm -f core conftest.err conftest.$ac_objext \
20139 conftest$ac_exeext conftest.$ac_ext
20140LIBS=$ac_check_lib_save_LIBS
20141fi
20142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
20143$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
20144if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
20145 HAVE_JPEG=yes
20146fi
20147
20148fi
20149
20150
20151 fi
20152
20153 if test "${HAVE_JPEG}" = "yes"; then
20154 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
20155
20156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20157/* end confdefs.h. */
20158#include <jpeglib.h>
20159 version=JPEG_LIB_VERSION
20160
20161_ACEOF
20162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20163 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
20164 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
20165
20166else
20167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
20168$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
20169 HAVE_JPEG=no
20170fi
20171rm -f conftest*
20172
20173 fi
20174 if test "${HAVE_JPEG}" = "yes"; then
20175 LIBJPEG=-ljpeg
20176 fi
20177fi
20178
20179
20180### Use -lpng if available, unless `--with-png=no'.
20181HAVE_PNG=no
20182LIBPNG=
20183if test "${HAVE_X11}" = "yes"; then
20184 if test "${with_png}" != "no"; then
20185 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
20186 # in /usr/include/libpng.
20187 for ac_header in png.h libpng/png.h
20188do :
20189 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20190ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20191eval as_val=\$$as_ac_Header
20192 if test "x$as_val" = x""yes; then :
20193 cat >>confdefs.h <<_ACEOF
20194#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20195_ACEOF
20196 break
20197fi
20198
20199done
20200
20201 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
20202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
20203$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
20204if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
20205 $as_echo_n "(cached) " >&6
20206else
20207 ac_check_lib_save_LIBS=$LIBS
20208LIBS="-lpng -lz -lm $LIBS"
20209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20210/* end confdefs.h. */
20211
20212/* Override any GCC internal prototype to avoid an error.
20213 Use char because int might match the return type of a GCC
20214 builtin and then its argument prototype would still apply. */
20215#ifdef __cplusplus
20216extern "C"
20217#endif
20218char png_get_channels ();
20219int
20220main ()
20221{
20222return png_get_channels ();
20223 ;
20224 return 0;
20225}
20226_ACEOF
20227if ac_fn_c_try_link "$LINENO"; then :
20228 ac_cv_lib_png_png_get_channels=yes
20229else
20230 ac_cv_lib_png_png_get_channels=no
20231fi
20232rm -f core conftest.err conftest.$ac_objext \
20233 conftest$ac_exeext conftest.$ac_ext
20234LIBS=$ac_check_lib_save_LIBS
20235fi
20236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
20237$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
20238if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
20239 HAVE_PNG=yes
20240fi
20241
20242 fi
20243 fi
20244
20245 if test "${HAVE_PNG}" = "yes"; then
20246
20247$as_echo "#define HAVE_PNG 1" >>confdefs.h
20248
20249 LIBPNG="-lpng -lz -lm"
20250
20251 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
20252 # include <libpng/png.h>
20253 #else
20254 # include <png.h>
20255 #endif
20256
20257"
20258if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
20259
20260else
20261
20262$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
20263
20264fi
20265
20266 fi
20267fi
20268
20269
20270### Use -ltiff if available, unless `--with-tiff=no'.
20271HAVE_TIFF=no
20272LIBTIFF=
20273if test "${HAVE_X11}" = "yes"; then
20274 if test "${with_tiff}" != "no"; then
20275 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
20276if test "x$ac_cv_header_tiffio_h" = x""yes; then :
20277 tifflibs="-lz -lm"
20278 # At least one tiff package requires the jpeg library.
20279 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
20280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
20281$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
20282if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
20283 $as_echo_n "(cached) " >&6
20284else
20285 ac_check_lib_save_LIBS=$LIBS
20286LIBS="-ltiff $tifflibs $LIBS"
20287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20288/* end confdefs.h. */
20289
20290/* Override any GCC internal prototype to avoid an error.
20291 Use char because int might match the return type of a GCC
20292 builtin and then its argument prototype would still apply. */
20293#ifdef __cplusplus
20294extern "C"
20295#endif
20296char TIFFGetVersion ();
20297int
20298main ()
20299{
20300return TIFFGetVersion ();
20301 ;
20302 return 0;
20303}
20304_ACEOF
20305if ac_fn_c_try_link "$LINENO"; then :
20306 ac_cv_lib_tiff_TIFFGetVersion=yes
20307else
20308 ac_cv_lib_tiff_TIFFGetVersion=no
20309fi
20310rm -f core conftest.err conftest.$ac_objext \
20311 conftest$ac_exeext conftest.$ac_ext
20312LIBS=$ac_check_lib_save_LIBS
20313fi
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
20315$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
20316if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
20317 HAVE_TIFF=yes
20318fi
20319
20320fi
20321
20322
20323 fi
20324
20325 if test "${HAVE_TIFF}" = "yes"; then
20326
20327$as_echo "#define HAVE_TIFF 1" >>confdefs.h
20328
20329 LIBTIFF=-ltiff
20330 fi
20331fi
20332
20333
20334### Use -lgif or -lungif if available, unless `--with-gif=no'.
20335HAVE_GIF=no
20336LIBGIF=
20337if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
20338 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
20339if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
20340 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
20341# Earlier versions can crash Emacs.
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
20343$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
20344if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
20345 $as_echo_n "(cached) " >&6
20346else
20347 ac_check_lib_save_LIBS=$LIBS
20348LIBS="-lgif $LIBS"
20349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20350/* end confdefs.h. */
20351
20352/* Override any GCC internal prototype to avoid an error.
20353 Use char because int might match the return type of a GCC
20354 builtin and then its argument prototype would still apply. */
20355#ifdef __cplusplus
20356extern "C"
20357#endif
20358char EGifPutExtensionLast ();
20359int
20360main ()
20361{
20362return EGifPutExtensionLast ();
20363 ;
20364 return 0;
20365}
20366_ACEOF
20367if ac_fn_c_try_link "$LINENO"; then :
20368 ac_cv_lib_gif_EGifPutExtensionLast=yes
20369else
20370 ac_cv_lib_gif_EGifPutExtensionLast=no
20371fi
20372rm -f core conftest.err conftest.$ac_objext \
20373 conftest$ac_exeext conftest.$ac_ext
20374LIBS=$ac_check_lib_save_LIBS
20375fi
20376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
20377$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
20378if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
20379 HAVE_GIF=yes
20380else
20381 HAVE_GIF=maybe
20382fi
20383
20384fi
20385
20386
20387
20388 if test "$HAVE_GIF" = yes; then
20389 LIBGIF=-lgif
20390 elif test "$HAVE_GIF" = maybe; then
20391# If gif_lib.h but no libgif, try libungif.
20392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
20393$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
20394if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
20395 $as_echo_n "(cached) " >&6
20396else
20397 ac_check_lib_save_LIBS=$LIBS
20398LIBS="-lungif $LIBS"
20399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20400/* end confdefs.h. */
20401
20402/* Override any GCC internal prototype to avoid an error.
20403 Use char because int might match the return type of a GCC
20404 builtin and then its argument prototype would still apply. */
20405#ifdef __cplusplus
20406extern "C"
20407#endif
20408char EGifPutExtensionLast ();
20409int
20410main ()
20411{
20412return EGifPutExtensionLast ();
20413 ;
20414 return 0;
20415}
20416_ACEOF
20417if ac_fn_c_try_link "$LINENO"; then :
20418 ac_cv_lib_ungif_EGifPutExtensionLast=yes
20419else
20420 ac_cv_lib_ungif_EGifPutExtensionLast=no
20421fi
20422rm -f core conftest.err conftest.$ac_objext \
20423 conftest$ac_exeext conftest.$ac_ext
20424LIBS=$ac_check_lib_save_LIBS
20425fi
20426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
20427$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
20428if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
20429 HAVE_GIF=yes
20430else
20431 HAVE_GIF=no
20432fi
20433
20434 test "$HAVE_GIF" = yes && LIBGIF=-lungif
20435 fi
20436
20437 if test "${HAVE_GIF}" = "yes"; then
20438
20439$as_echo "#define HAVE_GIF 1" >>confdefs.h
20440
20441 fi
20442fi
20443
20444
20445if test "${HAVE_X11}" = "yes"; then
20446 MISSING=""
20447 WITH_NO=""
20448 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
20449 MISSING="libXpm" && WITH_NO="--with-xpm=no"
20450 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
20451 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
20452 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
20453 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
20454 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
20455 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
20456 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
20457 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
20458
20459 if test "X${MISSING}" != X; then
20460 as_fn_error "The following required libraries were not found:
20461 $MISSING
20462Maybe some development libraries/packages are missing?
20463If you don't want to link with them give
20464 $WITH_NO
20465as options to configure" "$LINENO" 5
20466 fi
20467fi
20468
20469### Use -lgpm if available, unless `--with-gpm=no'.
20470HAVE_GPM=no
20471LIBGPM=
20472if test "${with_gpm}" != "no"; then
20473 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
20474if test "x$ac_cv_header_gpm_h" = x""yes; then :
20475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
20476$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
20477if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
20478 $as_echo_n "(cached) " >&6
20479else
20480 ac_check_lib_save_LIBS=$LIBS
20481LIBS="-lgpm $LIBS"
20482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20483/* end confdefs.h. */
20484
20485/* Override any GCC internal prototype to avoid an error.
20486 Use char because int might match the return type of a GCC
20487 builtin and then its argument prototype would still apply. */
20488#ifdef __cplusplus
20489extern "C"
20490#endif
20491char Gpm_Open ();
20492int
20493main ()
20494{
20495return Gpm_Open ();
20496 ;
20497 return 0;
20498}
20499_ACEOF
20500if ac_fn_c_try_link "$LINENO"; then :
20501 ac_cv_lib_gpm_Gpm_Open=yes
20502else
20503 ac_cv_lib_gpm_Gpm_Open=no
20504fi
20505rm -f core conftest.err conftest.$ac_objext \
20506 conftest$ac_exeext conftest.$ac_ext
20507LIBS=$ac_check_lib_save_LIBS
20508fi
20509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
20510$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
20511if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
20512 HAVE_GPM=yes
20513fi
20514
20515fi
20516
20517
20518
20519 if test "${HAVE_GPM}" = "yes"; then
20520
20521$as_echo "#define HAVE_GPM 1" >>confdefs.h
20522
20523 LIBGPM=-lgpm
20524 fi
20525fi
20526
20527
20528
20529
20530
20531
20532GNUSTEP_CFLAGS=
20533### Use NeXTstep API to implement GUI.
20534if test "${HAVE_NS}" = "yes"; then
20535
20536$as_echo "#define HAVE_NS 1" >>confdefs.h
20537
20538 if test "${NS_IMPL_COCOA}" = "yes"; then
20539
20540$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
20541
20542 fi
20543 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
20544
20545$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
20546
20547 # See also .m.o rule in Makefile.in */
20548 # FIXME: are all these flags really needed? Document here why. */
20549 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
20550 ## Extra CFLAGS applied to src/*.m files.
20551 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
20552 fi
20553 # We also have mouse menus.
20554 HAVE_MENUS=yes
20555 OTHER_FILES=ns-app
20556fi
20557
20558
20559### Use session management (-lSM -lICE) if available
20560HAVE_X_SM=no
20561LIBXSM=
20562if test "${HAVE_X11}" = "yes"; then
20563 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
20564if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
20565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
20566$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
20567if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
20568 $as_echo_n "(cached) " >&6
20569else
20570 ac_check_lib_save_LIBS=$LIBS
20571LIBS="-lSM -lICE $LIBS"
20572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20573/* end confdefs.h. */
20574
20575/* Override any GCC internal prototype to avoid an error.
20576 Use char because int might match the return type of a GCC
20577 builtin and then its argument prototype would still apply. */
20578#ifdef __cplusplus
20579extern "C"
20580#endif
20581char SmcOpenConnection ();
20582int
20583main ()
20584{
20585return SmcOpenConnection ();
20586 ;
20587 return 0;
20588}
20589_ACEOF
20590if ac_fn_c_try_link "$LINENO"; then :
20591 ac_cv_lib_SM_SmcOpenConnection=yes
20592else
20593 ac_cv_lib_SM_SmcOpenConnection=no
20594fi
20595rm -f core conftest.err conftest.$ac_objext \
20596 conftest$ac_exeext conftest.$ac_ext
20597LIBS=$ac_check_lib_save_LIBS
20598fi
20599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
20600$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
20601if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
20602 HAVE_X_SM=yes
20603fi
20604
20605fi
20606
20607
20608
20609 if test "${HAVE_X_SM}" = "yes"; then
20610
20611$as_echo "#define HAVE_X_SM 1" >>confdefs.h
20612
20613 LIBXSM="-lSM -lICE"
20614 case "$LIBS" in
20615 *-lSM*) ;;
20616 *) LIBS="$LIBXSM $LIBS" ;;
20617 esac
20618 fi
20619fi
20620
20621
20622### Use libxml (-lxml2) if available
20623HAVE_LIBXML2=no
20624if test "${with_xml2}" != "no"; then
20625 ### I'm not sure what the version number should be, so I just guessed.
20626
20627 succeeded=no
20628
20629 if test "$PKG_CONFIG" = "no" ; then
20630 HAVE_LIBXML2=no
20631 else
20632 PKG_CONFIG_MIN_VERSION=0.9.0
20633 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
20634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
20635$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
20636
20637 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
20638 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
20639 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
20640 edit_cflags="
20641 s,///*,/,g
20642 s/^/ /
20643 s/ -I/ $isystem/g
20644 s/^ //
20645 "
20646 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
20647 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
20648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
20649$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
20650 succeeded=yes
20651 else
20652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20653$as_echo "no" >&6; }
20654 LIBXML2_CFLAGS=""
20655 LIBXML2_LIBS=""
20656 ## If we have a custom action on failure, don't print errors, but
20657 ## do set a variable so people can do so.
20658 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
20659
20660 fi
20661
20662
20663
20664 else
20665 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
20666 echo "*** See http://www.freedesktop.org/software/pkgconfig"
20667 fi
20668 fi
20669
20670 if test $succeeded = yes; then
20671 HAVE_LIBXML2=yes
20672 else
20673 HAVE_LIBXML2=no
20674 fi
20675
20676 if test "${HAVE_LIBXML2}" = "yes"; then
20677 LIBS="$LIBXML2_LIBS $LIBS"
20678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
20679$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
20680if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
20681 $as_echo_n "(cached) " >&6
20682else
20683 ac_check_lib_save_LIBS=$LIBS
20684LIBS="-lxml2 $LIBS"
20685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20686/* end confdefs.h. */
20687
20688/* Override any GCC internal prototype to avoid an error.
20689 Use char because int might match the return type of a GCC
20690 builtin and then its argument prototype would still apply. */
20691#ifdef __cplusplus
20692extern "C"
20693#endif
20694char htmlReadMemory ();
20695int
20696main ()
20697{
20698return htmlReadMemory ();
20699 ;
20700 return 0;
20701}
20702_ACEOF
20703if ac_fn_c_try_link "$LINENO"; then :
20704 ac_cv_lib_xml2_htmlReadMemory=yes
20705else
20706 ac_cv_lib_xml2_htmlReadMemory=no
20707fi
20708rm -f core conftest.err conftest.$ac_objext \
20709 conftest$ac_exeext conftest.$ac_ext
20710LIBS=$ac_check_lib_save_LIBS
20711fi
20712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
20713$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
20714if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
20715 HAVE_LIBXML2=yes
20716else
20717 HAVE_LIBXML2=no
20718fi
20719
20720 if test "${HAVE_LIBXML2}" = "yes"; then
20721
20722$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
20723
20724 else
20725 LIBXML2_LIBS=""
20726 LIBXML2_CFLAGS=""
20727 fi
20728 fi
20729fi
20730
20731
20732
20733# If netdb.h doesn't declare h_errno, we must declare it by hand.
20734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
20735$as_echo_n "checking whether netdb declares h_errno... " >&6; }
20736if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
20737 $as_echo_n "(cached) " >&6
20738else
20739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20740/* end confdefs.h. */
20741#include <netdb.h>
20742int
20743main ()
20744{
20745return h_errno;
20746 ;
20747 return 0;
20748}
20749_ACEOF
20750if ac_fn_c_try_link "$LINENO"; then :
20751 emacs_cv_netdb_declares_h_errno=yes
20752else
20753 emacs_cv_netdb_declares_h_errno=no
20754fi
20755rm -f core conftest.err conftest.$ac_objext \
20756 conftest$ac_exeext conftest.$ac_ext
20757fi
20758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
20759$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
20760if test $emacs_cv_netdb_declares_h_errno = yes; then
20761
20762$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
20763
20764fi
20765
20766# fmod, logb, and frexp are found in -lm on most systems.
20767# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
20768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
20769$as_echo_n "checking for sqrt in -lm... " >&6; }
20770if test "${ac_cv_lib_m_sqrt+set}" = set; then :
20771 $as_echo_n "(cached) " >&6
20772else
20773 ac_check_lib_save_LIBS=$LIBS
20774LIBS="-lm $LIBS"
20775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20776/* end confdefs.h. */
20777
20778/* Override any GCC internal prototype to avoid an error.
20779 Use char because int might match the return type of a GCC
20780 builtin and then its argument prototype would still apply. */
20781#ifdef __cplusplus
20782extern "C"
20783#endif
20784char sqrt ();
20785int
20786main ()
20787{
20788return sqrt ();
20789 ;
20790 return 0;
20791}
20792_ACEOF
20793if ac_fn_c_try_link "$LINENO"; then :
20794 ac_cv_lib_m_sqrt=yes
20795else
20796 ac_cv_lib_m_sqrt=no
20797fi
20798rm -f core conftest.err conftest.$ac_objext \
20799 conftest$ac_exeext conftest.$ac_ext
20800LIBS=$ac_check_lib_save_LIBS
20801fi
20802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
20803$as_echo "$ac_cv_lib_m_sqrt" >&6; }
20804if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
20805 cat >>confdefs.h <<_ACEOF
20806#define HAVE_LIBM 1
20807_ACEOF
20808
20809 LIBS="-lm $LIBS"
20810
20811fi
20812
20813
20814# Check for mail-locking functions in a "mail" library. Probably this should
20815# have the same check as for liblockfile below.
20816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
20817$as_echo_n "checking for maillock in -lmail... " >&6; }
20818if test "${ac_cv_lib_mail_maillock+set}" = set; then :
20819 $as_echo_n "(cached) " >&6
20820else
20821 ac_check_lib_save_LIBS=$LIBS
20822LIBS="-lmail $LIBS"
20823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20824/* end confdefs.h. */
20825
20826/* Override any GCC internal prototype to avoid an error.
20827 Use char because int might match the return type of a GCC
20828 builtin and then its argument prototype would still apply. */
20829#ifdef __cplusplus
20830extern "C"
20831#endif
20832char maillock ();
20833int
20834main ()
20835{
20836return maillock ();
20837 ;
20838 return 0;
20839}
20840_ACEOF
20841if ac_fn_c_try_link "$LINENO"; then :
20842 ac_cv_lib_mail_maillock=yes
20843else
20844 ac_cv_lib_mail_maillock=no
20845fi
20846rm -f core conftest.err conftest.$ac_objext \
20847 conftest$ac_exeext conftest.$ac_ext
20848LIBS=$ac_check_lib_save_LIBS
20849fi
20850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
20851$as_echo "$ac_cv_lib_mail_maillock" >&6; }
20852if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
20853 have_mail=yes
20854else
20855 have_mail=no
20856fi
20857
20858if test $have_mail = yes; then
20859 LIBS_MAIL=-lmail
20860 LIBS="$LIBS_MAIL $LIBS"
20861
20862$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
20863
20864else
20865 LIBS_MAIL=
20866fi
20867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
20868$as_echo_n "checking for maillock in -llockfile... " >&6; }
20869if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
20870 $as_echo_n "(cached) " >&6
20871else
20872 ac_check_lib_save_LIBS=$LIBS
20873LIBS="-llockfile $LIBS"
20874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20875/* end confdefs.h. */
20876
20877/* Override any GCC internal prototype to avoid an error.
20878 Use char because int might match the return type of a GCC
20879 builtin and then its argument prototype would still apply. */
20880#ifdef __cplusplus
20881extern "C"
20882#endif
20883char maillock ();
20884int
20885main ()
20886{
20887return maillock ();
20888 ;
20889 return 0;
20890}
20891_ACEOF
20892if ac_fn_c_try_link "$LINENO"; then :
20893 ac_cv_lib_lockfile_maillock=yes
20894else
20895 ac_cv_lib_lockfile_maillock=no
20896fi
20897rm -f core conftest.err conftest.$ac_objext \
20898 conftest$ac_exeext conftest.$ac_ext
20899LIBS=$ac_check_lib_save_LIBS
20900fi
20901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
20902$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
20903if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
20904 have_lockfile=yes
20905else
20906 have_lockfile=no
20907fi
20908
20909if test $have_lockfile = yes; then
20910 LIBS_MAIL=-llockfile
20911 LIBS="$LIBS_MAIL $LIBS"
20912
20913$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
20914
20915else
20916# If we have the shared liblockfile, assume we must use it for mail
20917# locking (e.g. Debian). If we couldn't link against liblockfile
20918# (no liblockfile.a installed), ensure that we don't need to.
20919 # Extract the first word of "liblockfile.so", so it can be a program name with args.
20920set dummy liblockfile.so; ac_word=$2
20921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20922$as_echo_n "checking for $ac_word... " >&6; }
20923if test "${ac_cv_prog_liblockfile+set}" = set; then :
20924 $as_echo_n "(cached) " >&6
20925else
20926 if test -n "$liblockfile"; then
20927 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
20928else
20929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20930as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
20931for as_dir in $as_dummy
20932do
20933 IFS=$as_save_IFS
20934 test -z "$as_dir" && as_dir=.
20935 for ac_exec_ext in '' $ac_executable_extensions; do
20936 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20937 ac_cv_prog_liblockfile="yes"
20938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20939 break 2
20940 fi
20941done
20942 done
20943IFS=$as_save_IFS
20944
20945 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
20946fi
20947fi
20948liblockfile=$ac_cv_prog_liblockfile
20949if test -n "$liblockfile"; then
20950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
20951$as_echo "$liblockfile" >&6; }
20952else
20953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20954$as_echo "no" >&6; }
20955fi
20956
20957
20958 if test $ac_cv_prog_liblockfile = yes; then
20959 as_fn_error "Shared liblockfile found but can't link against it.
20960This probably means that movemail could lose mail.
20961There may be a \`development' package to install containing liblockfile." "$LINENO" 5
20962 fi
20963fi
20964
20965
20966
20967
20968
20969## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
20970## interlock access to the mail spool. The alternative is a lock file named
20971## /usr/spool/mail/$USER.lock.
20972mail_lock=no
20973case "$opsys" in
20974 aix4-2) mail_lock="lockf" ;;
20975
20976 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
20977
20978 ## On GNU/Linux systems, both methods are used by various mail programs.
20979 ## I assume most people are using newer mailers that have heard of flock.
20980 ## Change this if you need to.
20981 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
20982 ## configure gets the right answers, and that means *NOT* using flock.
20983 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
20984 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
20985 ## Debian maintainer hasn't provided a clean fix for Emacs.
20986 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
20987 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
20988 ## correct logic. -- fx
20989 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
20990 ## liblockfile is a Free Software replacement for libmail, used on
20991 ## Debian systems and elsewhere. -rfr.
20992 gnu-*)
20993 mail_lock="flock"
20994 if test $have_mail = yes || test $have_lockfile = yes; then
20995 test $ac_cv_header_maillock_h = yes && mail_lock=no
20996 fi
20997 ;;
20998esac
20999
21000BLESSMAIL_TARGET=
21001case "$mail_lock" in
21002 flock)
21003$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
21004 ;;
21005
21006 lockf)
21007$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
21008 ;;
21009
21010 *) BLESSMAIL_TARGET="need-blessmail" ;;
21011esac
21012
21013
21014
21015for ac_func in gethostname \
21016closedir getrusage get_current_dir_name \
21017lrand48 logb frexp fmod cbrt setsid \
21018fpathconf select euidaccess getpagesize setlocale \
21019utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
21020__fpending strsignal setitimer \
21021sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
21022gai_strerror mkstemp getline getdelim fsync sync \
21023difftime posix_memalign \
21024getpwent endpwent getgrent endgrent \
21025touchlock \
21026cfmakeraw cfsetspeed copysign __executable_start
21027do :
21028 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21029ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21030eval as_val=\$$as_ac_var
21031 if test "x$as_val" = x""yes; then :
21032 cat >>confdefs.h <<_ACEOF
21033#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21034_ACEOF
21035
21036fi
21037done
21038
21039
21040if test $opsys != unixware; then
21041 for ac_func in getwd
21042do :
21043 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
21044if test "x$ac_cv_func_getwd" = x""yes; then :
21045 cat >>confdefs.h <<_ACEOF
21046#define HAVE_GETWD 1
21047_ACEOF
21048
21049fi
21050done
21051
21052fi
21053
21054## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
21055## has a broken `rint' in some library versions including math library
21056## version number A.09.05.
21057## You can fix the math library by installing patch number PHSS_4630.
21058## But we can fix it more reliably for Emacs by just not using rint.
21059## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h.
21060case $opsys in
21061 hpux*) : ;;
21062 *) for ac_func in random rint
21063do :
21064 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21065ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21066eval as_val=\$$as_ac_var
21067 if test "x$as_val" = x""yes; then :
21068 cat >>confdefs.h <<_ACEOF
21069#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21070_ACEOF
21071
21072fi
21073done
21074 ;;
21075esac
21076
21077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
21078$as_echo_n "checking for __builtin_unwind_init... " >&6; }
21079if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
21080 $as_echo_n "(cached) " >&6
21081else
21082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21083/* end confdefs.h. */
21084
21085int
21086main ()
21087{
21088__builtin_unwind_init ();
21089 ;
21090 return 0;
21091}
21092_ACEOF
21093if ac_fn_c_try_link "$LINENO"; then :
21094 emacs_cv_func___builtin_unwind_init=yes
21095else
21096 emacs_cv_func___builtin_unwind_init=no
21097fi
21098rm -f core conftest.err conftest.$ac_objext \
21099 conftest$ac_exeext conftest.$ac_ext
21100fi
21101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
21102$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
21103if test $emacs_cv_func___builtin_unwind_init = yes; then
21104
21105$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
21106
21107fi
21108
21109
21110
21111
21112
21113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
21114$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
21115if test "${ac_cv_sys_largefile_source+set}" = set; then :
21116 $as_echo_n "(cached) " >&6
21117else
21118 while :; do
21119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21120/* end confdefs.h. */
21121#include <sys/types.h> /* for off_t */
21122 #include <stdio.h>
21123int
21124main ()
21125{
21126int (*fp) (FILE *, off_t, int) = fseeko;
21127 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
21128 ;
21129 return 0;
21130}
21131_ACEOF
21132if ac_fn_c_try_link "$LINENO"; then :
21133 ac_cv_sys_largefile_source=no; break
21134fi
21135rm -f core conftest.err conftest.$ac_objext \
21136 conftest$ac_exeext conftest.$ac_ext
21137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21138/* end confdefs.h. */
21139#define _LARGEFILE_SOURCE 1
21140#include <sys/types.h> /* for off_t */
21141 #include <stdio.h>
21142int
21143main ()
21144{
21145int (*fp) (FILE *, off_t, int) = fseeko;
21146 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
21147 ;
21148 return 0;
21149}
21150_ACEOF
21151if ac_fn_c_try_link "$LINENO"; then :
21152 ac_cv_sys_largefile_source=1; break
21153fi
21154rm -f core conftest.err conftest.$ac_objext \
21155 conftest$ac_exeext conftest.$ac_ext
21156 ac_cv_sys_largefile_source=unknown
21157 break
21158done
21159fi
21160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
21161$as_echo "$ac_cv_sys_largefile_source" >&6; }
21162case $ac_cv_sys_largefile_source in #(
21163 no | unknown) ;;
21164 *)
21165cat >>confdefs.h <<_ACEOF
21166#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
21167_ACEOF
21168;;
21169esac
21170rm -rf conftest*
21171
21172# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
21173# in glibc 2.1.3, but that breaks too many other things.
21174# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
21175if test $ac_cv_sys_largefile_source != unknown; then
21176
21177$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
21178
21179fi
21180
21181
21182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
21183$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
21184if test "${ac_cv_func_getpgrp_void+set}" = set; then :
21185 $as_echo_n "(cached) " >&6
21186else
21187 # Use it with a single arg.
21188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21189/* end confdefs.h. */
21190$ac_includes_default
21191int
21192main ()
21193{
21194getpgrp (0);
21195 ;
21196 return 0;
21197}
21198_ACEOF
21199if ac_fn_c_try_compile "$LINENO"; then :
21200 ac_cv_func_getpgrp_void=no
21201else
21202 ac_cv_func_getpgrp_void=yes
21203fi
21204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21205
21206fi
21207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
21208$as_echo "$ac_cv_func_getpgrp_void" >&6; }
21209if test $ac_cv_func_getpgrp_void = yes; then
21210
21211$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
21212
21213fi
21214
21215
21216# UNIX98 PTYs.
21217for ac_func in grantpt
21218do :
21219 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
21220if test "x$ac_cv_func_grantpt" = x""yes; then :
21221 cat >>confdefs.h <<_ACEOF
21222#define HAVE_GRANTPT 1
21223_ACEOF
21224
21225fi
21226done
21227
21228
21229# PTY-related GNU extensions.
21230for ac_func in getpt
21231do :
21232 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
21233if test "x$ac_cv_func_getpt" = x""yes; then :
21234 cat >>confdefs.h <<_ACEOF
21235#define HAVE_GETPT 1
21236_ACEOF
21237
21238fi
21239done
21240
21241
21242# Check this now, so that we will NOT find the above functions in ncurses.
21243# That is because we have not set up to link ncurses in lib-src.
21244# It's better to believe a function is not available
21245# than to expect to find it in ncurses.
21246# Also we need tputs and friends to be able to build at all.
21247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
21248$as_echo_n "checking for library containing tputs... " >&6; }
21249# Run a test program that contains a call to tputs, a call that is
21250# never executed. This tests whether a pre-'main' dynamic linker
21251# works with the library. It's too much trouble to actually call
21252# tputs in the test program, due to portability hassles. When
21253# cross-compiling, assume the test program will run if it links.
21254
21255# Maybe curses should be tried earlier?
21256# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
21257for tputs_library in '' tinfo ncurses terminfo termcap curses; do
21258 OLIBS=$LIBS
21259 if test -z "$tputs_library"; then
21260 LIBS_TERMCAP=
21261 msg='none required'
21262 else
21263 LIBS_TERMCAP=-l$tputs_library
21264 msg=$LIBS_TERMCAP
21265 LIBS="$LIBS_TERMCAP $LIBS"
21266 fi
21267 if test "$cross_compiling" = yes; then :
21268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21269/* end confdefs.h. */
21270
21271 extern void tputs (const char *, int, int (*)(int));
21272 int main (int argc, char **argv)
21273 {
21274 if (argc == 10000)
21275 tputs (argv[0], 0, 0);
21276 return 0;
21277 }
21278
21279_ACEOF
21280if ac_fn_c_try_link "$LINENO"; then :
21281
21282else
21283 msg=no
21284fi
21285rm -f core conftest.err conftest.$ac_objext \
21286 conftest$ac_exeext conftest.$ac_ext
21287else
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289/* end confdefs.h. */
21290
21291 extern void tputs (const char *, int, int (*)(int));
21292 int main (int argc, char **argv)
21293 {
21294 if (argc == 10000)
21295 tputs (argv[0], 0, 0);
21296 return 0;
21297 }
21298
21299_ACEOF
21300if ac_fn_c_try_run "$LINENO"; then :
21301
21302else
21303 msg=no
21304fi
21305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21306 conftest.$ac_objext conftest.beam conftest.$ac_ext
21307fi
21308
21309 LIBS=$OLIBS
21310 if test "X$msg" != Xno; then
21311 break
21312 fi
21313done
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
21315$as_echo "$msg" >&6; }
21316if test "X$msg" = Xno; then
21317 as_fn_error "The required function \`tputs' was not found in any library.
21318The following libraries were tried (in order):
21319 libtinfo, libncurses, libterminfo, libtermcap, libcurses
21320Please try installing whichever of these libraries is most appropriate
21321for your system, together with its header files.
21322For example, a libncurses-dev(el) or similar package." "$LINENO" 5
21323fi
21324
21325## Use termcap instead of terminfo?
21326## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
21327TERMINFO=yes
21328## FIXME? In the cases below where we unconditionally set
21329## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
21330## if that was found above to have tputs.
21331## Should we use the gnu* logic everywhere?
21332case "$opsys" in
21333 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
21334 ## The ncurses library has been moved out of the System framework in
21335 ## Mac OS X 10.2. So if configure detects it, set the command-line
21336 ## option to use it.
21337 darwin) LIBS_TERMCAP="-lncurses" ;;
21338
21339 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
21340
21341 freebsd)
21342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
21343$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
21344 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
21345 $as_echo_n "(cached) " >&6
21346else
21347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21348/* end confdefs.h. */
21349#include <osreldate.h>
21350int
21351main ()
21352{
21353#if __FreeBSD_version < 400000
21354fail;
21355#endif
21356
21357 ;
21358 return 0;
21359}
21360_ACEOF
21361if ac_fn_c_try_link "$LINENO"; then :
21362 emacs_cv_freebsd_terminfo=yes
21363else
21364 emacs_cv_freebsd_terminfo=no
21365fi
21366rm -f core conftest.err conftest.$ac_objext \
21367 conftest$ac_exeext conftest.$ac_ext
21368fi
21369
21370
21371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
21372$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
21373
21374 if test $emacs_cv_freebsd_terminfo = yes; then
21375 LIBS_TERMCAP="-lncurses"
21376 else
21377 TERMINFO=no
21378 LIBS_TERMCAP="-ltermcap"
21379 fi
21380 ;;
21381
21382 netbsd)
21383 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
21384 TERMINFO=no
21385 LIBS_TERMCAP="-ltermcap"
21386 fi
21387 ;;
21388
21389 openbsd) LIBS_TERMCAP="-lncurses" ;;
21390
21391 ## hpux: Make sure we get select from libc rather than from libcurses
21392 ## because libcurses on HPUX 10.10 has a broken version of select.
21393 ## We used to use -lc -lcurses, but this may be cleaner.
21394 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
21395 # set that way, now it uses the default). Isn't this a contradiction?
21396 hpux*) LIBS_TERMCAP="-ltermcap" ;;
21397
21398esac
21399
21400TERMCAP_OBJ=tparam.o
21401if test $TERMINFO = yes; then
21402
21403$as_echo "#define TERMINFO 1" >>confdefs.h
21404
21405 TERMCAP_OBJ=terminfo.o
21406fi
21407
21408
21409
21410
21411# Do we have res_init, for detecting changes in /etc/resolv.conf?
21412# On Darwin, res_init appears not to be useful: see bug#562 and
21413# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
21414resolv=no
21415
21416if test $opsys != darwin; then
21417
21418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21419/* end confdefs.h. */
21420#include <netinet/in.h>
21421#include <arpa/nameser.h>
21422#include <resolv.h>
21423int
21424main ()
21425{
21426return res_init();
21427 ;
21428 return 0;
21429}
21430_ACEOF
21431if ac_fn_c_try_link "$LINENO"; then :
21432 have_res_init=yes
21433else
21434 have_res_init=no
21435fi
21436rm -f core conftest.err conftest.$ac_objext \
21437 conftest$ac_exeext conftest.$ac_ext
21438 if test "$have_res_init" = no; then
21439 OLIBS="$LIBS"
21440 LIBS="$LIBS -lresolv"
21441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
21442$as_echo_n "checking for res_init with -lresolv... " >&6; }
21443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21444/* end confdefs.h. */
21445#include <netinet/in.h>
21446#include <arpa/nameser.h>
21447#include <resolv.h>
21448int
21449main ()
21450{
21451return res_init();
21452 ;
21453 return 0;
21454}
21455_ACEOF
21456if ac_fn_c_try_link "$LINENO"; then :
21457 have_res_init=yes
21458else
21459 have_res_init=no
21460fi
21461rm -f core conftest.err conftest.$ac_objext \
21462 conftest$ac_exeext conftest.$ac_ext
21463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
21464$as_echo "$have_res_init" >&6; }
21465 if test "$have_res_init" = yes ; then
21466 resolv=yes
21467 fi
21468 LIBS="$OLIBS"
21469 fi
21470
21471 if test "$have_res_init" = yes; then
21472
21473$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
21474
21475 fi
21476fi
21477# Do we need the Hesiod library to provide the support routines?
21478LIBHESIOD=
21479if test "$with_hesiod" != no ; then
21480 # Don't set $LIBS here -- see comments above. FIXME which comments?
21481 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
21482if test "x$ac_cv_func_res_send" = x""yes; then :
21483
21484else
21485 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
21486if test "x$ac_cv_func___res_send" = x""yes; then :
21487
21488else
21489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
21490$as_echo_n "checking for res_send in -lresolv... " >&6; }
21491if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
21492 $as_echo_n "(cached) " >&6
21493else
21494 ac_check_lib_save_LIBS=$LIBS
21495LIBS="-lresolv $LIBS"
21496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21497/* end confdefs.h. */
21498
21499/* Override any GCC internal prototype to avoid an error.
21500 Use char because int might match the return type of a GCC
21501 builtin and then its argument prototype would still apply. */
21502#ifdef __cplusplus
21503extern "C"
21504#endif
21505char res_send ();
21506int
21507main ()
21508{
21509return res_send ();
21510 ;
21511 return 0;
21512}
21513_ACEOF
21514if ac_fn_c_try_link "$LINENO"; then :
21515 ac_cv_lib_resolv_res_send=yes
21516else
21517 ac_cv_lib_resolv_res_send=no
21518fi
21519rm -f core conftest.err conftest.$ac_objext \
21520 conftest$ac_exeext conftest.$ac_ext
21521LIBS=$ac_check_lib_save_LIBS
21522fi
21523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
21524$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
21525if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
21526 resolv=yes
21527else
21528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
21529$as_echo_n "checking for __res_send in -lresolv... " >&6; }
21530if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
21531 $as_echo_n "(cached) " >&6
21532else
21533 ac_check_lib_save_LIBS=$LIBS
21534LIBS="-lresolv $LIBS"
21535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21536/* end confdefs.h. */
21537
21538/* Override any GCC internal prototype to avoid an error.
21539 Use char because int might match the return type of a GCC
21540 builtin and then its argument prototype would still apply. */
21541#ifdef __cplusplus
21542extern "C"
21543#endif
21544char __res_send ();
21545int
21546main ()
21547{
21548return __res_send ();
21549 ;
21550 return 0;
21551}
21552_ACEOF
21553if ac_fn_c_try_link "$LINENO"; then :
21554 ac_cv_lib_resolv___res_send=yes
21555else
21556 ac_cv_lib_resolv___res_send=no
21557fi
21558rm -f core conftest.err conftest.$ac_objext \
21559 conftest$ac_exeext conftest.$ac_ext
21560LIBS=$ac_check_lib_save_LIBS
21561fi
21562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
21563$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
21564if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
21565 resolv=yes
21566fi
21567
21568fi
21569
21570fi
21571
21572fi
21573
21574 if test "$resolv" = yes ; then
21575 RESOLVLIB=-lresolv
21576 else
21577 RESOLVLIB=
21578 fi
21579 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
21580if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
21581
21582else
21583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
21584$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
21585if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
21586 $as_echo_n "(cached) " >&6
21587else
21588 ac_check_lib_save_LIBS=$LIBS
21589LIBS="-lhesiod $RESOLVLIB $LIBS"
21590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21591/* end confdefs.h. */
21592
21593/* Override any GCC internal prototype to avoid an error.
21594 Use char because int might match the return type of a GCC
21595 builtin and then its argument prototype would still apply. */
21596#ifdef __cplusplus
21597extern "C"
21598#endif
21599char hes_getmailhost ();
21600int
21601main ()
21602{
21603return hes_getmailhost ();
21604 ;
21605 return 0;
21606}
21607_ACEOF
21608if ac_fn_c_try_link "$LINENO"; then :
21609 ac_cv_lib_hesiod_hes_getmailhost=yes
21610else
21611 ac_cv_lib_hesiod_hes_getmailhost=no
21612fi
21613rm -f core conftest.err conftest.$ac_objext \
21614 conftest$ac_exeext conftest.$ac_ext
21615LIBS=$ac_check_lib_save_LIBS
21616fi
21617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
21618$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
21619if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
21620 hesiod=yes
21621else
21622 :
21623fi
21624
21625fi
21626
21627
21628 if test x"$hesiod" = xyes; then
21629
21630$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
21631
21632 LIBHESIOD=-lhesiod
21633 fi
21634fi
21635
21636
21637# Do we need libresolv (due to res_init or Hesiod)?
21638if test "$resolv" = yes && test $opsys != darwin; then
21639
21640$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
21641
21642 LIBRESOLV=-lresolv
21643else
21644 LIBRESOLV=
21645fi
21646
21647
21648# These tell us which Kerberos-related libraries to use.
21649COM_ERRLIB=
21650CRYPTOLIB=
21651KRB5LIB=
21652DESLIB=
21653KRB4LIB=
21654
21655if test "${with_kerberos}" != no; then
21656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
21657$as_echo_n "checking for com_err in -lcom_err... " >&6; }
21658if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
21659 $as_echo_n "(cached) " >&6
21660else
21661 ac_check_lib_save_LIBS=$LIBS
21662LIBS="-lcom_err $LIBS"
21663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21664/* end confdefs.h. */
21665
21666/* Override any GCC internal prototype to avoid an error.
21667 Use char because int might match the return type of a GCC
21668 builtin and then its argument prototype would still apply. */
21669#ifdef __cplusplus
21670extern "C"
21671#endif
21672char com_err ();
21673int
21674main ()
21675{
21676return com_err ();
21677 ;
21678 return 0;
21679}
21680_ACEOF
21681if ac_fn_c_try_link "$LINENO"; then :
21682 ac_cv_lib_com_err_com_err=yes
21683else
21684 ac_cv_lib_com_err_com_err=no
21685fi
21686rm -f core conftest.err conftest.$ac_objext \
21687 conftest$ac_exeext conftest.$ac_ext
21688LIBS=$ac_check_lib_save_LIBS
21689fi
21690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
21691$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
21692if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
21693 have_com_err=yes
21694else
21695 have_com_err=no
21696fi
21697
21698 if test $have_com_err = yes; then
21699 COM_ERRLIB=-lcom_err
21700 LIBS="$COM_ERRLIB $LIBS"
21701
21702$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
21703
21704 fi
21705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
21706$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
21707if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
21708 $as_echo_n "(cached) " >&6
21709else
21710 ac_check_lib_save_LIBS=$LIBS
21711LIBS="-lcrypto $LIBS"
21712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21713/* end confdefs.h. */
21714
21715/* Override any GCC internal prototype to avoid an error.
21716 Use char because int might match the return type of a GCC
21717 builtin and then its argument prototype would still apply. */
21718#ifdef __cplusplus
21719extern "C"
21720#endif
21721char mit_des_cbc_encrypt ();
21722int
21723main ()
21724{
21725return mit_des_cbc_encrypt ();
21726 ;
21727 return 0;
21728}
21729_ACEOF
21730if ac_fn_c_try_link "$LINENO"; then :
21731 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
21732else
21733 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
21734fi
21735rm -f core conftest.err conftest.$ac_objext \
21736 conftest$ac_exeext conftest.$ac_ext
21737LIBS=$ac_check_lib_save_LIBS
21738fi
21739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
21740$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
21741if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
21742 have_crypto=yes
21743else
21744 have_crypto=no
21745fi
21746
21747 if test $have_crypto = yes; then
21748 CRYPTOLIB=-lcrypto
21749 LIBS="$CRYPTOLIB $LIBS"
21750
21751$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
21752
21753 fi
21754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
21755$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
21756if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
21757 $as_echo_n "(cached) " >&6
21758else
21759 ac_check_lib_save_LIBS=$LIBS
21760LIBS="-lk5crypto $LIBS"
21761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21762/* end confdefs.h. */
21763
21764/* Override any GCC internal prototype to avoid an error.
21765 Use char because int might match the return type of a GCC
21766 builtin and then its argument prototype would still apply. */
21767#ifdef __cplusplus
21768extern "C"
21769#endif
21770char mit_des_cbc_encrypt ();
21771int
21772main ()
21773{
21774return mit_des_cbc_encrypt ();
21775 ;
21776 return 0;
21777}
21778_ACEOF
21779if ac_fn_c_try_link "$LINENO"; then :
21780 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
21781else
21782 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
21783fi
21784rm -f core conftest.err conftest.$ac_objext \
21785 conftest$ac_exeext conftest.$ac_ext
21786LIBS=$ac_check_lib_save_LIBS
21787fi
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
21789$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
21790if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
21791 have_k5crypto=yes
21792else
21793 have_k5crypto=no
21794fi
21795
21796 if test $have_k5crypto = yes; then
21797 CRYPTOLIB=-lk5crypto
21798 LIBS="$CRYPTOLIB $LIBS"
21799
21800$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
21801
21802 fi
21803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
21804$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
21805if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
21806 $as_echo_n "(cached) " >&6
21807else
21808 ac_check_lib_save_LIBS=$LIBS
21809LIBS="-lkrb5 $LIBS"
21810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21811/* end confdefs.h. */
21812
21813/* Override any GCC internal prototype to avoid an error.
21814 Use char because int might match the return type of a GCC
21815 builtin and then its argument prototype would still apply. */
21816#ifdef __cplusplus
21817extern "C"
21818#endif
21819char krb5_init_context ();
21820int
21821main ()
21822{
21823return krb5_init_context ();
21824 ;
21825 return 0;
21826}
21827_ACEOF
21828if ac_fn_c_try_link "$LINENO"; then :
21829 ac_cv_lib_krb5_krb5_init_context=yes
21830else
21831 ac_cv_lib_krb5_krb5_init_context=no
21832fi
21833rm -f core conftest.err conftest.$ac_objext \
21834 conftest$ac_exeext conftest.$ac_ext
21835LIBS=$ac_check_lib_save_LIBS
21836fi
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
21838$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
21839if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
21840 have_krb5=yes
21841else
21842 have_krb5=no
21843fi
21844
21845 if test $have_krb5=yes; then
21846 KRB5LIB=-lkrb5
21847 LIBS="$KRB5LIB $LIBS"
21848
21849$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
21850
21851 fi
21852 if test "${with_kerberos5}" = no; then
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
21854$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
21855if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
21856 $as_echo_n "(cached) " >&6
21857else
21858 ac_check_lib_save_LIBS=$LIBS
21859LIBS="-ldes425 $LIBS"
21860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21861/* end confdefs.h. */
21862
21863/* Override any GCC internal prototype to avoid an error.
21864 Use char because int might match the return type of a GCC
21865 builtin and then its argument prototype would still apply. */
21866#ifdef __cplusplus
21867extern "C"
21868#endif
21869char des_cbc_encrypt ();
21870int
21871main ()
21872{
21873return des_cbc_encrypt ();
21874 ;
21875 return 0;
21876}
21877_ACEOF
21878if ac_fn_c_try_link "$LINENO"; then :
21879 ac_cv_lib_des425_des_cbc_encrypt=yes
21880else
21881 ac_cv_lib_des425_des_cbc_encrypt=no
21882fi
21883rm -f core conftest.err conftest.$ac_objext \
21884 conftest$ac_exeext conftest.$ac_ext
21885LIBS=$ac_check_lib_save_LIBS
21886fi
21887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
21888$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
21889if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
21890 have_des425=yes
21891else
21892 have_des425=no
21893fi
21894
21895 if test $have_des425 = yes; then
21896 DESLIB=-ldes425
21897 LIBS="$DESLIB $LIBS"
21898
21899$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
21900
21901 else
21902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
21903$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
21904if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
21905 $as_echo_n "(cached) " >&6
21906else
21907 ac_check_lib_save_LIBS=$LIBS
21908LIBS="-ldes $LIBS"
21909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21910/* end confdefs.h. */
21911
21912/* Override any GCC internal prototype to avoid an error.
21913 Use char because int might match the return type of a GCC
21914 builtin and then its argument prototype would still apply. */
21915#ifdef __cplusplus
21916extern "C"
21917#endif
21918char des_cbc_encrypt ();
21919int
21920main ()
21921{
21922return des_cbc_encrypt ();
21923 ;
21924 return 0;
21925}
21926_ACEOF
21927if ac_fn_c_try_link "$LINENO"; then :
21928 ac_cv_lib_des_des_cbc_encrypt=yes
21929else
21930 ac_cv_lib_des_des_cbc_encrypt=no
21931fi
21932rm -f core conftest.err conftest.$ac_objext \
21933 conftest$ac_exeext conftest.$ac_ext
21934LIBS=$ac_check_lib_save_LIBS
21935fi
21936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
21937$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
21938if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
21939 have_des=yes
21940else
21941 have_des=no
21942fi
21943
21944 if test $have_des = yes; then
21945 DESLIB=-ldes
21946 LIBS="$DESLIB $LIBS"
21947
21948$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
21949
21950 fi
21951 fi
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
21953$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
21954if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
21955 $as_echo_n "(cached) " >&6
21956else
21957 ac_check_lib_save_LIBS=$LIBS
21958LIBS="-lkrb4 $LIBS"
21959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21960/* end confdefs.h. */
21961
21962/* Override any GCC internal prototype to avoid an error.
21963 Use char because int might match the return type of a GCC
21964 builtin and then its argument prototype would still apply. */
21965#ifdef __cplusplus
21966extern "C"
21967#endif
21968char krb_get_cred ();
21969int
21970main ()
21971{
21972return krb_get_cred ();
21973 ;
21974 return 0;
21975}
21976_ACEOF
21977if ac_fn_c_try_link "$LINENO"; then :
21978 ac_cv_lib_krb4_krb_get_cred=yes
21979else
21980 ac_cv_lib_krb4_krb_get_cred=no
21981fi
21982rm -f core conftest.err conftest.$ac_objext \
21983 conftest$ac_exeext conftest.$ac_ext
21984LIBS=$ac_check_lib_save_LIBS
21985fi
21986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21987$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
21988if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
21989 have_krb4=yes
21990else
21991 have_krb4=no
21992fi
21993
21994 if test $have_krb4 = yes; then
21995 KRB4LIB=-lkrb4
21996 LIBS="$KRB4LIB $LIBS"
21997
21998$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
21999
22000 else
22001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
22002$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
22003if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
22004 $as_echo_n "(cached) " >&6
22005else
22006 ac_check_lib_save_LIBS=$LIBS
22007LIBS="-lkrb $LIBS"
22008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22009/* end confdefs.h. */
22010
22011/* Override any GCC internal prototype to avoid an error.
22012 Use char because int might match the return type of a GCC
22013 builtin and then its argument prototype would still apply. */
22014#ifdef __cplusplus
22015extern "C"
22016#endif
22017char krb_get_cred ();
22018int
22019main ()
22020{
22021return krb_get_cred ();
22022 ;
22023 return 0;
22024}
22025_ACEOF
22026if ac_fn_c_try_link "$LINENO"; then :
22027 ac_cv_lib_krb_krb_get_cred=yes
22028else
22029 ac_cv_lib_krb_krb_get_cred=no
22030fi
22031rm -f core conftest.err conftest.$ac_objext \
22032 conftest$ac_exeext conftest.$ac_ext
22033LIBS=$ac_check_lib_save_LIBS
22034fi
22035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
22036$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
22037if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
22038 have_krb=yes
22039else
22040 have_krb=no
22041fi
22042
22043 if test $have_krb = yes; then
22044 KRB4LIB=-lkrb
22045 LIBS="$KRB4LIB $LIBS"
22046
22047$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
22048
22049 fi
22050 fi
22051 fi
22052
22053 if test "${with_kerberos5}" != no; then
22054 for ac_header in krb5.h
22055do :
22056 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
22057if test "x$ac_cv_header_krb5_h" = x""yes; then :
22058 cat >>confdefs.h <<_ACEOF
22059#define HAVE_KRB5_H 1
22060_ACEOF
22061 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
22062"
22063if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
22064
22065cat >>confdefs.h <<_ACEOF
22066#define HAVE_KRB5_ERROR_TEXT 1
22067_ACEOF
22068
22069
22070fi
22071ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
22072"
22073if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
22074
22075cat >>confdefs.h <<_ACEOF
22076#define HAVE_KRB5_ERROR_E_TEXT 1
22077_ACEOF
22078
22079
22080fi
22081
22082fi
22083
22084done
22085
22086 else
22087 for ac_header in des.h
22088do :
22089 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
22090if test "x$ac_cv_header_des_h" = x""yes; then :
22091 cat >>confdefs.h <<_ACEOF
22092#define HAVE_DES_H 1
22093_ACEOF
22094
22095else
22096 for ac_header in kerberosIV/des.h
22097do :
22098 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
22099if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
22100 cat >>confdefs.h <<_ACEOF
22101#define HAVE_KERBEROSIV_DES_H 1
22102_ACEOF
22103
22104else
22105 for ac_header in kerberos/des.h
22106do :
22107 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
22108if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
22109 cat >>confdefs.h <<_ACEOF
22110#define HAVE_KERBEROS_DES_H 1
22111_ACEOF
22112
22113fi
22114
22115done
22116
22117fi
22118
22119done
22120
22121fi
22122
22123done
22124
22125 for ac_header in krb.h
22126do :
22127 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
22128if test "x$ac_cv_header_krb_h" = x""yes; then :
22129 cat >>confdefs.h <<_ACEOF
22130#define HAVE_KRB_H 1
22131_ACEOF
22132
22133else
22134 for ac_header in kerberosIV/krb.h
22135do :
22136 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
22137if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
22138 cat >>confdefs.h <<_ACEOF
22139#define HAVE_KERBEROSIV_KRB_H 1
22140_ACEOF
22141
22142else
22143 for ac_header in kerberos/krb.h
22144do :
22145 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
22146if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
22147 cat >>confdefs.h <<_ACEOF
22148#define HAVE_KERBEROS_KRB_H 1
22149_ACEOF
22150
22151fi
22152
22153done
22154
22155fi
22156
22157done
22158
22159fi
22160
22161done
22162
22163 fi
22164 for ac_header in com_err.h
22165do :
22166 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
22167if test "x$ac_cv_header_com_err_h" = x""yes; then :
22168 cat >>confdefs.h <<_ACEOF
22169#define HAVE_COM_ERR_H 1
22170_ACEOF
22171
22172fi
22173
22174done
22175
22176fi
22177
22178
22179
22180
22181
22182
22183
22184
22185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
22186$as_echo_n "checking whether localtime caches TZ... " >&6; }
22187if test "${emacs_cv_localtime_cache+set}" = set; then :
22188 $as_echo_n "(cached) " >&6
22189else
22190 if test x$ac_cv_func_tzset = xyes; then
22191if test "$cross_compiling" = yes; then :
22192 # If we have tzset, assume the worst when cross-compiling.
22193emacs_cv_localtime_cache=yes
22194else
22195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22196/* end confdefs.h. */
22197#include <time.h>
22198char TZ_GMT0[] = "TZ=GMT0";
22199char TZ_PST8[] = "TZ=PST8";
22200main()
22201{
22202 time_t now = time ((time_t *) 0);
22203 int hour_GMT0, hour_unset;
22204 if (putenv (TZ_GMT0) != 0)
22205 exit (1);
22206 hour_GMT0 = localtime (&now)->tm_hour;
22207 unsetenv("TZ");
22208 hour_unset = localtime (&now)->tm_hour;
22209 if (putenv (TZ_PST8) != 0)
22210 exit (1);
22211 if (localtime (&now)->tm_hour == hour_GMT0)
22212 exit (1);
22213 unsetenv("TZ");
22214 if (localtime (&now)->tm_hour != hour_unset)
22215 exit (1);
22216 exit (0);
22217}
22218_ACEOF
22219if ac_fn_c_try_run "$LINENO"; then :
22220 emacs_cv_localtime_cache=no
22221else
22222 emacs_cv_localtime_cache=yes
22223fi
22224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22225 conftest.$ac_objext conftest.beam conftest.$ac_ext
22226fi
22227
22228else
22229 # If we lack tzset, report that localtime does not cache TZ,
22230 # since we can't invalidate the cache if we don't have tzset.
22231 emacs_cv_localtime_cache=no
22232fi
22233fi
22234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
22235$as_echo "$emacs_cv_localtime_cache" >&6; }
22236if test $emacs_cv_localtime_cache = yes; then
22237
22238$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
22239
22240fi
22241
22242ok_so_far=yes
22243ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
22244if test "x$ac_cv_func_socket" = x""yes; then :
22245
22246else
22247 ok_so_far=no
22248fi
22249
22250if test $ok_so_far = yes; then
22251 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
22252if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
22253
22254else
22255 ok_so_far=no
22256fi
22257
22258
22259fi
22260if test $ok_so_far = yes; then
22261 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
22262if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
22263
22264else
22265 ok_so_far=no
22266fi
22267
22268
22269fi
22270if test $ok_so_far = yes; then
22271
22272$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
22273
22274fi
22275
22276if test -f /usr/lpp/X11/bin/smt.exp; then
22277
22278$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
22279
22280fi
22281
22282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
22283$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
22284if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
22285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22286$as_echo "yes" >&6; }
22287
22288$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
22289
22290else
22291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22292$as_echo "no" >&6; }
22293fi
22294
22295for ac_header in vfork.h
22296do :
22297 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
22298if test "x$ac_cv_header_vfork_h" = x""yes; then :
22299 cat >>confdefs.h <<_ACEOF
22300#define HAVE_VFORK_H 1
22301_ACEOF
22302
22303fi
22304
22305done
22306
22307for ac_func in fork vfork
22308do :
22309 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22310ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22311eval as_val=\$$as_ac_var
22312 if test "x$as_val" = x""yes; then :
22313 cat >>confdefs.h <<_ACEOF
22314#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22315_ACEOF
22316
22317fi
22318done
22319
22320if test "x$ac_cv_func_fork" = xyes; then
22321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
22322$as_echo_n "checking for working fork... " >&6; }
22323if test "${ac_cv_func_fork_works+set}" = set; then :
22324 $as_echo_n "(cached) " >&6
22325else
22326 if test "$cross_compiling" = yes; then :
22327 ac_cv_func_fork_works=cross
22328else
22329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22330/* end confdefs.h. */
22331$ac_includes_default
22332int
22333main ()
22334{
22335
22336 /* By Ruediger Kuhlmann. */
22337 return fork () < 0;
22338
22339 ;
22340 return 0;
22341}
22342_ACEOF
22343if ac_fn_c_try_run "$LINENO"; then :
22344 ac_cv_func_fork_works=yes
22345else
22346 ac_cv_func_fork_works=no
22347fi
22348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22349 conftest.$ac_objext conftest.beam conftest.$ac_ext
22350fi
22351
22352fi
22353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
22354$as_echo "$ac_cv_func_fork_works" >&6; }
22355
22356else
22357 ac_cv_func_fork_works=$ac_cv_func_fork
22358fi
22359if test "x$ac_cv_func_fork_works" = xcross; then
22360 case $host in
22361 *-*-amigaos* | *-*-msdosdjgpp*)
22362 # Override, as these systems have only a dummy fork() stub
22363 ac_cv_func_fork_works=no
22364 ;;
22365 *)
22366 ac_cv_func_fork_works=yes
22367 ;;
22368 esac
22369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22370$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
22371fi
22372ac_cv_func_vfork_works=$ac_cv_func_vfork
22373if test "x$ac_cv_func_vfork" = xyes; then
22374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
22375$as_echo_n "checking for working vfork... " >&6; }
22376if test "${ac_cv_func_vfork_works+set}" = set; then :
22377 $as_echo_n "(cached) " >&6
22378else
22379 if test "$cross_compiling" = yes; then :
22380 ac_cv_func_vfork_works=cross
22381else
22382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22383/* end confdefs.h. */
22384/* Thanks to Paul Eggert for this test. */
22385$ac_includes_default
22386#include <sys/wait.h>
22387#ifdef HAVE_VFORK_H
22388# include <vfork.h>
22389#endif
22390/* On some sparc systems, changes by the child to local and incoming
22391 argument registers are propagated back to the parent. The compiler
22392 is told about this with #include <vfork.h>, but some compilers
22393 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22394 static variable whose address is put into a register that is
22395 clobbered by the vfork. */
22396static void
22397#ifdef __cplusplus
22398sparc_address_test (int arg)
22399# else
22400sparc_address_test (arg) int arg;
22401#endif
22402{
22403 static pid_t child;
22404 if (!child) {
22405 child = vfork ();
22406 if (child < 0) {
22407 perror ("vfork");
22408 _exit(2);
22409 }
22410 if (!child) {
22411 arg = getpid();
22412 write(-1, "", 0);
22413 _exit (arg);
22414 }
22415 }
22416}
22417
22418int
22419main ()
22420{
22421 pid_t parent = getpid ();
22422 pid_t child;
22423
22424 sparc_address_test (0);
22425
22426 child = vfork ();
22427
22428 if (child == 0) {
22429 /* Here is another test for sparc vfork register problems. This
22430 test uses lots of local variables, at least as many local
22431 variables as main has allocated so far including compiler
22432 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22433 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22434 reuse the register of parent for one of the local variables,
22435 since it will think that parent can't possibly be used any more
22436 in this routine. Assigning to the local variable will thus
22437 munge parent in the parent process. */
22438 pid_t
22439 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22440 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22441 /* Convince the compiler that p..p7 are live; otherwise, it might
22442 use the same hardware register for all 8 local variables. */
22443 if (p != p1 || p != p2 || p != p3 || p != p4
22444 || p != p5 || p != p6 || p != p7)
22445 _exit(1);
22446
22447 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22448 from child file descriptors. If the child closes a descriptor
22449 before it execs or exits, this munges the parent's descriptor
22450 as well. Test for this by closing stdout in the child. */
22451 _exit(close(fileno(stdout)) != 0);
22452 } else {
22453 int status;
22454 struct stat st;
22455
22456 while (wait(&status) != child)
22457 ;
22458 return (
22459 /* Was there some problem with vforking? */
22460 child < 0
22461
22462 /* Did the child fail? (This shouldn't happen.) */
22463 || status
22464
22465 /* Did the vfork/compiler bug occur? */
22466 || parent != getpid()
22467
22468 /* Did the file descriptor bug occur? */
22469 || fstat(fileno(stdout), &st) != 0
22470 );
22471 }
22472}
22473_ACEOF
22474if ac_fn_c_try_run "$LINENO"; then :
22475 ac_cv_func_vfork_works=yes
22476else
22477 ac_cv_func_vfork_works=no
22478fi
22479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22480 conftest.$ac_objext conftest.beam conftest.$ac_ext
22481fi
22482
22483fi
22484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
22485$as_echo "$ac_cv_func_vfork_works" >&6; }
22486
22487fi;
22488if test "x$ac_cv_func_fork_works" = xcross; then
22489 ac_cv_func_vfork_works=$ac_cv_func_vfork
22490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22491$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
22492fi
22493
22494if test "x$ac_cv_func_vfork_works" = xyes; then
22495
22496$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
22497
22498else
22499
22500$as_echo "#define vfork fork" >>confdefs.h
22501
22502fi
22503if test "x$ac_cv_func_fork_works" = xyes; then
22504
22505$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
22506
22507fi
22508
22509
22510for ac_func in snprintf
22511do :
22512 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
22513if test "x$ac_cv_func_snprintf" = x""yes; then :
22514 cat >>confdefs.h <<_ACEOF
22515#define HAVE_SNPRINTF 1
22516_ACEOF
22517
22518fi
22519done
22520
22521
22522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
22523$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
22524if test "${emacs_cv_langinfo_codeset+set}" = set; then :
22525 $as_echo_n "(cached) " >&6
22526else
22527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22528/* end confdefs.h. */
22529#include <langinfo.h>
22530int
22531main ()
22532{
22533char* cs = nl_langinfo(CODESET);
22534 ;
22535 return 0;
22536}
22537_ACEOF
22538if ac_fn_c_try_link "$LINENO"; then :
22539 emacs_cv_langinfo_codeset=yes
22540else
22541 emacs_cv_langinfo_codeset=no
22542fi
22543rm -f core conftest.err conftest.$ac_objext \
22544 conftest$ac_exeext conftest.$ac_ext
22545
22546fi
22547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
22548$as_echo "$emacs_cv_langinfo_codeset" >&6; }
22549if test $emacs_cv_langinfo_codeset = yes; then
22550
22551$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
22552
22553fi
22554
22555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
22556$as_echo_n "checking for mbstate_t... " >&6; }
22557if test "${ac_cv_type_mbstate_t+set}" = set; then :
22558 $as_echo_n "(cached) " >&6
22559else
22560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22561/* end confdefs.h. */
22562$ac_includes_default
22563# include <wchar.h>
22564int
22565main ()
22566{
22567mbstate_t x; return sizeof x;
22568 ;
22569 return 0;
22570}
22571_ACEOF
22572if ac_fn_c_try_compile "$LINENO"; then :
22573 ac_cv_type_mbstate_t=yes
22574else
22575 ac_cv_type_mbstate_t=no
22576fi
22577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22578fi
22579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
22580$as_echo "$ac_cv_type_mbstate_t" >&6; }
22581 if test $ac_cv_type_mbstate_t = yes; then
22582
22583$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
22584
22585 else
22586
22587$as_echo "#define mbstate_t int" >>confdefs.h
22588
22589 fi
22590
22591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
22592$as_echo_n "checking for C restricted array declarations... " >&6; }
22593if test "${emacs_cv_c_restrict_arr+set}" = set; then :
22594 $as_echo_n "(cached) " >&6
22595else
22596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22597/* end confdefs.h. */
22598void fred (int x[__restrict]);
22599int
22600main ()
22601{
22602
22603 ;
22604 return 0;
22605}
22606_ACEOF
22607if ac_fn_c_try_compile "$LINENO"; then :
22608 emacs_cv_c_restrict_arr=yes
22609else
22610 emacs_cv_c_restrict_arr=no
22611fi
22612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22613fi
22614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
22615$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22616if test "$emacs_cv_c_restrict_arr" = yes; then
22617
22618$as_echo "#define __restrict_arr __restrict" >>confdefs.h
22619
22620fi
22621
22622
22623
22624$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
22625
22626
22627## Note: PTYs are broken on darwin <6. Use at your own risk.
22628
22629$as_echo "#define HAVE_PTYS 1" >>confdefs.h
22630
22631
22632
22633$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
22634
22635
22636
22637
22638
22639case $opsys in
22640 aix4-2)
22641 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
22642 $as_echo "#define NO_EDITRES 1" >>confdefs.h
22643
22644 fi
22645 ;;
22646
22647 hpux*)
22648 $as_echo "#define NO_EDITRES 1" >>confdefs.h
22649
22650 ;;
22651esac
22652
22653
22654case $opsys in
22655 darwin | gnu | hpux* | *bsd )
22656
22657$as_echo "#define NO_TERMIO 1" >>confdefs.h
22658
22659 ;;
22660
22661 irix6-5 | sol2* | unixware )
22662
22663$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
22664
22665 ;;
22666esac
22667
22668
22669case $opsys in
22670 hpux* | irix6-5 | openbsd | sol2* | unixware )
22671
22672$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h
22673
22674 ;;
22675
22676 aix4-2)
22677
22678$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h
22679
22680
22681$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h
22682
22683
22684$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h
22685
22686
22687$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h
22688
22689
22690
22691$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
22692
22693 ;;
22694
22695 freebsd)
22696
22697$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
22698
22699 ;;
22700
22701 darwin)
22702
22703$as_echo "#define NO_ABORT 1" >>confdefs.h
22704
22705 ;;
22706esac
22707
22708case $opsys in
22709 gnu-* | sol2-10 )
22710
22711$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
22712
22713 ;;
22714esac
22715
22716case $opsys in
22717 darwin | freebsd | netbsd | openbsd )
22718
22719$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
22720
22721 ;;
22722esac
22723
22724case $opsys in
22725 netbsd | openbsd) sound_device="/dev/audio" ;;
22726 *) sound_device="/dev/dsp" ;;
22727esac
22728
22729
22730cat >>confdefs.h <<_ACEOF
22731#define DEFAULT_SOUND_DEVICE "$sound_device"
22732_ACEOF
22733
22734
22735
22736case $opsys in
22737 darwin | gnu-linux | gnu-kfreebsd )
22738
22739$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
22740
22741 ;;
22742esac
22743
22744
22745case $opsys in
22746 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
22747
22748$as_echo "#define NARROWPROTO 1" >>confdefs.h
22749
22750 ;;
22751esac
22752
22753
22754
22755
22756
22757
22758
22759
22760case $opsys in
22761 aix4-2 )
22762 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h
22763
22764 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h
22765
22766 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h
22767
22768 ;;
22769
22770 cygwin )
22771 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
22772
22773 $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h
22774
22775 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
22776
22777 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
22778
22779 ;;
22780
22781 darwin )
22782 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
22783
22784 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
22785
22786 $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h
22787
22788 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
22789
22790 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
22791
22792 ;;
22793
22794 gnu | freebsd | netbsd | openbsd )
22795 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
22796
22797 ;;
22798
22799 gnu-linux | gnu-kfreebsd )
22800 if test "x$ac_cv_func_grantpt" = xyes; then
22801
22802$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
22803
22804 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
22805
22806 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h
22807
22808 if test "x$ac_cv_func_getpt" = xyes; then
22809 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
22810
22811 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
22812
22813 else
22814 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
22815
22816 fi
22817 else
22818 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
22819
22820 fi
22821 ;;
22822
22823 hpux*)
22824 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
22825
22826 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h
22827
22828 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h
22829
22830 ;;
22831
22832 irix6-5 )
22833 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
22834
22835 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
22836
22837 $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h
22838
22839 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
22840
22841 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
22842
22843 ;;
22844
22845 sol2* )
22846 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
22847
22848 ;;
22849
22850 unixware )
22851 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
22852
22853 ;;
22854esac
22855
22856
22857case $opsys in
22858 sol2* | unixware )
22859 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
22860
22861 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
22862
22863
22864$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
22865
22866 ;;
22867esac
22868
22869
22870
22871
22872case $opsys in
22873 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
22874 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
22875
22876 ;;
22877
22878 gnu-linux | gnu-kfreebsd )
22879
22880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
22881$as_echo_n "checking for signals via characters... " >&6; }
22882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22883/* end confdefs.h. */
22884
22885#include <linux/version.h>
22886#if LINUX_VERSION_CODE < 0x20400
22887# error "Linux version too old"
22888#endif
22889
22890int
22891main ()
22892{
22893
22894 ;
22895 return 0;
22896}
22897_ACEOF
22898if ac_fn_c_try_cpp "$LINENO"; then :
22899 emacs_signals_via_chars=yes
22900else
22901 emacs_signals_via_chars=no
22902fi
22903rm -f conftest.err conftest.$ac_ext
22904
22905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
22906$as_echo "$emacs_signals_via_chars" >&6; }
22907 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
22908
22909 ;;
22910esac
22911
22912
22913
22914
22915
22916
22917case $opsys in
22918 cygwin | darwin | freebsd | netbsd | openbsd )
22919 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
22920
22921 ;;
22922
22923 unixware)
22924 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
22925
22926 ;;
22927
22928 gnu | gnu-linux | gnu-kfreebsd )
22929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
22930$as_echo_n "checking for style of pending output formalism... " >&6; }
22931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22932/* end confdefs.h. */
22933
22934#include <stdio.h>
22935#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
22936# error "stdio definitions not found"
22937#endif
22938
22939int
22940main ()
22941{
22942
22943 ;
22944 return 0;
22945}
22946_ACEOF
22947if ac_fn_c_try_cpp "$LINENO"; then :
22948 emacs_pending_output=new
22949else
22950 emacs_pending_output=unknown
22951fi
22952rm -f conftest.err conftest.$ac_ext
22953
22954 if test $emacs_pending_output = unknown; then
22955 case $opsys in
22956 gnu-linux | gnu-kfreebsd)
22957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22958/* end confdefs.h. */
22959
22960#include <stdio.h>
22961#ifndef __UCLIBC__
22962# error "not using uclibc"
22963#endif
22964
22965int
22966main ()
22967{
22968
22969 ;
22970 return 0;
22971}
22972_ACEOF
22973if ac_fn_c_try_cpp "$LINENO"; then :
22974 emacs_pending_output=uclibc
22975else
22976 emacs_pending_output=old
22977fi
22978rm -f conftest.err conftest.$ac_ext
22979 ;;
22980 esac
22981 fi
22982
22983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
22984$as_echo "$emacs_pending_output" >&6; }
22985
22986 case $emacs_pending_output in
22987 new)
22988 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
22989
22990 ;;
22991 uclibc)
22992 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
22993
22994 ;;
22995 old)
22996 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
22997
22998 ;;
22999 esac
23000 ;;
23001esac
23002
23003
23004
23005
23006
23007case $opsys in
23008 gnu)
23009 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
23010
23011 ;;
23012
23013 hpux*)
23014 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
23015
23016 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
23017
23018 ;;
23019 irix6-5)
23020 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
23021
23022 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
23023
23024 ;;
23025esac
23026
23027
23028
23029
23030
23031case $opsys in
23032 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
23033 ;;
23034
23035 gnu | freebsd | netbsd | openbsd )
23036
23037$as_echo "#define TABDLY OXTABS" >>confdefs.h
23038
23039 $as_echo "#define TAB3 OXTABS" >>confdefs.h
23040
23041 ;;
23042
23043 gnu-linux | gnu-kfreebsd )
23044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23045/* end confdefs.h. */
23046
23047#ifndef __i386__
23048# error "not i386"
23049#endif
23050
23051int
23052main ()
23053{
23054
23055 ;
23056 return 0;
23057}
23058_ACEOF
23059if ac_fn_c_try_cpp "$LINENO"; then :
23060 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
23061
23062fi
23063rm -f conftest.err conftest.$ac_ext
23064
23065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23066/* end confdefs.h. */
23067
23068#ifndef __ia64__
23069# error "not ia64"
23070#endif
23071
23072int
23073main ()
23074{
23075
23076 ;
23077 return 0;
23078}
23079_ACEOF
23080if ac_fn_c_try_cpp "$LINENO"; then :
23081
23082$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
23083
23084fi
23085rm -f conftest.err conftest.$ac_ext
23086 ;;
23087
23088 hpux*)
23089
23090$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
23091
23092 ;;
23093
23094 irix6-5)
23095 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
23096
23097 ;;
23098esac
23099
23100
23101
23102
23103
23104
23105
23106case $opsys in
23107 aix4-2 | hpux* | unixware)
23108 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
23109
23110 ;;
23111
23112 gnu-linux | gnu-kfreebsd )
23113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23114/* end confdefs.h. */
23115
23116#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
23117 || defined __alpha__ || defined __mips__ || defined __s390__ \
23118 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
23119 || defined __ia64__ || defined __sh__
23120/* ok */
23121#else
23122# error "setjmp not known to work on this arch"
23123#endif
23124
23125int
23126main ()
23127{
23128
23129 ;
23130 return 0;
23131}
23132_ACEOF
23133if ac_fn_c_try_cpp "$LINENO"; then :
23134 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
23135
23136else
23137 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
23138
23139fi
23140rm -f conftest.err conftest.$ac_ext
23141 ;;
23142esac
23143
23144
23145if test x$GCC = xyes; then
23146 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
23147
23148else
23149 case $opsys in
23150 freebsd | netbsd | openbsd | irix6-5 | sol2* )
23151 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
23152
23153 ;;
23154 esac
23155fi
23156
23157case $opsys in
23158 hpux* | sol2* )
23159
23160$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
23161
23162 ;;
23163esac
23164
23165
23166
23167
23168
23169
23170
23171case $opsys in
23172 aix4-2)
23173 $as_echo "#define USG /**/" >>confdefs.h
23174
23175 $as_echo "#define USG5 /**/" >>confdefs.h
23176
23177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23178/* end confdefs.h. */
23179
23180#ifndef _AIX
23181# error "_AIX not defined"
23182#endif
23183
23184int
23185main ()
23186{
23187
23188 ;
23189 return 0;
23190}
23191_ACEOF
23192if ac_fn_c_try_cpp "$LINENO"; then :
23193
23194else
23195
23196$as_echo "#define _AIX /**/" >>confdefs.h
23197
23198fi
23199rm -f conftest.err conftest.$ac_ext
23200 ;;
23201
23202 cygwin)
23203 opsysfile=
23204
23205$as_echo "#define CYGWIN 1" >>confdefs.h
23206
23207 ;;
23208
23209 darwin)
23210 $as_echo "#define BSD4_2 /**/" >>confdefs.h
23211
23212 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
23213
23214
23215$as_echo "#define DARWIN_OS /**/" >>confdefs.h
23216
23217 ;;
23218
23219 freebsd)
23220 $as_echo "#define BSD4_2 /**/" >>confdefs.h
23221
23222
23223$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
23224
23225 ;;
23226
23227 gnu | netbsd | openbsd )
23228 $as_echo "#define BSD4_2 /**/" >>confdefs.h
23229
23230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23231/* end confdefs.h. */
23232
23233#ifndef BSD_SYSTEM
23234# error "BSD_SYSTEM not defined"
23235#endif
23236
23237int
23238main ()
23239{
23240
23241 ;
23242 return 0;
23243}
23244_ACEOF
23245if ac_fn_c_try_cpp "$LINENO"; then :
23246
23247else
23248 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
23249
23250fi
23251rm -f conftest.err conftest.$ac_ext
23252 ;;
23253
23254 gnu-linux | gnu-kfreebsd )
23255 $as_echo "#define USG /**/" >>confdefs.h
23256
23257
23258$as_echo "#define GNU_LINUX /**/" >>confdefs.h
23259
23260 ;;
23261
23262 hpux*)
23263 $as_echo "#define USG /**/" >>confdefs.h
23264
23265 $as_echo "#define USG5 /**/" >>confdefs.h
23266
23267
23268$as_echo "#define HPUX /**/" >>confdefs.h
23269
23270 ;;
23271
23272 irix6-5)
23273 $as_echo "#define USG /**/" >>confdefs.h
23274
23275 $as_echo "#define USG5 /**/" >>confdefs.h
23276
23277
23278$as_echo "#define IRIX6_5 /**/" >>confdefs.h
23279
23280 ;;
23281
23282 sol2*)
23283 $as_echo "#define USG /**/" >>confdefs.h
23284
23285 $as_echo "#define USG5 /**/" >>confdefs.h
23286
23287
23288$as_echo "#define SOLARIS2 /**/" >>confdefs.h
23289
23290 ;;
23291
23292 unixware)
23293 $as_echo "#define USG /**/" >>confdefs.h
23294
23295 $as_echo "#define USG5 /**/" >>confdefs.h
23296
23297 ;;
23298esac
23299
23300
23301case $opsys in
23302 cygwin)
23303
23304$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
23305
23306 ;;
23307
23308 gnu) opsysfile= ;;
23309
23310 gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
23311
23312 hpux11)
23313
23314$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
23315
23316
23317$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
23318
23319
23320 opsysfile="s/hpux10-20.h"
23321 ;;
23322
23323 irix6-5)
23324
23325$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
23326
23327
23328$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
23329
23330 ;;
23331
23332 openbsd) opsysfile="s/netbsd.h" ;;
23333
23334 sol2-10)
23335
23336$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
23337
23338 opsysfile="s/sol2-6.h"
23339 ;;
23340esac
23341
23342# Set up the CFLAGS for real compilation, so we can substitute it.
23343CFLAGS="$REAL_CFLAGS"
23344CPPFLAGS="$REAL_CPPFLAGS"
23345
23346## Hack to detect a buggy GCC version.
23347if test "x$GCC" = xyes \
23348 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
23349 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
23350 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
23351 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
23352fi
23353
23354version=$PACKAGE_VERSION
23355
23356### Specify what sort of things we'll be editing into Makefile and config.h.
23357### Use configuration here uncanonicalized to avoid exceeding size limits.
23358
23359
23360## Unused?
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
23384## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
23385## end of LIBX_BASE, but nothing ever set it.
23386
23387
23388
23389
23390## Used in lwlib/Makefile.in.
23391
23392if test -n "${opsysfile}"; then
23393 S_FILE="\$(srcdir)/${opsysfile}"
23394else
23395 S_FILE=
23396fi
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406cat >>confdefs.h <<_ACEOF
23407#define EMACS_CONFIGURATION "${canonical}"
23408_ACEOF
23409
23410
23411cat >>confdefs.h <<_ACEOF
23412#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23413_ACEOF
23414
23415if test -n "$opsysfile"; then
23416
23417cat >>confdefs.h <<_ACEOF
23418#define config_opsysfile "${opsysfile}"
23419_ACEOF
23420
23421fi
23422
23423XMENU_OBJ=
23424XOBJ=
23425FONT_OBJ=
23426if test "${HAVE_X_WINDOWS}" = "yes" ; then
23427
23428$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
23429
23430 XMENU_OBJ=xmenu.o
23431 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
23432 FONT_OBJ=xfont.o
23433 if test "$HAVE_XFT" = "yes"; then
23434 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
23435 elif test "$HAVE_FREETYPE" = "yes"; then
23436 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
23437 fi
23438
23439fi
23440
23441
23442
23443
23444WIDGET_OBJ=
23445MOTIF_LIBW=
23446if test "${USE_X_TOOLKIT}" != "none" ; then
23447 WIDGET_OBJ=widget.o
23448
23449$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
23450
23451 if test "${USE_X_TOOLKIT}" = "LUCID"; then
23452
23453$as_echo "#define USE_LUCID 1" >>confdefs.h
23454
23455 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
23456
23457$as_echo "#define USE_MOTIF 1" >>confdefs.h
23458
23459 MOTIF_LIBW=-lXm
23460 case "$opsys" in
23461 gnu-linux)
23462 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
23463 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
23464 ;;
23465
23466 unixware)
23467 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
23468 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
23469 MOTIF_LIBW="MOTIF_LIBW -lXimp"
23470 ;;
23471
23472 aix4-2)
23473 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
23474 MOTIF_LIBW="$MOTIF_LIBW -li18n"
23475 ;;
23476 esac
23477 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
23478 fi
23479fi
23480
23481
23482TOOLKIT_LIBW=
23483case "$USE_X_TOOLKIT" in
23484 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
23485 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
23486 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
23487esac
23488
23489
23490if test "$USE_X_TOOLKIT" = "none"; then
23491 LIBXT_OTHER="\$(LIBXSM)"
23492 OLDXMENU_TARGET="really-oldXMenu"
23493else
23494 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
23495 OLDXMENU_TARGET="really-lwlib"
23496fi
23497
23498
23499## The X Menu stuff is present in the X10 distribution, but missing
23500## from X11. If we have X10, just use the installed library;
23501## otherwise, use our own copy.
23502if test "${HAVE_X11}" = "yes" ; then
23503
23504$as_echo "#define HAVE_X11 1" >>confdefs.h
23505
23506
23507 if test "$USE_X_TOOLKIT" = "none"; then
23508 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
23509 else
23510 OLDXMENU="\${lwlibdir}/liblw.a"
23511 fi
23512 LIBXMENU="\$(OLDXMENU)"
23513 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
23514 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
23515else
23516 ## For a syntactically valid Makefile; not actually used for anything.
23517 ## See comments in src/Makefile.in.
23518 OLDXMENU=nothing
23519 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
23520 if test "${HAVE_X_WINDOWS}" = "yes"; then
23521 LIBXMENU="-lXMenu"
23522 else
23523 LIBXMENU=
23524 fi
23525 LIBX_OTHER=
23526 OLDXMENU_DEPS=
23527fi
23528
23529if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
23530 OLDXMENU_TARGET=
23531 OLDXMENU=nothing
23532 LIBXMENU=
23533 OLDXMENU_DEPS=
23534fi
23535
23536
23537
23538
23539
23540
23541
23542if test "${HAVE_MENUS}" = "yes" ; then
23543
23544$as_echo "#define HAVE_MENUS 1" >>confdefs.h
23545
23546fi
23547
23548if test "${GNU_MALLOC}" = "yes" ; then
23549
23550$as_echo "#define GNU_MALLOC 1" >>confdefs.h
23551
23552fi
23553
23554RALLOC_OBJ=
23555if test "${REL_ALLOC}" = "yes" ; then
23556
23557$as_echo "#define REL_ALLOC 1" >>confdefs.h
23558
23559
23560 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
23561fi
23562
23563
23564if test "$opsys" = "cygwin"; then
23565 CYGWIN_OBJ="sheap.o"
23566 ## Cygwin differs because of its unexec().
23567 PRE_ALLOC_OBJ=
23568 POST_ALLOC_OBJ=lastfile.o
23569else
23570 CYGWIN_OBJ=
23571 PRE_ALLOC_OBJ=lastfile.o
23572 POST_ALLOC_OBJ=
23573fi
23574
23575
23576
23577 23591
23578case "$opsys" in 23592case "$opsys" in
23579 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; 23593 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
@@ -23726,7 +23740,11 @@ fi
23726#### It makes printing result more understandable as using GTK sets 23740#### It makes printing result more understandable as using GTK sets
23727#### toolkit_scroll_bars to yes by default. 23741#### toolkit_scroll_bars to yes by default.
23728if test "${HAVE_GTK}" = "yes"; then 23742if test "${HAVE_GTK}" = "yes"; then
23729 USE_X_TOOLKIT=GTK 23743 if test "${with_gtk3}" = "yes"; then
23744 USE_X_TOOLKIT=GTK3
23745 else
23746 USE_X_TOOLKIT=GTK
23747 fi
23730fi 23748fi
23731 23749
23732echo " 23750echo "