[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Try to make autoconf detect whether we have __func__ or __F...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Try to make autoconf detect whether we have __func__ or __F...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Tue, 22 Feb 2005 00:25:25 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 22 Feb 2005 00:25:53 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/libevent
In directory moria.mit.edu:/tmp/cvs-serv25451
Modified Files:
configure configure.in event.h
Log Message:
Try to make autoconf detect whether we have __func__ or __FUNCTION__ or __FILE__ or what.
Index: configure
===================================================================
RCS file: /home/or/cvsroot/libevent/configure,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- configure 22 Feb 2005 03:43:50 -0000 1.1
+++ configure 22 Feb 2005 05:25:20 -0000 1.2
@@ -1,12 +1,81 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.
+# Generated by GNU Autoconf 2.59.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
[...7033 lines suppressed...]
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
@@ -5042,8 +6780,11 @@
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
- $SHELL $CONFIG_STATUS || ac_cs_success=false
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
Index: configure.in
===================================================================
RCS file: /home/or/cvsroot/libevent/configure.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- configure.in 22 Feb 2005 03:43:50 -0000 1.1
+++ configure.in 22 Feb 2005 05:25:20 -0000 1.2
@@ -277,4 +277,19 @@
[Define to unsigned int if you dont have it])]
)
+AC_MSG_CHECKING([whether our compiler supports __func__])
+AC_TRY_COMPILE([],
+ [void foo() { const char *cp = __func__; }],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
+ AC_TRY_COMPILE([],
+ [void foo() { const char *cp = __FUNCTION__; }],
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(__func__, __FUNCTION__,
+ [Define to appropriate substitue if compiler doesnt have __func__]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE(__func__, __FILE__,
+ [Define to appropriate substitue if compiler doesnt have __func__])))
+
AC_OUTPUT(Makefile test/Makefile sample/Makefile)
Index: event.h
===================================================================
RCS file: /home/or/cvsroot/libevent/event.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- event.h 22 Feb 2005 04:22:34 -0000 1.2
+++ event.h 22 Feb 2005 05:25:20 -0000 1.3
@@ -36,8 +36,6 @@
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
typedef unsigned char u_char;
-#undef __func__
-#define __func__ __FUNCTION__
#endif
#define EVLIST_TIMEOUT 0x01