From: Joakim Verona Date: Mon, 14 Jun 2010 09:48:51 +0000 (+0200) Subject: merged from trunk X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~511^2~47 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c05c21ed109720d66c834a0c5b21ea29416683a6;p=emacs.git merged from trunk --- c05c21ed109720d66c834a0c5b21ea29416683a6 diff --cc configure index d06764e2601,3ced885c3f7..d1f5f6cde78 --- a/configure +++ b/configure @@@ -731,10 -690,10 +690,12 @@@ DBUS_CFLAG GTK_OBJ GTK_LIBS GTK_CFLAGS +IMAGEMAGICK_LIBS +IMAGEMAGICK_CFLAGS RSVG_LIBS RSVG_CFLAGS + VMLIMIT_OBJ + GMALLOC_OBJ HAVE_XSERVER LIB_STANDARD NS_SUPPORT @@@ -781,6 -745,6 +747,7 @@@ build_vendo build_cpu build MAINT ++GZIP_INFO target_alias host_alias build_alias @@@ -850,8 -815,6 +819,7 @@@ with_dbu with_gconf with_selinux with_makeinfo - with_gtk - with_gcc ++with_compress_info with_pkg_config_prog with_crt_dir with_gnustep_conf @@@ -1566,7 -1517,6 +1523,7 @@@ Optional Packages --without-gconf don't compile with GConf support --without-selinux don't compile with SELinux support --without-makeinfo don't require makeinfo for building manuals - ++ --without-compress-info don't compress the installed Info pages --with-pkg-config-prog=PATH path to pkg-config for finding GTK and librsvg --with-crt-dir=DIR directory containing crtn.o etc. The default is @@@ -11151,341 -2075,431 +2082,432 @@@ return $2 () return 0; } _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthreads_cma_open=yes + if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthreads_cma_open=no + eval "$3=no" + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + } # ac_fn_c_check_func + + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES + # ------------------------------------------- + # Tests whether TYPE exists after having included INCLUDES, setting cache + # variable VAR accordingly. + ac_fn_c_check_type () + { + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $4 + int + main () + { + if (sizeof ($2)) + return 0; + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $4 + int + main () + { + if (sizeof (($2))) + return 0; + ; + return 0; + } + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + + else + eval "$3=yes" fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5 - $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } - if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBPTHREADS 1 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_check_type + cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by emacs $as_me 24.0.50, which was + generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + _ACEOF + exec 5>>config.log + { + cat <<_ASUNAME + ## --------- ## + ## Platform. ## + ## --------- ## - LIBS="-lpthreads $LIBS" + hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` + uname -m = `(uname -m) 2>/dev/null || echo unknown` + uname -r = `(uname -r) 2>/dev/null || echo unknown` + uname -s = `(uname -s) 2>/dev/null || echo unknown` + uname -v = `(uname -v) 2>/dev/null || echo unknown` - fi + /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` + /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` + /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + _ASUNAME - ## Note: when using cpp in s/aix4.2.h, this definition depended on - ## HAVE_LIBPTHREADS. That was not defined earlier in configure when - ## the system file was sourced. Hence the value of LIBS_SYSTEM - ## added to LIBS in configure would never contain the pthreads part, - ## but the value used in Makefiles might. FIXME? - ## - ## -lpthreads seems to be necessary for Xlib in X11R6, and should - ## be harmless on older versions of X where it happens to exist. - test "$opsys" = "aix4-2" && \ - test $ac_cv_lib_pthreads_cma_open = yes && \ - LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done + IFS=$as_save_IFS + } >&5 - case ${host_os} in - aix*) - { $as_echo "$as_me:$LINENO: checking for -bbigtoc option" >&5 - $as_echo_n "checking for -bbigtoc option... " >&6; } - if test "${gdb_cv_bigtoc+set}" = set; then - $as_echo_n "(cached) " >&6 - else + cat >&5 <<_ACEOF - case $GCC in - yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; - *) gdb_cv_bigtoc=-bbigtoc ;; + + ## ----------- ## + ## Core tests. ## + ## ----------- ## + + _ACEOF + + + # Keep a trace of the command line. + # Strip out --no-create and --no-recursion so they do not pile up. + # Strip out --silent because we don't want to record it for future runs. + # Also quote any args containing shell meta-characters. + # Make two passes to allow for proper duplicate-argument suppression. + ac_configure_args= + ac_configure_args0= + ac_configure_args1= + ac_must_keep_next=false + for ac_pass in 1 2 + do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; esac + done + done + { ac_configure_args0=; unset ac_configure_args0;} + { ac_configure_args1=; unset ac_configure_args1;} - LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. + # WARNING: Use '\'' to represent an apostrophe within the trap. + # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo - int - main () - { - int i; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - : - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + cat <<\_ASBOX + ## ---------------- ## + ## Cache variables. ## + ## ---------------- ## + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, + ( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 + $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort + ) + echo - gdb_cv_bigtoc= - fi + cat <<\_ASBOX + ## ----------------- ## + ## Output variables. ## + ## ----------------- ## + _ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + if test -n "$ac_subst_files"; then + cat <<\_ASBOX + ## ------------------- ## + ## File substitutions. ## + ## ------------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi - fi - { $as_echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5 - $as_echo "$gdb_cv_bigtoc" >&6; } - ;; - esac + if test -s confdefs.h; then + cat <<\_ASBOX + ## ----------- ## + ## confdefs.h. ## + ## ----------- ## + _ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + done + ac_signal=0 - # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets - # used for the tests that follow. We set them back to REAL_CFLAGS and - # REAL_CPPFLAGS later on. + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -f -r conftest* confdefs.h - REAL_CPPFLAGS="$CPPFLAGS" + $as_echo "/* confdefs.h */" > confdefs.h - if test "${HAVE_X11}" = "yes"; then - DEFS="$C_SWITCH_X_SITE $DEFS" - LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" - LIBS="$LIBX $LIBS" - CFLAGS="$C_SWITCH_X_SITE $CFLAGS" - CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" + # Predefined preprocessor variables. - # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. - # This is handled by LD_SWITCH_X_SITE_AUX during the real build, - # but it's more convenient here to set LD_RUN_PATH - # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. - if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then - LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH - export LD_RUN_PATH - fi + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF - if test "${opsys}" = "gnu-linux"; then - { $as_echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5 - $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - int - main () - { - XOpenDisplay ("foo"); - ; - return 0; - } + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - xlinux_first_failure=no - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - xlinux_first_failure=yes - fi + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if test "${xlinux_first_failure}" = "yes"; then - OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" - OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" - OLD_CPPFLAGS="$CPPFLAGS" - OLD_LIBS="$LIBS" - LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" - C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" - CPPFLAGS="$CPPFLAGS -b i486-linuxaout" - LIBS="$LIBS -b i486-linuxaout" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - int - main () - { - XOpenDisplay ("foo"); - ; - return 0; - } + cat >>confdefs.h <<_ACEOF + #define PACKAGE_URL "$PACKAGE_URL" _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - xlinux_second_failure=no - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - xlinux_second_failure=yes + + # Let the site file select an alternate cache file if it wants to. + # Prefer an explicitly selected file to automatically selected ones. + ac_site_file1=NONE + ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE + elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site + else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi + for ac_site_file in "$ac_site_file1" "$ac_site_file2" + do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + $as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi + done - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if test "${xlinux_second_failure}" = "yes"; then - # If we get the same failure with -b, there is no use adding -b. - # So take it out. This plays safe. - LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" - C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" - CPPFLAGS="$OLD_CPPFLAGS" - LIBS="$OLD_LIBS" - { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - fi - else - { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi + if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 + $as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac fi - - # Reportedly, some broken Solaris systems have XKBlib.h but are missing - # header files included from there. - { $as_echo "$as_me:$LINENO: checking for Xkb" >&5 - $as_echo_n "checking for Xkb... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include - int - main () - { - XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - emacs_xkb=yes else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 + $as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi - emacs_xkb=no + as_fn_append ac_header_list " stdlib.h" + as_fn_append ac_header_list " unistd.h" + as_fn_append ac_header_list " sys/param.h" ++as_fn_append ac_func_list " MagickExportImagePixels" + as_fn_append ac_header_list " sys/time.h" + as_fn_append ac_func_list " alarm" + # Check that the precious variables saved in the cache have kept the same + # value. + ac_cache_corrupted=false + for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 + $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 + $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 + $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 + $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi + done + if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi + ## -------------------- ## + ## Main body of script. ## + ## -------------------- ## - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $emacs_xkb" >&5 - $as_echo "$emacs_xkb" >&6; } - if test $emacs_xkb = yes; then + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >>confdefs.h <<\_ACEOF - #define HAVE_XKBGETKEYBOARD 1 - _ACEOF - fi + ac_config_headers="$ac_config_headers src/config.h:src/config.in" @@@ -11832,178 -2635,112 +2643,120 @@@ f - if test "$PKG_CONFIG" = "no" ; then - : - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $IMAGEMAGICK_MODULE" >&5 - $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } + # Check whether --with-sync-input was given. + if test "${with_sync_input+set}" = set; then : + withval=$with_sync_input; + else + with_sync_input=yes + fi - if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - succeeded=yes + if test "$with_sync_input" = yes; then - { $as_echo "$as_me:$LINENO: checking IMAGEMAGICK_CFLAGS" >&5 - $as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } - IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:$LINENO: result: $IMAGEMAGICK_CFLAGS" >&5 - $as_echo "$IMAGEMAGICK_CFLAGS" >&6; } + $as_echo "#define SYNC_INPUT 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: checking IMAGEMAGICK_LIBS" >&5 - $as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } - IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:$LINENO: result: $IMAGEMAGICK_LIBS" >&5 - $as_echo "$IMAGEMAGICK_LIBS" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - IMAGEMAGICK_CFLAGS="" - IMAGEMAGICK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` + fi - fi + # Check whether --with-x-toolkit was given. + if test "${with_x_toolkit+set}" = set; then : + withval=$with_x_toolkit; case "${withval}" in + y | ye | yes ) val=gtk ;; + n | no ) val=no ;; + l | lu | luc | luci | lucid ) val=lucid ;; + a | at | ath | athe | athen | athena ) val=athena ;; + m | mo | mot | moti | motif ) val=motif ;; + g | gt | gtk ) val=gtk ;; + * ) + as_fn_error "\`--with-x-toolkit=$withval' is invalid; + this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'. + \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 + ;; + esac + with_x_toolkit=$val + fi - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - if test $succeeded = yes; then - : - else - : - fi + # Check whether --with-xpm was given. + if test "${with_xpm+set}" = set; then : + withval=$with_xpm; + else + with_xpm=yes + fi + # Check whether --with-jpeg was given. + if test "${with_jpeg+set}" = set; then : + withval=$with_jpeg; + else + with_jpeg=yes + fi - if test ".${IMAGEMAGICK_CFLAGS}" != "."; then - HAVE_IMAGEMAGICK=yes - cat >>confdefs.h <<\_ACEOF - #define HAVE_IMAGEMAGICK 1 - _ACEOF + # Check whether --with-tiff was given. + if test "${with_tiff+set}" = set; then : + withval=$with_tiff; + else + with_tiff=yes + fi - CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" - LIBS="$IMAGEMAGICK_LIBS $LIBS" - fi + # Check whether --with-gif was given. + if test "${with_gif+set}" = set; then : + withval=$with_gif; + else + with_gif=yes + fi - cat >>confdefs.h <<\_ACEOF - #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 - _ACEOF + # Check whether --with-png was given. + if test "${with_png+set}" = set; then : + withval=$with_png; + else + with_png=yes + fi + # Check whether --with-rsvg was given. + if test "${with_rsvg+set}" = set; then : + withval=$with_rsvg; + else + with_rsvg=yes + fi - for ac_func in $ac_func_list - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 ++# Check whether --with-imagemagick was given. ++if test "${with_imagemagick+set}" = set; then : ++ withval=$with_imagemagick; +else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func ++ with_imagemagick=no ++fi + - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + - #ifdef __STDC__ - # include - #else - # include - #endif - #undef $ac_func + # Check whether --with-xft was given. + if test "${with_xft+set}" = set; then : + withval=$with_xft; + else + with_xft=yes + fi - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + # Check whether --with-libotf was given. + if test "${with_libotf+set}" = set; then : + withval=$with_libotf; else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + with_libotf=yes fi - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF + # Check whether --with-m17n-flt was given. + if test "${with_m17n_flt+set}" = set; then : + withval=$with_m17n_flt; + else + with_m17n_flt=yes fi - done - @@@ -12066,921 -2801,725 +2817,742 @@@ els fi + # Check whether --with-selinux was given. + if test "${with_selinux+set}" = set; then : + withval=$with_selinux; + else + with_selinux=yes + fi - if test "$PKG_CONFIG" = "no" ; then - pkg_check_gtk=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5 - $as_echo_n "checking for $GTK_MODULES... " >&6; } - if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - succeeded=yes + ## For the times when you want to build Emacs but don't have + ## a suitable makeinfo, and can live without the manuals. - { $as_echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 - $as_echo_n "checking GTK_CFLAGS... " >&6; } - GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 - $as_echo "$GTK_CFLAGS" >&6; } + # Check whether --with-makeinfo was given. + if test "${with_makeinfo+set}" = set; then : + withval=$with_makeinfo; + else + with_makeinfo=yes + fi - { $as_echo "$as_me:$LINENO: checking GTK_LIBS" >&5 - $as_echo_n "checking GTK_LIBS... " >&6; } - GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'` - { $as_echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 - $as_echo "$GTK_LIBS" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` - fi ++## This is an option because I do not know if all info/man support ++## compressed files, nor how to test if they do so. + ++# Check whether --with-compress-info was given. ++if test "${with_compress_info+set}" = set; then : ++ withval=$with_compress_info; ++else ++ with_compress_info=yes ++fi ++ ++if test $with_compress_info = yes; then ++ GZIP_INFO=yes ++else ++ GZIP_INFO= ++fi + + - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - if test $succeeded = yes; then - pkg_check_gtk=yes - else - pkg_check_gtk=no - fi + # Check whether --with-pkg-config-prog was given. + if test "${with_pkg_config_prog+set}" = set; then : + withval=$with_pkg_config_prog; + fi - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - { { $as_echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5 - $as_echo "$as_me: error: $GTK_PKG_ERRORS" >&2;} - { (exit 1); exit 1; }; } - fi + if test "X${with_pkg_config_prog}" != X; then + if test "${with_pkg_config_prog}" != yes; then + PKG_CONFIG="${with_pkg_config_prog}" + fi fi + CRT_DIR= - GTK_OBJ= - if test x"$pkg_check_gtk" = xyes; then + # Check whether --with-crt-dir was given. + if test "${with_crt_dir+set}" = set; then : + withval=$with_crt_dir; + fi + CRT_DIR="${with_crt_dir}" - C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" - GTK_COMPILES=no + # Check whether --with-gnustep-conf was given. + if test "${with_gnustep_conf+set}" = set; then : + withval=$with_gnustep_conf; + fi - for ac_func in gtk_main - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ + GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" + test "X$GNUSTEP_CONFIG_FILE" = "X" && \ + GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf + + # Check whether --enable-ns-self-contained was given. + if test "${enable_ns_self_contained+set}" = set; then : + enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func + EN_NS_SELF_CONTAINED=yes + fi - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - #ifdef __STDC__ - # include - #else - # include - #endif + # Check whether --enable-asserts was given. + if test "${enable_asserts+set}" = set; then : + enableval=$enable_asserts; USE_XASSERTS=$enableval + else + USE_XASSERTS=no + fi - #undef $ac_func - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif + # Check whether --enable-maintainer-mode was given. + if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval + else + USE_MAINTAINER_MODE=no + fi - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + if test $USE_MAINTAINER_MODE = yes; then + MAINT= else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + MAINT=# + fi - eval "$as_ac_var=no" + + # Check whether --enable-locallisppath was given. + if test "${enable_locallisppath+set}" = set; then : + enableval=$enable_locallisppath; if test "${enableval}" = "no"; then + locallisppath= + elif test "${enableval}" != "yes"; then + locallisppath=${enableval} fi + fi + - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + # Check whether --enable-checking was given. + if test "${enable_checking+set}" = set; then : + enableval=$enable_checking; ac_checking_flags="${enableval}" fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - GTK_COMPILES=yes + + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," + for check in $ac_checking_flags + do + case $check in + # these set all the flags to specific states + yes) ac_enable_checking=1 ;; + no) ac_enable_checking= ; + ac_gc_check_stringbytes= ; + ac_gc_check_string_overrun= ; + ac_gc_check_string_free_list= ; + ac_xmalloc_overrun= ; + ac_gc_check_cons_list= ;; + all) ac_enable_checking=1 ; + ac_gc_check_stringbytes=1 ; + ac_gc_check_string_overrun=1 ; + ac_gc_check_string_free_list=1 ; + ac_xmalloc_overrun=1 ; + ac_gc_check_cons_list=1 ;; + # these enable particular checks + stringbytes) ac_gc_check_stringbytes=1 ;; + stringoverrun) ac_gc_check_string_overrun=1 ;; + stringfreelist) ac_gc_check_string_free_list=1 ;; + xmallocoverrun) ac_xmalloc_overrun=1 ;; + conslist) ac_gc_check_cons_list=1 ;; + *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; + esac + done + IFS="$ac_save_IFS" + + if test x$ac_enable_checking != x ; then + + $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h + fi - done + if test x$ac_gc_check_stringbytes != x ; then - if test "${GTK_COMPILES}" != "yes"; then - if test "$USE_X_TOOLKIT" != "maybe"; then - { { $as_echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5 - $as_echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;} - { (exit 1); exit 1; }; }; - fi - else - HAVE_GTK=yes + $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF - #define USE_GTK 1 - _ACEOF + fi + if test x$ac_gc_check_stringoverrun != x ; then - GTK_OBJ=gtkutil.o - USE_X_TOOLKIT=none - if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then - : - else - { $as_echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&5 - $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&2;} - sleep 3 - fi - fi + $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h fi + if test x$ac_gc_check_string_free_list != x ; then + $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h + fi + if test x$ac_xmalloc_overrun != x ; then - if test "${HAVE_GTK}" = "yes"; then + $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h - if test "$with_toolkit_scroll_bars" != no; then - with_toolkit_scroll_bars=yes - fi + fi + if test x$ac_gc_check_cons_list != x ; then - HAVE_GTK_MULTIDISPLAY=no + $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h - for ac_func in gdk_display_open - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func + fi - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + # Check whether --enable-profiling was given. + if test "${enable_profiling+set}" = set; then : + enableval=$enable_profiling; ac_enable_profiling="${enableval}" + fi - #ifdef __STDC__ - # include - #else - # include - #endif + if test x$ac_enable_profiling != x ; then + PROFILING_CFLAGS="-DPROFILING=1 -pg" + PROFILING_LDFLAGS="-pg" + else + PROFILING_CFLAGS= + PROFILING_LDFLAGS= + fi - #undef $ac_func + # Check whether --enable-autodepend was given. + if test "${enable_autodepend+set}" = set; then : + enableval=$enable_autodepend; ac_enable_autodepend="${enableval}" + else + ac_enable_autodepend=yes + fi - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + #### Make srcdir absolute, if it isn't already. It's important to + #### avoid running the path through pwd unnecessarily, since pwd can + #### give you automounter prefixes, which can go away. We do all this + #### so Emacs can find its files when run uninstalled. + ## Make sure CDPATH doesn't affect cd (in case PWD is relative). + unset CDPATH + case "${srcdir}" in + /* ) ;; + . ) + ## We may be able to use the $PWD environment variable to make this + ## absolute. But sometimes PWD is inaccurate. + ## Note: we used to use ${PWD} at the end instead of `pwd`, + ## but that tested only for a well-formed and valid PWD, + ## it did not object when PWD was well-formed and valid but just wrong. + if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; + then + srcdir="$PWD" + else + srcdir="`(cd ${srcdir}; pwd)`" + fi + ;; + * ) srcdir="`(cd ${srcdir}; pwd)`" ;; esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + #### Check if the source directory already has a configured system in it. + if test `pwd` != `(cd ${srcdir} && pwd)` \ + && test -f "${srcdir}/src/config.h" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used + as a build directory right now; it has been configured in its own + right. To configure in another directory as well, you MUST + use GNU make. If you do not have GNU make, then you must + now do \`make distclean' in ${srcdir}, + and then run $0 again." >&5 + $as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used + as a build directory right now; it has been configured in its own + right. To configure in another directory as well, you MUST + use GNU make. If you do not have GNU make, then you must + now do \`make distclean' in ${srcdir}, + and then run $0 again." >&2;} fi - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - HAVE_GTK_MULTIDISPLAY=yes - fi + #### Given the configuration name, set machfile and opsysfile to the + #### names of the m/*.h and s/*.h files we should use. + + ### Canonicalize the configuration name. + + ac_aux_dir= + for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done + if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + fi - if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then + # These three variables are undocumented and unsupported, + # and are intended to be withdrawn in a future Autoconf release. + # They can cause serious problems if a builder's source tree is in a directory + # whose full name contains unusual characters. + ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. + ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. + ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - cat >>confdefs.h <<\_ACEOF - #define HAVE_GTK_MULTIDISPLAY 1 - _ACEOF - fi + # Make sure we can run config.sub. + $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - HAVE_GTK_FILE_SELECTION=no - { $as_echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_SELECTION is declared" >&5 - $as_echo_n "checking whether GTK_TYPE_FILE_SELECTION is declared... " >&6; } - if test "${ac_cv_have_decl_GTK_TYPE_FILE_SELECTION+set}" = set; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 + $as_echo_n "checking build system type... " >&6; } + if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default - #include - - int - main () - { - #ifndef GTK_TYPE_FILE_SELECTION - (void) GTK_TYPE_FILE_SELECTION; - #endif + ac_build_alias=$build_alias + test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 + $as_echo "$ac_cv_build" >&6; } + case $ac_cv_build in + *-*-*) ;; + *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_GTK_TYPE_FILE_SELECTION=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + build=$ac_cv_build + ac_save_IFS=$IFS; IFS='-' + set x $ac_cv_build + shift + build_cpu=$1 + build_vendor=$2 + shift; shift + # Remember, the first character of IFS is used to create $*, + # except with old shells: + build_os=$* + IFS=$ac_save_IFS + case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - ac_cv_have_decl_GTK_TYPE_FILE_SELECTION=no - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&5 - $as_echo "$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" >&6; } - if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then - HAVE_GTK_FILE_SELECTION=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 + $as_echo_n "checking host system type... " >&6; } + if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 else - HAVE_GTK_FILE_SELECTION=no + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build + else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi - if test "$HAVE_GTK_FILE_SELECTION" = yes; then - - for ac_func in gtk_file_selection_new - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 + $as_echo "$ac_cv_host" >&6; } + case $ac_cv_host in + *-*-*) ;; + *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; + esac + host=$ac_cv_host + ac_save_IFS=$IFS; IFS='-' + set x $ac_cv_host + shift + host_cpu=$1 + host_vendor=$2 + shift; shift + # Remember, the first character of IFS is used to create $*, + # except with old shells: + host_os=$* + IFS=$ac_save_IFS + case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - #ifdef __STDC__ - # include - #else - # include - #endif + canonical=$host + configuration=${host_alias-${build_alias-$host}} - #undef $ac_func - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + ### If you add support for a new configuration, add code to this + ### switch statement to recognize your configuration name and select + ### the appropriate operating system and machine description files. - eval "$as_ac_var=no" - fi + ### You would hope that you could choose an m/*.h file pretty much + ### based on the machine portion of the configuration name, and an s/*.h + ### file based on the operating system portion. However, it turns out + ### that each m/*.h file is pretty manufacturer-specific - for + ### example mips.h is MIPS + ### So we basically have to have a special case for each + ### configuration name. + ### + ### As far as handling version numbers on operating systems is + ### concerned, make sure things will fail in a fixable way. If + ### /etc/MACHINES doesn't say anything about version numbers, be + ### prepared to handle anything reasonably. If version numbers + ### matter, be sure /etc/MACHINES says something about it. - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - HAVE_GTK_FILE_SELECTION=yes - else - HAVE_GTK_FILE_SELECTION=no - fi - done + machine='' opsys='' unported=no + case "${canonical}" in - fi + ## FreeBSD ports + *-*-freebsd* ) + opsys=freebsd + case "${canonical}" in + alpha*) machine=alpha ;; + amd64-*|x86_64-*) machine=amdx86-64 ;; + arm*) machine=arm ;; + ia64-*) machine=ia64 ;; + i[3456]86-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc-*) machine=sparc ;; + sparc64-*) machine=sparc ;; + esac + ;; - HAVE_GTK_FILE_CHOOSER=no - { $as_echo "$as_me:$LINENO: checking whether GTK_TYPE_FILE_CHOOSER is declared" >&5 - $as_echo_n "checking whether GTK_TYPE_FILE_CHOOSER is declared... " >&6; } - if test "${ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER+set}" = set; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default - #include + ## FreeBSD kernel + glibc based userland + *-*-kfreebsd*gnu* ) + opsys=gnu-kfreebsd + case "${canonical}" in + alpha*) machine=alpha ;; + amd64-*|x86_64-*) machine=amdx86-64 ;; + ia64-*) machine=ia64 ;; + i[3456]86-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc-*) machine=sparc ;; + sparc64-*) machine=sparc ;; + esac + ;; - int - main () - { - #ifndef GTK_TYPE_FILE_CHOOSER - (void) GTK_TYPE_FILE_CHOOSER; - #endif + ## NetBSD ports + *-*-netbsd* ) + opsys=netbsd + case "${canonical}" in + alpha*) machine=alpha ;; + x86_64-*) machine=amdx86-64 ;; + arm-*) machine=arm ;; + hppa-*) machine=hp800 ;; + i[3456]86-*) machine=intel386 ;; + m68k-*) machine=m68k ;; + powerpc-*) machine=macppc ;; + mips-*) machine=mips ;; + mipse[bl]-*) machine=mips ;; + sparc*-) machine=sparc ;; + vax-*) machine=vax ;; + esac + ;; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + ## OpenBSD ports + *-*-openbsd* ) + opsys=openbsd + case "${canonical}" in + alpha*) machine=alpha ;; + x86_64-*) machine=amdx86-64 ;; + arm-*) machine=arm ;; + hppa-*) machine=hp800 ;; + i386-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc*) machine=sparc ;; + vax-*) machine=vax ;; + esac + ;; - ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER=no - fi + alpha*-*-linux-gnu* ) + machine=alpha opsys=gnu-linux + ;; - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&5 - $as_echo "$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" >&6; } - if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then - HAVE_GTK_FILE_CHOOSER=yes - else - HAVE_GTK_FILE_CHOOSER=no - fi + arm*-*-linux-gnu* ) + machine=arm opsys=gnu-linux + ;; - if test "$HAVE_GTK_FILE_CHOOSER" = yes; then + ## Apple Darwin / Mac OS X + *-apple-darwin* ) + case "${canonical}" in + i[3456]86-* ) machine=intel386 ;; + powerpc-* ) machine=macppc ;; + x86_64-* ) machine=amdx86-64 ;; + * ) unported=yes ;; + esac + opsys=darwin + # Define CPP as follows to make autoconf work correctly. + CPP="${CC-cc} -E -no-cpp-precomp" + # Use fink packages if available. + if test -d /sw/include && test -d /sw/lib; then + GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" + CPP="${CPP} ${GCC_TEST_OPTIONS}" + NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} + fi + ;; - for ac_func in gtk_file_chooser_dialog_new - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func + ## HP 9000 series 700 and 800, running HP/UX + hppa*-hp-hpux10.2* ) + machine=hp800 opsys=hpux10-20 + ;; + hppa*-hp-hpux1[1-9]* ) + machine=hp800 opsys=hpux11 + CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS" + ;; - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + hppa*-*-linux-gnu* ) + machine=hp800 opsys=gnu-linux + ;; - #ifdef __STDC__ - # include - #else - # include - #endif + ## IBM machines + s390-*-linux-gnu* ) + machine=ibms390 opsys=gnu-linux + ;; + s390x-*-linux-gnu* ) + machine=ibms390x opsys=gnu-linux + ;; + rs6000-ibm-aix4.[23]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + powerpc-ibm-aix4.[23]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + rs6000-ibm-aix[56]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + powerpc-ibm-aix[56]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; - #undef $ac_func + ## Macintosh PowerPC + powerpc*-*-linux-gnu* ) + machine=macppc opsys=gnu-linux + ;; - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif + ## Silicon Graphics machines + ## Iris 4D + mips-sgi-irix6.5 ) + machine=iris4d opsys=irix6-5 + # Without defining _LANGUAGE_C, things get masked out in the headers + # so that, for instance, grepping for `free' in stdlib.h fails and + # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). + NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" + NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" + ;; - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + ## Suns + sparc-*-linux-gnu* | sparc64-*-linux-gnu* ) + machine=sparc opsys=gnu-linux + ;; + + *-sun-solaris* \ + | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ + | x86_64-*-solaris2* | x86_64-*-sunos5*) + case "${canonical}" in + i[3456]86-*-* ) machine=intel386 ;; + amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; + sparc* ) machine=sparc ;; + * ) unported=yes ;; + esac + case "${canonical}" in + *-sunos5.6* | *-solaris2.6* ) + opsys=sol2-6 + NON_GNU_CPP=/usr/ccs/lib/cpp + RANLIB="ar -ts" + ;; + *-sunos5.[7-9]* | *-solaris2.[7-9]* ) + opsys=sol2-6 + emacs_check_sunpro_c=yes + NON_GNU_CPP=/usr/ccs/lib/cpp + ;; + *-sunos5* | *-solaris* ) + opsys=sol2-10 + emacs_check_sunpro_c=yes + NON_GNU_CPP=/usr/ccs/lib/cpp + ;; + esac + ## Watch out for a compiler that we know will not work. + case "${canonical}" in + *-solaris* | *-sunos5* ) + if [ "x$CC" = x/usr/ucb/cc ]; then + ## /usr/ucb/cc doesn't work; + ## we should find some other compiler that does work. + unset CC + fi + ;; + *) ;; + esac + ;; - eval "$as_ac_var=no" - fi + ## IA-64 + ia64*-*-linux* ) + machine=ia64 opsys=gnu-linux + ;; - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - HAVE_GTK_FILE_CHOOSER=yes - else - HAVE_GTK_FILE_CHOOSER=no - fi - done + ## Intel 386 machines where we don't care about the manufacturer. + i[3456]86-*-* ) + machine=intel386 + case "${canonical}" in + *-cygwin ) opsys=cygwin ;; + *-darwin* ) opsys=darwin + CPP="${CC-cc} -E -no-cpp-precomp" + ;; + *-linux-gnu* ) opsys=gnu-linux ;; + *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + ## Otherwise, we'll fall through to the generic opsys code at the bottom. + esac + ;; - fi + ## m68k Linux-based GNU system + m68k-*-linux-gnu* ) + machine=m68k opsys=gnu-linux + ;; - if test "$HAVE_GTK_FILE_SELECTION" = yes \ - && test "$HAVE_GTK_FILE_CHOOSER" = yes; then + ## Mips Linux-based GNU system + mips-*-linux-gnu* | mipsel-*-linux-gnu* \ + | mips64-*-linux-gnu* | mips64el-*-linux-gnu* ) + machine=mips opsys=gnu-linux + ;; - cat >>confdefs.h <<\_ACEOF - #define HAVE_GTK_FILE_BOTH 1 - _ACEOF + ## AMD x86-64 Linux-based GNU system + x86_64-*-linux-gnu* ) + machine=amdx86-64 opsys=gnu-linux + ;; - fi + ## Tensilica Xtensa Linux-based GNU system + xtensa*-*-linux-gnu* ) + machine=xtensa opsys=gnu-linux + ;; - if test "$HAVE_GTK_FILE_CHOOSER" = yes; then - HAVE_GTK_AND_PTHREAD=no + ## SuperH Linux-based GNU system + sh[34]*-*-linux-gnu* ) + machine=sh3 opsys=gnu-linux + ;; - for ac_header in pthread.h - do - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 - $as_echo_n "checking for $ac_header... " >&6; } - if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - fi - ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - else - # Is the header compilable? - { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 - $as_echo_n "checking $ac_header usability... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default - #include <$ac_header> - _ACEOF - rm -f conftest.$ac_objext - if { (ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + * ) + unported=yes + ;; esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + ### If the code above didn't choose an operating system, just choose + ### an operating system based on the configuration name. You really + ### only want to use this when you have no idea what the right + ### operating system is; if you know what operating systems a machine + ### runs, it's cleaner to make it explicit in the case statement + ### above. + if test x"${opsys}" = x; then + case "${canonical}" in + *-gnu* ) opsys=gnu ;; + * ) + unported=yes + ;; + esac fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - $as_echo "$ac_header_compiler" >&6; } - # Is the header present? - { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 - $as_echo_n "checking $ac_header presence... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include <$ac_header> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + if test $unported = yes; then + as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. + Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 fi - rm -f conftest.err conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 - $as_echo "$ac_header_preproc" >&6; } + machfile="m/${machine}.h" + opsysfile="s/${opsys}.h" - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 - $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 - $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 - $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 - $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 - $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; - esac - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 - $as_echo_n "checking for $ac_header... " >&6; } - if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + #### Choose a compiler. + test -n "$CC" && cc_specified=yes + + # Save the value of CFLAGS that the user specified. + SPECIFIED_CFLAGS="$CFLAGS" + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" - fi - ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS fi - as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + $as_echo "$CC" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } fi - done - if test "$ac_cv_header_pthread_h"; then - { $as_echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5 - $as_echo_n "checking for pthread_self in -lpthread... " >&6; } - if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then + fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lpthread $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char pthread_self (); - int - main () - { - return pthread_self (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthread_pthread_self=yes + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - ac_cv_lib_pthread_pthread_self=no fi - - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5 - $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } - if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then - HAVE_GTK_AND_PTHREAD=yes + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + $as_echo "$ac_ct_CC" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } fi - fi - if test "$HAVE_GTK_AND_PTHREAD" = yes; then - case "${canonical}" in - *-hpux*) ;; - *) GTK_LIBS="$GTK_LIBS -lpthread" ;; - esac - - cat >>confdefs.h <<\_ACEOF - #define HAVE_GTK_AND_PTHREAD 1 - _ACEOF - - fi + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac + CC=$ac_ct_CC fi + else + CC="$ac_cv_prog_CC" fi - HAVE_DBUS=no - DBUS_OBJ= - if test "${with_dbus}" = "yes"; then - - succeeded=no - - # Extract the first word of "pkg-config", so it can be a program name with args. - set dummy pkg-config; ac_word=$2 - { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } - if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@@ -17957,70 -7661,278 +7694,279 @@@ don + for ac_func in getpagesize + do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" + if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_GETPAGESIZE 1 + _ACEOF + fi + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 + $as_echo_n "checking for working mmap... " >&6; } + if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + /* malloc might have been renamed as rpl_malloc. */ + #undef malloc + /* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + #include + #include + #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H + char *malloc (); + #endif + /* This mess was copied from the GNU getpagesize.h. */ + #ifndef HAVE_GETPAGESIZE + # ifdef _SC_PAGESIZE + # define getpagesize() sysconf(_SC_PAGESIZE) + # else /* no _SC_PAGESIZE */ + # ifdef HAVE_SYS_PARAM_H + # include + # ifdef EXEC_PAGESIZE + # define getpagesize() EXEC_PAGESIZE + # else /* no EXEC_PAGESIZE */ + # ifdef NBPG + # define getpagesize() NBPG * CLSIZE + # ifndef CLSIZE + # define CLSIZE 1 + # endif /* no CLSIZE */ + # else /* no NBPG */ + # ifdef NBPC + # define getpagesize() NBPC + # else /* no NBPC */ + # ifdef PAGESIZE + # define getpagesize() PAGESIZE + # endif /* PAGESIZE */ + # endif /* no NBPC */ + # endif /* no NBPG */ + # endif /* no EXEC_PAGESIZE */ + # else /* no HAVE_SYS_PARAM_H */ + # define getpagesize() 8192 /* punt totally */ + # endif /* no HAVE_SYS_PARAM_H */ + # endif /* no _SC_PAGESIZE */ + #endif /* no HAVE_GETPAGESIZE */ + int + main () + { + char *data, *data2, *data3; ++ const char *cdata2; + int i, pagesize; + int fd, fd2; + pagesize = getpagesize (); + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; - data2 = ""; - if (write (fd2, data2, 1) != 1) ++ cdata2 = ""; ++ if (write (fd2, cdata2, 1) != 1) + return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); ++ data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes + else + ac_cv_func_mmap_fixed_mapped=no + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 + $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } + if test $ac_cv_func_mmap_fixed_mapped = yes; then + $as_echo "#define HAVE_MMAP 1" >>confdefs.h + fi + rm -f conftest.mmap conftest.txt + if test $use_mmap_for_buffers = yes; then + REL_ALLOC=no + fi + LIBS="$LIBS_SYSTEM $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 + $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } + if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldnet $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dnet_ntoa (); + int + main () + { + return dnet_ntoa (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_dnet_ntoa=yes + else + ac_cv_lib_dnet_dnet_ntoa=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 + $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } + if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBDNET 1 + _ACEOF + LIBS="-ldnet $LIBS" + fi - for ac_func in gethostname getdomainname dup2 \ - rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ - random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \ - strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ - utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ - __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ - sendto recvfrom getsockopt setsockopt getsockname getpeername \ - gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \ - memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ - cfmakeraw cfsetspeed isnan copysign - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 + $as_echo_n "checking for main in -lXbsd... " >&6; } + if test "${ac_cv_lib_Xbsd_main+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS + LIBS="-lXbsd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - #ifdef __STDC__ - # include - #else - # include - #endif + int + main () + { + return main (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xbsd_main=yes + else + ac_cv_lib_Xbsd_main=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 + $as_echo "$ac_cv_lib_Xbsd_main" >&6; } + if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : + LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" + fi - #undef $ac_func + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 + $as_echo_n "checking for cma_open in -lpthreads... " >&6; } + if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpthreads $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@@ -18392,264 -8304,65 +8338,199 @@@ $as_echo "no" >&6; + if test ".${RSVG_CFLAGS}" != "."; then + HAVE_RSVG=yes + $as_echo "#define HAVE_RSVG 1" >>confdefs.h + CFLAGS="$CFLAGS $RSVG_CFLAGS" + LIBS="$RSVG_LIBS $LIBS" + fi + fi ++fi + ++HAVE_IMAGEMAGICK=no ++if test "${with_imagemagick}" != "no"; then ++ IMAGEMAGICK_MODULE="Wand" + ++ succeeded=no + ++ # Extract the first word of "pkg-config", so it can be a program name with args. ++set dummy pkg-config; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $PKG_CONFIG in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + ++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ++ ;; ++esac ++fi ++PKG_CONFIG=$ac_cv_path_PKG_CONFIG ++if test -n "$PKG_CONFIG"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 ++$as_echo "$PKG_CONFIG" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + + + ++ if test "$PKG_CONFIG" = "no" ; then ++ : ++ else ++ PKG_CONFIG_MIN_VERSION=0.9.0 ++ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 ++$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } + ++ if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ succeeded=yes + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5 ++$as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; } ++ IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5 ++$as_echo "$IMAGEMAGICK_CFLAGS" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5 ++$as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; } ++ IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5 ++$as_echo "$IMAGEMAGICK_LIBS" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ IMAGEMAGICK_CFLAGS="" ++ IMAGEMAGICK_LIBS="" ++ ## If we have a custom action on failure, don't print errors, but ++ ## do set a variable so people can do so. ++ IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` + ++ fi + + + - { $as_echo "$as_me:$LINENO: checking for working mktime" >&5 - $as_echo_n "checking for working mktime... " >&6; } - if test "${ac_cv_func_working_mktime+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test "$cross_compiling" = yes; then - ac_cv_func_working_mktime=no - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Test program from Paul Eggert and Tony Leneis. */ - #ifdef TIME_WITH_SYS_TIME - # include - # include - #else - # ifdef HAVE_SYS_TIME_H - # include - # else - # include - # endif - #endif ++ else ++ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." ++ echo "*** See http://www.freedesktop.org/software/pkgconfig" ++ fi ++ fi + - #include - #include ++ if test $succeeded = yes; then ++ : ++ else ++ : ++ fi + - #ifdef HAVE_UNISTD_H - # include - #endif + - #ifndef HAVE_ALARM - # define alarm(X) /* empty */ - #endif + - /* Work around redefinition to rpl_putenv by other config tests. */ - #undef putenv + - static time_t time_t_max; - static time_t time_t_min; ++ if test ".${IMAGEMAGICK_CFLAGS}" != "."; then ++ HAVE_IMAGEMAGICK=yes + - /* Values we'll use to set the TZ environment variable. */ - static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" - }; - #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) ++$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h + - /* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ - static int - spring_forward_gap () - { - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; ++ CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" ++ LIBS="$IMAGEMAGICK_LIBS $LIBS" ++ fi + - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; - } ++$as_echo "#define HAVE_MAGICKEXPORTIMAGEPIXELS 1" >>confdefs.h + - static int - mktime_test1 (now) - time_t now; - { - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; - } + - static int - mktime_test (now) - time_t now; - { - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); - } + - static int - irix_6_4_bug () - { - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; - } + - static int - bigtime_test (j) - int j; - { - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; - } ++ for ac_func in $ac_func_list ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++eval as_val=\$$as_ac_var ++ if test "x$as_val" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF + - static int - year_2050_test () - { - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; ++fi ++done + - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; + - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + - t = mktime (&tm); + - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); - } + - int - main () - { - time_t t, delta; - int i, j; + fi - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - for (;;) - { - t = (time_t_max << 1) + 1; - if (t <= time_t_max) - break; - time_t_max = t; - } - time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + HAVE_GTK=no + if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then + GLIB_REQUIRED=2.6 + GTK_REQUIRED=2.6 + GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - return 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - return 1; + succeeded=no - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - return 1; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - return 1; - } - return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); - } - _ACEOF - rm -f conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_working_mktime=yes + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - ( exit $ac_status ) - ac_cv_func_working_mktime=no + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac fi - rm -rf conftest.dSYM - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + PKG_CONFIG=$ac_cv_path_PKG_CONFIG + if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 + $as_echo "$PKG_CONFIG" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } fi @@@ -22333,370 -11112,297 +11280,281 @@@ _ACEO fi - fi + done - if test "$resolv" = yes ; then - RESOLVLIB=-lresolv - else - RESOLVLIB= - fi - { $as_echo "$as_me:$LINENO: checking for hes_getmailhost" >&5 - $as_echo_n "checking for hes_getmailhost... " >&6; } - if test "${ac_cv_func_hes_getmailhost+set}" = set; then + + + + + + - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 + $as_echo_n "checking for working mktime... " >&6; } + if test "${ac_cv_func_working_mktime+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_working_mktime=no + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* Define hes_getmailhost to an innocuous variant, in case declares hes_getmailhost. - For example, HP-UX 11i declares gettimeofday. */ - #define hes_getmailhost innocuous_hes_getmailhost - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char hes_getmailhost (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include + /* Test program from Paul Eggert and Tony Leneis. */ + #ifdef TIME_WITH_SYS_TIME + # include + # include #else - # include + # ifdef HAVE_SYS_TIME_H + # include + # else + # include + # endif #endif - #undef hes_getmailhost + #include + #include - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" + #ifdef HAVE_UNISTD_H + # include #endif - char hes_getmailhost (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost - choke me + + #ifndef HAVE_ALARM + # define alarm(X) /* empty */ #endif - int - main () + /* Work around redefinition to rpl_putenv by other config tests. */ + #undef putenv + + static time_t time_t_max; + static time_t time_t_min; + + /* Values we'll use to set the TZ environment variable. */ + static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" + }; + #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + + /* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ + static int + spring_forward_gap () { - return hes_getmailhost (); - ; - return 0; + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_hes_getmailhost=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_hes_getmailhost=no - fi + static int + mktime_test1 (now) + time_t now; + { + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; + } - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5 - $as_echo "$ac_cv_func_hes_getmailhost" >&6; } - if test "x$ac_cv_func_hes_getmailhost" = x""yes; then - : - else - { $as_echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5 - $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } - if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lhesiod $RESOLVLIB $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + static int + mktime_test (now) + time_t now; + { + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); + } - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char hes_getmailhost (); - int - main () + static int + irix_6_4_bug () { - return hes_getmailhost (); - ; - return 0; + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; + } + + static int + bigtime_test (j) + int j; + { + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_hesiod_hes_getmailhost=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hesiod_hes_getmailhost=no - fi + static int + year_2050_test () + { + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 - $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } - if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then - hesiod=yes - else - : - fi + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; - fi + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + t = mktime (&tm); - if test x"$hesiod" = xyes; then + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); + } - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBHESIOD 1 - _ACEOF + int + main () + { + time_t t, delta; + int i, j; - LIBHESIOD=-lhesiod - fi - fi + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; - # Do we need libresolv (due to res_init or Hesiod)? - if test "$resolv" = yes ; then + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBRESOLV 1 - _ACEOF + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + return 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + return 1; - LIBRESOLV=-lresolv + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + return 1; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + return 1; + } + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_working_mktime=yes else - LIBRESOLV= + ac_cv_func_working_mktime=no + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 + $as_echo "$ac_cv_func_working_mktime" >&6; } + if test $ac_cv_func_working_mktime = no; then + case " $LIBOBJS " in + *" mktime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mktime.$ac_objext" + ;; + esac - # These tell us which Kerberos-related libraries to use. - COM_ERRLIB= - CRYPTOLIB= - KRB5LIB= - DESLIB= - KRB4LIB= + fi - if test "${with_kerberos}" != no; then - { $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5 - $as_echo_n "checking for com_err in -lcom_err... " >&6; } - if test "${ac_cv_lib_com_err_com_err+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcom_err $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + if test "$ac_cv_func_working_mktime" = no; then - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char com_err (); - int - main () - { - return com_err (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_com_err_com_err=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "#define BROKEN_MKTIME 1" >>confdefs.h - ac_cv_lib_com_err_com_err=no fi - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5 - $as_echo "$ac_cv_lib_com_err_com_err" >&6; } - if test "x$ac_cv_lib_com_err_com_err" = x""yes; then - have_com_err=yes - else - have_com_err=no - fi + ac_have_func=no # yes means we've found a way to get the load average. - if test $have_com_err = yes; then - COM_ERRLIB=-lcom_err - LIBS="$COM_ERRLIB $LIBS" + # Make sure getloadavg.c is where it belongs, at configure-time. + test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || + as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBCOM_ERR 1 - _ACEOF + ac_save_LIBS=$LIBS - fi - { $as_echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5 - $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } - if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then - $as_echo_n "(cached) " >&6 + # Check for getloadavg, but be sure not to touch the cache variable. + (ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" + if test "x$ac_cv_func_getloadavg" = x""yes; then : + exit 0 else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcrypto $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + exit 1 + fi + ) && ac_have_func=yes - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char mit_des_cbc_encrypt (); - int - main () - { - return mit_des_cbc_encrypt (); - ; - return 0; - } + # On HPUX9, an unprivileged user can get load averages through this function. + for ac_func in pstat_getdynamic + do : + ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" + if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_PSTAT_GETDYNAMIC 1 _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_crypto_mit_des_cbc_encrypt=yes - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_crypto_mit_des_cbc_encrypt=no - fi - - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 - $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } - if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then - have_crypto=yes - else - have_crypto=no fi + done - if test $have_crypto = yes; then - CRYPTOLIB=-lcrypto - LIBS="$CRYPTOLIB $LIBS" - - cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBCRYPTO 1 - _ACEOF - fi - { $as_echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 - $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } - if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then + # Solaris has libkstat which does not require root. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 + $as_echo_n "checking for kstat_open in -lkstat... " >&6; } + if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS diff --cc lisp/image.el index b9cb2067245,287cca81570..96694d11363 --- a/lisp/image.el +++ b/lisp/image.el @@@ -684,33 -685,15 +685,36 @@@ shall be displayed. (let* ((metadata (image-metadata image)) (images (plist-get metadata 'count)) (extdata (plist-get metadata 'extension-data)) - (anim (plist-get extdata #xF9))) - (and (integerp images) (> images 1) - (stringp anim) (>= (length anim) 4) - (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) + (anim (plist-get extdata #xF9)) + (tmo (and (integerp images) (> images 1) + (stringp anim) (>= (length anim) 4) + (+ (aref anim 1) (* (aref anim 2) 256))))) + (when tmo + (if (eq tmo 0) (setq tmo 10)) + (cons images tmo)))))) +(defconst imagemagick-types-inhibit + '(C HTML HTM TXT) + "Types the imagemagick loader should not try to handle.") + +;;;###autoload +(defun imagemagick-register-types () + "Register file types that imagemagick is able to handle." + (let ((im-types (imagemagick-types))) + (dolist im-inhibit + (setq im-types (remove im-inhibit im-types))) + (dolist im-type im-types + (let ((extension (downcase (symbol-name im-type)))) + (push + (cons (concat "\\." extension "\\'") 'image-mode) + auto-mode-alist) + (push + (cons (concat "\\." extension "\\'") 'imagemagick) + image-type-file-name-regexps))))) + + + (provide 'image) ;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3 diff --cc src/Makefile.in index 2719f3a232a,b2fec7eb085..fd95fe6d280 --- a/src/Makefile.in +++ b/src/Makefile.in @@@ -175,67 -281,37 +286,37 @@@ RUN_TEMACS = `/bin/pwd`/temac START_FILES = @START_FILES@ - # ========================== start of cpp stuff ======================= - /* From here on, comments must be done in C syntax. */ - - /* just to be sure the sh is used */ - SHELL=/bin/sh - - #define NOT_C_CODE - #include "config.h" - - #ifdef AUTO_DEPEND - DEPFLAGS = -MMD -MF deps/$*.d - #endif - - /* Do not let the file name mktime.c get messed up. */ - #ifdef mktime - #undef mktime - #endif - - /* Use HAVE_X11 as an alias for X11 in this file - to avoid problems with X11 as a subdirectory name - in -I and other such options which pass through this file. */ - - #ifdef X11 - #define HAVE_X11 - #undef X11 - #endif - - /* On some machines #define register is done in config; - do not let it interfere with this file. */ - #undef register - - /* This macro is for switches specifically related to X Windows. */ - #ifndef LD_SWITCH_X_SITE - #define LD_SWITCH_X_SITE - #endif - - #ifdef NS_IMPL_GNUSTEP - /* Pull in stuff from GNUstep-make. */ - FOUNDATION_LIB=gnu - GUI_LIB=gnu - include @GNUSTEP_MAKEFILES@/Additional/base.make - include @GNUSTEP_MAKEFILES@/Additional/gui.make - shared=no - #endif - - /* DO NOT use -R. There is a special hack described in lastfile.c - which is used instead. Some initialized data areas are modified - at initial startup, then labeled as part of the text area when - Emacs is dumped for the first time, and never changed again. */ - - /* -Demacs is needed to make some files produce the correct version - for use in Emacs. - - -DHAVE_CONFIG_H is needed for some other files to take advantage of - the information in ``config.h''. */ - - /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM - since it may have -I options that should override those two. */ - /* MYCPPFLAGS only referenced in etc/DEBUG. */ - ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${IMAGEMAGICK_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} - ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ + UNEXEC_OBJ = @UNEXEC_OBJ@ + + CANNOT_DUMP=@cannot_dump@ + + DEPDIR=deps + ## -MMD -MF ${DEPDIR}/$*.d if AUTO_DEPEND; else empty. + DEPFLAGS=@DEPFLAGS@ + ## test -d ${DEPDIR} || mkdir ${DEPDIR} (if AUTO_DEPEND); else ':'. + MKDEPDIR=@MKDEPDIR@ + + ## DO NOT use -R. There is a special hack described in lastfile.c + ## which is used instead. Some initialized data areas are modified + ## at initial startup, then labeled as part of the text area when + ## Emacs is dumped for the first time, and never changed again. + ## + ## -Demacs is needed to make some files produce the correct version + ## for use in Emacs. + ## + ## -DHAVE_CONFIG_H is needed for some other files to take advantage of + ## the information in `config.h'. + ## + ## C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM + ## since it may have -I options that should override those. + ## + ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. + ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} \ + ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} \ - ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} \ ++ ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${IMAGEMAGICK_CFLAGS} ${DBUS_CFLAGS} \ + ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \ + ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} + ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) .SUFFIXES: .m .c.o: @@@ -633,16 -577,15 +582,15 @@@ SOME_MACHINE_LISP = ../lisp/mouse.elc ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \ ../lisp/emacs-lisp/easymenu.elc - /* Construct full set of libraries to be linked. - Note that SunOS needs -lm to come before -lc; otherwise, you get - duplicated symbols. If the standard libraries were compiled - with GCC, we might need gnulib again after them. */ - - LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ - $(RSVG_LIBS) ${IMAGEMAGICK_LIBS} $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ $(LIBS_SYSTEM) \ + ## Construct full set of libraries to be linked. + ## Note that SunOS needs -lm to come before -lc; otherwise, you get + ## duplicated symbols. If the standard libraries were compiled + ## with GCC, we might need LIB_GCC again after them. + LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ - $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ ++ $(RSVG_LIBS) ${IMAGEMAGICK_LIBS} $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ - @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ - $(GNULIB_VAR) @LIB_MATH@ @LIB_STANDARD@ $(GNULIB_VAR) + $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ + $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC) all: emacs${EXEEXT} $(OTHER_FILES) diff --cc src/image.c index 3ba36559839,b9620e10948..1ed2fc84af3 --- a/src/image.c +++ b/src/image.c @@@ -8975,11 -8527,8 +9004,11 @@@ non-numeric, there is no explicit limi #endif /* HAVE_RSVG */ defsubr (&Sinit_image_library); +#ifdef HAVE_IMAGEMAGICK + defsubr (&Simagemagick_types); +#endif defsubr (&Sclear_image_cache); - defsubr (&Simage_refresh); + defsubr (&Simage_flush); defsubr (&Simage_size); defsubr (&Simage_mask_p); defsubr (&Simage_metadata); @@@ -9000,18 -8549,16 +9029,20 @@@ A cross is always drawn on black & whit Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, - doc: /* Time after which cached images are removed from the cache. - When an image has not been displayed this many seconds, remove it - from the image cache. Value must be an integer or nil with nil - meaning don't clear the cache. */); - Vimage_cache_eviction_delay = make_number (30 * 60); + doc: /* Maximum time after which images are removed from the cache. + When an image has not been displayed this many seconds, Emacs + automatically removes it from the image cache. If the cache contains + a large number of images, the actual eviction time may be shorter. + The value can also be nil, meaning the cache is never cleared. - + The function `clear-image-cache' disregards this variable. */); + Vimage_cache_eviction_delay = make_number (300); + } +#ifdef HAVE_IMAGEMAGICK + DEFVAR_LISP ("imagemagick-render-type", &Vimagemagick_render_type, + doc: /* */); +#endif - } + void init_image () {