diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-09-25 16:56:08 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-09-25 16:56:08 +0000 |
commit | f28aedff0560f4c0697f24806e03129907205040 (patch) | |
tree | 2f531cedcf52a578e23dad7a78c06cb870adc62d | |
parent | * remove ./intl (diff) | |
download | w3m-f28aedff0560f4c0697f24806e03129907205040.tar.gz w3m-f28aedff0560f4c0697f24806e03129907205040.zip |
check header locale.h
check func setlocale
no need to output intl/Makefile
-rw-r--r-- | acinclude.m4 | 12 | ||||
-rw-r--r-- | aclocal.m4 | 12 | ||||
-rw-r--r-- | config.h.in | 1 | ||||
-rwxr-xr-x | configure | 157 | ||||
-rw-r--r-- | configure.in | 5 |
5 files changed, 171 insertions, 16 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 50dd7ca..e8ae6f3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -167,15 +167,21 @@ else [ --disable-unicode support unicode],, [enable_unicode="yes"]) AC_MSG_RESULT($enable_unicode) - charset=US-ASCII + if test x"$enable_m17n" = xyes; then + charset=US-ASCII + else + charset=$enable_m17n + fi if test x"$enable_unicode" = xyes; then WCCFLAGS="-DUSE_UNICODE $WCCFLAGS" - charset=UTF-8 + if test x"$charset" = xUS-ASCII; then + charset=UTF-8 + fi AC_DEFINE(USE_UNICODE) fi AC_MSG_CHECKING(if japanese support is enabled) AC_ARG_ENABLE(japanese, - [ --enable-japanese=CODE support Japanese character sets + [ --enable-japanese=CODE support Japanese message instead of NLS CODE=(S|E|J|U)],, [enable_japanese="no"]) AC_MSG_RESULT($enable_japanese) @@ -179,15 +179,21 @@ else [ --disable-unicode support unicode],, [enable_unicode="yes"]) AC_MSG_RESULT($enable_unicode) - charset=US-ASCII + if test x"$enable_m17n" = xyes; then + charset=US-ASCII + else + charset=$enable_m17n + fi if test x"$enable_unicode" = xyes; then WCCFLAGS="-DUSE_UNICODE $WCCFLAGS" - charset=UTF-8 + if test x"$charset" = xUS-ASCII; then + charset=UTF-8 + fi AC_DEFINE(USE_UNICODE) fi AC_MSG_CHECKING(if japanese support is enabled) AC_ARG_ENABLE(japanese, - [ --enable-japanese=CODE support Japanese character sets + [ --enable-japanese=CODE support Japanese message instead of NLS CODE=(S|E|J|U)],, [enable_japanese="no"]) AC_MSG_RESULT($enable_japanese) diff --git a/config.h.in b/config.h.in index fad194b..790be75 100644 --- a/config.h.in +++ b/config.h.in @@ -105,6 +105,7 @@ #undef HAVE_TERMIO_H #undef HAVE_SGTTY_H #undef HAVE_DIRENT_H +#undef HAVE_LOCALE_H #define SIZEOF_LONG_LONG 8 #if SIZEOF_LONG_LONG > 0 typedef long long clen_t; @@ -849,7 +849,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-m17n support m17n --disable-unicode support unicode - --enable-japanese=CODE support Japanese character sets + --enable-japanese=CODE support Japanese message instead of NLS CODE=(S|E|J|U) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths @@ -2993,10 +2993,16 @@ else fi; echo "$as_me:$LINENO: result: $enable_unicode" >&5 echo "${ECHO_T}$enable_unicode" >&6 - charset=US-ASCII + if test x"$enable_m17n" = xyes; then + charset=US-ASCII + else + charset=$enable_m17n + fi if test x"$enable_unicode" = xyes; then WCCFLAGS="-DUSE_UNICODE $WCCFLAGS" - charset=UTF-8 + if test x"$charset" = xUS-ASCII; then + charset=UTF-8 + fi cat >>confdefs.h <<\_ACEOF #define USE_UNICODE 1 _ACEOF @@ -4769,10 +4775,8 @@ _ACEOF -INTLTARGET="" NLSTARGET="" if test x"$USE_NLS" = xyes; then - INTLTARGET="intl" NLSTARGET="po" fi @@ -8060,6 +8064,143 @@ echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 fi +if test "${ac_cv_header_locale_h+set}" = set; then + echo "$as_me:$LINENO: checking for locale.h" >&5 +echo $ECHO_N "checking for locale.h... $ECHO_C" >&6 +if test "${ac_cv_header_locale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5 +echo "${ECHO_T}$ac_cv_header_locale_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking locale.h usability" >&5 +echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <locale.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking locale.h presence" >&5 +echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <locale.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for locale.h" >&5 +echo $ECHO_N "checking for locale.h... $ECHO_C" >&6 +if test "${ac_cv_header_locale_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_locale_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5 +echo "${ECHO_T}$ac_cv_header_locale_h" >&6 + +fi +if test $ac_cv_header_locale_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_LOCALE_H 1 +_ACEOF + +fi + + echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 @@ -8447,7 +8588,8 @@ _ACEOF -for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid + +for ac_func in strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -9007,7 +9149,7 @@ _ACEOF cvsver=`$AWK '\$1 ~ /Id:/ { print \$3}' $srcdir/ChangeLog` sed -e 's/define CURRENT_VERSION "\(.*\)+cvs/define CURRENT_VERSION "\1+cvs-'$cvsver'/' $srcdir/version.c.in > version.c CURRENT_VERSION=`sed -n 's/.*define CURRENT_VERSION *"w3m\/\(.*\)".*$/\1/p' version.c` - ac_config_files="$ac_config_files Makefile intl/Makefile po/Makefile.in scripts/Makefile scripts/dirlist.cgi scripts/w3mhelp.cgi scripts/w3mmail.cgi scripts/xface2xpm scripts/multipart/Makefile scripts/multipart/multipart.cgi scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 scripts/w3mman/w3mman2html.cgi libwc/Makefile w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mhelp-w3m_en.html w3mhelp-w3m_ja.html w3mhelp-lynx_en.html w3mhelp-lynx_ja.html" + ac_config_files="$ac_config_files Makefile po/Makefile.in scripts/Makefile scripts/dirlist.cgi scripts/w3mhelp.cgi scripts/w3mmail.cgi scripts/xface2xpm scripts/multipart/Makefile scripts/multipart/multipart.cgi scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 scripts/w3mman/w3mman2html.cgi libwc/Makefile w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mhelp-w3m_en.html w3mhelp-w3m_ja.html w3mhelp-lynx_en.html w3mhelp-lynx_ja.html" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -9549,7 +9691,6 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "scripts/dirlist.cgi" ) CONFIG_FILES="$CONFIG_FILES scripts/dirlist.cgi" ;; diff --git a/configure.in b/configure.in index 1f305b7..417f37c 100644 --- a/configure.in +++ b/configure.in @@ -120,6 +120,7 @@ AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS_H)], [AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H)])])]) AC_CHECK_HEADER([float.h]) AC_CHECK_HEADER([sys/select.h]) +AC_CHECK_HEADER([locale.h], [AC_DEFINE(HAVE_LOCALE_H)]) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST @@ -137,7 +138,7 @@ dnl AC_FUNC_MEMCMP dnl AC_FUNC_MMAP dnl AC_FUNC_SETVBUF_REVERSED dnl AC_FUNC_VPRINTF -AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid) +AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale) AC_FUNC_STRFTIME AC_FUNC_WAIT3 AC_FUNC_SETPGRP @@ -153,7 +154,7 @@ DOCDIRS="doc:en_English doc-jp:ja_Japanese" AC_DEFINE_UNQUOTED(DOCDIRS, "$DOCDIRS") AC_W3M_VERSION -AC_OUTPUT([Makefile intl/Makefile po/Makefile.in \ +AC_OUTPUT([Makefile po/Makefile.in \ scripts/Makefile scripts/dirlist.cgi \ scripts/w3mhelp.cgi \ scripts/w3mmail.cgi scripts/xface2xpm \ |