--enable-depend turn on automatic dependency tracking
--enable-cassert enable assertion checks (for debugging)
--enable-odbc build the ODBC driver package
- --enable-syslog enable logging to syslog
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-
-# Check whether --enable-syslog or --disable-syslog was given.
-if test "${enable_syslog+set}" = set; then
- enableval="$enable_syslog"
-
- case $enableval in
- yes)
- echo "$as_me:$LINENO: checking for syslog" >&5
-echo $ECHO_N "checking for syslog... $ECHO_C" >&6
-if test "${ac_cv_func_syslog+set}" = set; then
+for ac_func in syslog
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char syslog (); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char syslog ();
+char $ac_func ();
char (*f) ();
#ifdef F77_DUMMY_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_syslog) || defined (__stub___syslog)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = syslog;
+f = $ac_func;
#endif
;
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_syslog=yes
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_func_syslog=no
+eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
-echo "${ECHO_T}$ac_cv_func_syslog" >&6
-if test $ac_cv_func_syslog = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_SYSLOG 1
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-else
- { { echo "$as_me:$LINENO: error: no syslog interface found" >&5
-echo "$as_me: error: no syslog interface found" >&2;}
- { (exit 1); exit 1; }; }
fi
-
- ;;
- no)
- :
- ;;
- *)
- { { echo "$as_me:$LINENO: error: no argument expected for --enable-syslog option" >&5
-echo "$as_me: error: no argument expected for --enable-syslog option" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
-else
- enable_syslog=no
-
-fi;
-
+done
echo "$as_me:$LINENO: checking for optreset" >&5
dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.178 2002/04/14 17:23:20 petere Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.179 2002/04/21 00:22:52 ishii Exp $
dnl Developers, please strive to achieve this order:
dnl
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
-
-PGAC_ARG_BOOL(enable, syslog, no, [ --enable-syslog enable logging to syslog],
- [AC_CHECK_FUNC(syslog,
- [AC_DEFINE([ENABLE_SYSLOG], 1,
- [Define to 1 if to enable the syslogging code])],
- [AC_MSG_ERROR([no syslog interface found])])])
-
+AC_CHECK_FUNCS([syslog])
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
[AC_TRY_LINK([#include <unistd.h>],
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.95 2002/04/04 04:43:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.96 2002/04/21 00:22:52 ishii Exp $
*
*-------------------------------------------------------------------------
*/
#include <signal.h>
#include <sys/time.h>
#include <ctype.h>
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
#include <syslog.h>
#endif
char *client_min_messages_str = NULL;
const char client_min_messages_str_default[] = "notice";
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
/*
* 0 = only stdout/stderr
* 1 = stdout+stderr and syslog
* Message prepared; send it where it should go
*/
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
/* Write to syslog, if enabled */
if (output_to_server && Use_syslog >= 1)
{
write_syslog(syslog_level, msg_buf + timestamp_size);
}
-#endif /* ENABLE_SYSLOG */
+#endif /* HAVE_SYSLOG */
/* syslog doesn't want a trailing newline, but other destinations do */
strcat(msg_buf, "\n");
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
#ifndef PG_SYSLOG_LIMIT
#define PG_SYSLOG_LIMIT 128
syslog(level, "[%lu] %s", seq, line);
}
}
-#endif /* ENABLE_SYSLOG */
+#endif /* HAVE_SYSLOG */
static void
* Support for grand unified configuration scheme, including SET
* command, configuration file, and command line options.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.65 2002/04/03 05:39:32 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.66 2002/04/21 00:22:52 ishii Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
extern int CommitSiblings;
extern bool FixBTree;
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
extern char *Syslog_facility;
extern char *Syslog_ident;
static bool check_facility(const char *facility);
1000, 0, INT_MAX, NULL, NULL
},
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
{
"syslog", PGC_SIGHUP, PGC_S_DEFAULT, &Use_syslog,
0, 0, 2, NULL, NULL
assign_server_min_messages
},
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
{
"syslog_facility", PGC_POSTMASTER, PGC_S_DEFAULT, &Syslog_facility,
"LOCAL0", check_facility, NULL
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
static bool
check_facility(const char *facility)
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: pg_config.h.in,v 1.21 2002/04/10 22:47:09 petere Exp $
+ * $Id: pg_config.h.in,v 1.22 2002/04/21 00:22:52 ishii Exp $
*/
#ifndef PG_CONFIG_H
/* Set to 1 if you want ASSERT checking (--enable-cassert) */
#undef USE_ASSERT_CHECKING
-/* Set to 1 to use syslog() to write postmaster log (--enable-syslog) */
-#undef ENABLE_SYSLOG
-
/* Define to build with Kerberos 4 support (--with-krb4[=DIR]) */
#undef KRB4
#undef HAVE_UINT64
#undef HAVE_SIG_ATOMIC_T
+/* Define if you have syslog() */
+#undef HAVE_SYSLOG
/*
*------------------------------------------------------------------------
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.35 2002/03/06 06:23:20 momjian Exp $
+ * $Id: elog.h,v 1.36 2002/04/21 00:22:52 ishii Exp $
*
*-------------------------------------------------------------------------
*/
/*#define DEBUG DEBUG1*/ /* Backward compatibility with pre-7.3 */
/* Configurable parameters */
-#ifdef ENABLE_SYSLOG
+#ifdef HAVE_SYSLOG
extern int Use_syslog;
#endif
extern bool Log_timestamp;