Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit998e1c1

Browse files
committed
Add checking for syslog.h
Enable multibyte support by default. Note that this is the first cut,and I'm gloing to remove #ifdef MULTIBYTE and others step by step...
1 parenta309032 commit998e1c1

File tree

2 files changed

+129
-113
lines changed

2 files changed

+129
-113
lines changed

‎configure

Lines changed: 121 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,6 @@ Optional Features:
851851
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
852852
--enable-integer-datetimes enable 64-bit integer date/time support
853853
--enable-recode enable character set recode support
854-
--enable-multibyte enable multibyte character support
855854
--enable-nls[=LANGUAGES] enable Native Language Support
856855
--disable-shared do not build shared libraries
857856
--disable-rpath do not embed shared library search path in executables
@@ -1655,73 +1654,12 @@ echo "${ECHO_T}$enable_recode" >&6
16551654
#
16561655
# Multibyte support
16571656
#
1658-
MULTIBYTE=
1659-
echo"$as_me:$LINENO: checking whether to build with multibyte character support">&5
1660-
echo$ECHO_N"checking whether to build with multibyte character support...$ECHO_C">&6
1661-
1662-
1663-
1664-
# Check whether --enable-multibyte or --disable-multibyte was given.
1665-
iftest"${enable_multibyte+set}" =set;then
1666-
enableval="$enable_multibyte"
1667-
1668-
case$enablevalin
1669-
yes)
1670-
MULTIBYTE=SQL_ASCII
1671-
;;
1672-
no)
1673-
:
1674-
;;
1675-
*)
1676-
enable_multibyte=yes
1677-
1678-
case$enablevalin
1679-
SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|JOHAB|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|LATIN6|LATIN7|LATIN8|LATIN9|LATIN10|WIN1256|TCVN|WIN874|KOI8|WIN|ALT|ISO_8859_5|ISO_8859_6|ISO_8859_7|ISO_8859_8)
1680-
MULTIBYTE=$enableval;;
1681-
*)
1682-
{ {echo"$as_me:$LINENO: error: argument to --enable-multibyte must be one of:
1683-
SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
1684-
UNICODE, MULE_INTERNAL,
1685-
LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
1686-
LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
1687-
WIN1256, TCVN, WIN874, KOI8, WIN, ALT,
1688-
ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
1689-
Or do not specify an argument to the option to use the default.">&5
1690-
echo"$as_me: error: argument to --enable-multibyte must be one of:
1691-
SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
1692-
UNICODE, MULE_INTERNAL,
1693-
LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
1694-
LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
1695-
WIN1256, TCVN, WIN874, KOI8, WIN, ALT,
1696-
ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
1697-
Or do not specify an argument to the option to use the default.">&2;}
1698-
{ (exit 1);exit 1; }; };;
1699-
esac
1700-
1701-
;;
1702-
esac
1703-
1704-
else
1705-
enable_multibyte=no
1706-
fi;
1707-
1708-
1709-
iftest"$enable_multibyte" = yes;then
1710-
1657+
MULTIBYTE=SQL_ASCII
17111658
17121659
cat>>confdefs.h<<\_ACEOF
17131660
#define MULTIBYTE 1
17141661
_ACEOF
17151662
1716-
echo"$as_me:$LINENO: result: yes, default$MULTIBYTE">&5
1717-
echo"${ECHO_T}yes, default$MULTIBYTE">&6
1718-
1719-
else
1720-
echo"$as_me:$LINENO: result: no">&5
1721-
echo"${ECHO_T}no">&6
1722-
fi
1723-
1724-
17251663
17261664
17271665
#
@@ -5125,7 +5063,7 @@ echo "${ECHO_T}${python_libspec}" >&6
51255063
fi
51265064
51275065
5128-
##
5066+
v##
51295067
## Libraries
51305068
##
51315069
@@ -12203,28 +12141,24 @@ echo "${ECHO_T}no" >&6
1220312141
fi
1220412142
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1220512143
12206-
12207-
forac_funcin syslog
12208-
do
12209-
as_ac_var=`echo"ac_cv_func_$ac_func"|$as_tr_sh`
12210-
echo"$as_me:$LINENO: checking for$ac_func">&5
12211-
echo$ECHO_N"checking for$ac_func...$ECHO_C">&6
12212-
ifeval"test\"\${$as_ac_var+set}\" = set";then
12144+
echo"$as_me:$LINENO: checking for syslog">&5
12145+
echo$ECHO_N"checking for syslog...$ECHO_C">&6
12146+
iftest"${ac_cv_func_syslog+set}" =set;then
1221312147
echo$ECHO_N"(cached)$ECHO_C">&6
1221412148
else
1221512149
cat>conftest.$ac_ext<<_ACEOF
1221612150
#line$LINENO "configure"
1221712151
#include "confdefs.h"
1221812152
/* System header to define __stub macros and hopefully few prototypes,
12219-
which can conflict with char$ac_func (); below. */
12153+
which can conflict with charsyslog (); below. */
1222012154
#include <assert.h>
1222112155
/* Override any gcc2 internal prototype to avoid an error. */
1222212156
#ifdef __cplusplus
1222312157
extern "C"
1222412158
#endif
1222512159
/* We use char because int might match the return type of a gcc2
1222612160
builtin and then its argument prototype would still apply. */
12227-
char$ac_func ();
12161+
charsyslog ();
1222812162
char (*f) ();
1222912163
1223012164
#ifdef F77_DUMMY_MAIN
@@ -12239,10 +12173,10 @@ main ()
1223912173
/* The GNU C library defines this for functions which it implements
1224012174
to always fail with ENOSYS. Some functions are actually named
1224112175
something starting with __ and the normal name is an alias. */
12242-
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12176+
#if defined (__stub_syslog) || defined (__stub___syslog)
1224312177
choke me
1224412178
#else
12245-
f =$ac_func;
12179+
f =syslog;
1224612180
#endif
1224712181
1224812182
;
@@ -12261,23 +12195,127 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1226112195
ac_status=$?
1226212196
echo"$as_me:$LINENO:\$? =$ac_status">&5
1226312197
(exit$ac_status); }; };then
12264-
eval"$as_ac_var=yes"
12198+
ac_cv_func_syslog=yes
1226512199
else
1226612200
echo"$as_me: failed program was:">&5
1226712201
cat conftest.$ac_ext>&5
12268-
eval"$as_ac_var=no"
12202+
ac_cv_func_syslog=no
1226912203
fi
1227012204
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1227112205
fi
12272-
echo"$as_me:$LINENO: result:`evalecho'${'$as_ac_var'}'`">&5
12273-
echo"${ECHO_T}`evalecho'${'$as_ac_var'}'`">&6
12274-
iftest`evalecho'${'$as_ac_var'}'` = yes;then
12275-
cat>>confdefs.h<<_ACEOF
12276-
#define`echo"HAVE_$ac_func"|$as_tr_cpp` 1
12206+
echo"$as_me:$LINENO: result:$ac_cv_func_syslog">&5
12207+
echo"${ECHO_T}$ac_cv_func_syslog">&6
12208+
iftest$ac_cv_func_syslog = yes;then
12209+
iftest"${ac_cv_header_syslog_h+set}" =set;then
12210+
echo"$as_me:$LINENO: checking for syslog.h">&5
12211+
echo$ECHO_N"checking for syslog.h...$ECHO_C">&6
12212+
iftest"${ac_cv_header_syslog_h+set}" =set;then
12213+
echo$ECHO_N"(cached)$ECHO_C">&6
12214+
fi
12215+
echo"$as_me:$LINENO: result:$ac_cv_header_syslog_h">&5
12216+
echo"${ECHO_T}$ac_cv_header_syslog_h">&6
12217+
else
12218+
# Is the header compilable?
12219+
echo"$as_me:$LINENO: checking syslog.h usability">&5
12220+
echo$ECHO_N"checking syslog.h usability...$ECHO_C">&6
12221+
cat>conftest.$ac_ext<<_ACEOF
12222+
#line$LINENO "configure"
12223+
#include "confdefs.h"
12224+
$ac_includes_default
12225+
#include <syslog.h>
12226+
_ACEOF
12227+
rm -f conftest.$ac_objext
12228+
if { (evalecho"$as_me:$LINENO:\"$ac_compile\"")>&5
12229+
(eval$ac_compile)2>&5
12230+
ac_status=$?
12231+
echo"$as_me:$LINENO:\$? =$ac_status">&5
12232+
(exit$ac_status); }&&
12233+
{ ac_try='test -s conftest.$ac_objext'
12234+
{ (evalecho"$as_me:$LINENO:\"$ac_try\"")>&5
12235+
(eval$ac_try)2>&5
12236+
ac_status=$?
12237+
echo"$as_me:$LINENO:\$? =$ac_status">&5
12238+
(exit$ac_status); }; };then
12239+
ac_header_compiler=yes
12240+
else
12241+
echo"$as_me: failed program was:">&5
12242+
cat conftest.$ac_ext>&5
12243+
ac_header_compiler=no
12244+
fi
12245+
rm -f conftest.$ac_objext conftest.$ac_ext
12246+
echo"$as_me:$LINENO: result:$ac_header_compiler">&5
12247+
echo"${ECHO_T}$ac_header_compiler">&6
12248+
12249+
# Is the header present?
12250+
echo"$as_me:$LINENO: checking syslog.h presence">&5
12251+
echo$ECHO_N"checking syslog.h presence...$ECHO_C">&6
12252+
cat>conftest.$ac_ext<<_ACEOF
12253+
#line$LINENO "configure"
12254+
#include "confdefs.h"
12255+
#include <syslog.h>
12256+
_ACEOF
12257+
if { (evalecho"$as_me:$LINENO:\"$ac_cpp conftest.$ac_ext\"")>&5
12258+
(eval$ac_cpp conftest.$ac_ext)2>conftest.er1
12259+
ac_status=$?
12260+
egrep -v'^ *\+' conftest.er1>conftest.err
12261+
rm -f conftest.er1
12262+
cat conftest.err>&5
12263+
echo"$as_me:$LINENO:\$? =$ac_status">&5
12264+
(exit$ac_status); }>/dev/null;then
12265+
iftest -s conftest.err;then
12266+
ac_cpp_err=$ac_c_preproc_warn_flag
12267+
else
12268+
ac_cpp_err=
12269+
fi
12270+
else
12271+
ac_cpp_err=yes
12272+
fi
12273+
iftest -z"$ac_cpp_err";then
12274+
ac_header_preproc=yes
12275+
else
12276+
echo"$as_me: failed program was:">&5
12277+
cat conftest.$ac_ext>&5
12278+
ac_header_preproc=no
12279+
fi
12280+
rm -f conftest.err conftest.$ac_ext
12281+
echo"$as_me:$LINENO: result:$ac_header_preproc">&5
12282+
echo"${ECHO_T}$ac_header_preproc">&6
12283+
12284+
# So? What about this header?
12285+
case$ac_header_compiler:$ac_header_preprocin
12286+
yes:no )
12287+
{echo"$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!">&5
12288+
echo"$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!">&2;}
12289+
{echo"$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result">&5
12290+
echo"$as_me: WARNING: syslog.h: proceeding with the preprocessor's result">&2;};;
12291+
no:yes )
12292+
{echo"$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled">&5
12293+
echo"$as_me: WARNING: syslog.h: present but cannot be compiled">&2;}
12294+
{echo"$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?">&5
12295+
echo"$as_me: WARNING: syslog.h: check for missing prerequisite headers?">&2;}
12296+
{echo"$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result">&5
12297+
echo"$as_me: WARNING: syslog.h: proceeding with the preprocessor's result">&2;};;
12298+
esac
12299+
echo"$as_me:$LINENO: checking for syslog.h">&5
12300+
echo$ECHO_N"checking for syslog.h...$ECHO_C">&6
12301+
iftest"${ac_cv_header_syslog_h+set}" =set;then
12302+
echo$ECHO_N"(cached)$ECHO_C">&6
12303+
else
12304+
ac_cv_header_syslog_h=$ac_header_preproc
12305+
fi
12306+
echo"$as_me:$LINENO: result:$ac_cv_header_syslog_h">&5
12307+
echo"${ECHO_T}$ac_cv_header_syslog_h">&6
12308+
12309+
fi
12310+
iftest$ac_cv_header_syslog_h = yes;then
12311+
cat>>confdefs.h<<\_ACEOF
12312+
#define HAVE_SYSLOG 1
1227712313
_ACEOF
1227812314
1227912315
fi
12280-
done
12316+
12317+
12318+
fi
1228112319
1228212320
1228312321
echo"$as_me:$LINENO: checking for optreset">&5

‎configure.in

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.181 2002/04/24 01:56:20 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.182 2002/04/26 13:55:38 ishii Exp $
33

44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -162,33 +162,8 @@ AC_MSG_RESULT([$enable_recode])
162162
#
163163
# Multibyte support
164164
#
165-
MULTIBYTE=
166-
AC_MSG_CHECKING([whether to build with multibyte character support])
167-
168-
PGAC_ARG_OPTARG(enable, multibyte, [ --enable-multibyte enable multibyte character support],
169-
[MULTIBYTE=SQL_ASCII],
170-
[
171-
case $enableval in
172-
SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|JOHAB|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|LATIN6|LATIN7|LATIN8|LATIN9|LATIN10|WIN1256|TCVN|WIN874|KOI8|WIN|ALT|ISO_8859_5|ISO_8859_6|ISO_8859_7|ISO_8859_8)
173-
MULTIBYTE=$enableval;;
174-
*)
175-
AC_MSG_ERROR(
176-
[argument to --enable-multibyte must be one of:
177-
SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
178-
UNICODE, MULE_INTERNAL,
179-
LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
180-
LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
181-
WIN1256, TCVN, WIN874, KOI8, WIN, ALT,
182-
ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
183-
Or do not specify an argument to the option to use the default.]);;
184-
esac
185-
],
186-
[
187-
AC_DEFINE(MULTIBYTE, 1, [Set to 1 if you want to use multibyte characters (--enable-multibyte)])
188-
AC_MSG_RESULT([yes, default $MULTIBYTE])
189-
],
190-
[AC_MSG_RESULT(no)])
191-
165+
MULTIBYTE=SQL_ASCII
166+
AC_DEFINE(MULTIBYTE, 1, [Set to 1 if you want to use multibyte characters (--enable-multibyte)])
192167
AC_SUBST(MULTIBYTE)
193168

194169
#
@@ -694,7 +669,7 @@ if test "$with_python" = yes; then
694669
fi
695670

696671

697-
##
672+
v##
698673
## Libraries
699674
##
700675

@@ -984,7 +959,10 @@ AC_TRY_LINK([#include <setjmp.h>],
984959
AC_MSG_RESULT(yes)],
985960
[AC_MSG_RESULT(no)])
986961

987-
AC_CHECK_FUNCS([syslog])
962+
AC_CHECK_FUNC(syslog,
963+
[AC_CHECK_HEADER(syslog.h,
964+
[AC_DEFINE(HAVE_SYSLOG, 1, [])],
965+
[])])
988966

989967
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
990968
[AC_TRY_LINK([#include <unistd.h>],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp