📄 configure
字号:
/* * First, make a file with some known garbage in it. */ data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) *(data + i) = rand(); umask(0); fd = creat("conftestmmap", 0600); if (fd < 0) exit(1); if (write(fd, data, pagesize) != pagesize) exit(1); close(fd); /* * 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("conftestmmap", O_RDWR); if (fd < 0) exit(1); data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit(1); /* * 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 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit(1); close(fd); unlink("conftestmmap"); exit(0);}EOFif { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen ac_cv_func_mmap_fixed_mapped=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_mmap_fixed_mapped=nofirm -fr conftest*fifiecho "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF#define HAVE_MMAP 1EOFfi for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \unistd.h sys/param.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1870: checking for $ac_hdr" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1875 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidone for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \strdup __argz_count __argz_stringify __argz_nextdoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:1910: checking for $ac_func" >&5if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1915 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char $ac_func();int main() {/* 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#else$ac_func();#endif; return 0; }EOFif { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <<EOF#define $ac_tr_func 1EOF else echo "$ac_t""no" 1>&6fidone if test "${ac_cv_func_stpcpy+set}" != "set"; then for ac_func in stpcpydoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:1967: checking for $ac_func" >&5if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1972 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char $ac_func();int main() {/* 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#else$ac_func();#endif; return 0; }EOFif { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <<EOF#define $ac_tr_func 1EOF else echo "$ac_t""no" 1>&6fidone fi if test "${ac_cv_func_stpcpy}" = "yes"; then cat >> confdefs.h <<\EOF#define HAVE_STPCPY 1EOF fi if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6echo "configure:2029: checking for LC_MESSAGES" >&5if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2034 "configure"#include "confdefs.h"#include <locale.h>int main() {return LC_MESSAGES; return 0; }EOFif { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* am_cv_val_LC_MESSAGES=nofirm -f conftest*fiecho "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >> confdefs.h <<\EOF#define HAVE_LC_MESSAGES 1EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6echo "configure:2062: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given.if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enablevalelse USE_NLS=yesfi echo "$ac_t""$USE_NLS" 1>&6 USE_INCLUDED_LIBINTL=no if test "$USE_NLS" = "yes"; then # Extract the first word of "gettext", so it can be a program name with args.set dummy gettext; ac_word=$2echo $ac_n "checking for $ac_word""... $ac_c" 1>&6echo "configure:2080: checking for $ac_word" >&5if eval "test \"`echo '$''{'ac_cv_path_GETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else case "$GETTEXT" in /*) ac_cv_path_GETTEXT="$GETTEXT" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GETTEXT="$GETTEXT" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GETTEXT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GETTEXT" && ac_cv_path_GETTEXT="no" ;;esacfiGETTEXT="$ac_cv_path_GETTEXT"if test -n "$GETTEXT"; then echo "$ac_t""$GETTEXT" 1>&6else echo "$ac_t""no" 1>&6fi cat >> confdefs.h <<\EOF#define ENABLE_NLS 1EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6echo "configure:2118: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given.if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" nls_cv_force_use_gnu_gettext=$withvalelse nls_cv_force_use_gnu_gettext=nofi echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`echo $ac_n "checking for libintl.h""... $ac_c" 1>&6echo "configure:2137: checking for libintl.h" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2142 "configure"#include "confdefs.h"#include <libintl.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6echo "configure:2164: checking for gettext in libc" >&5if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2169 "configure"#include "confdefs.h"#include <libintl.h>int main() {return (int) gettext (""); return 0; }EOFif { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* gt_cv_func_gettext_libc=nofirm -f conftest*fiecho "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6echo "configure:2192: checking for bindtextdomain in -lintl" >&5ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lintl $LIBS"cat > conftest.$ac_ext <<EOF#line 2200 "configure"#include "confdefs.h"/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char bindtextdomain();int main() {bindtextdomain(); return 0; }EOFif { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6echo "configure:2227: checking for gettext in libintl" >&5if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -