[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: configure.ac
User: danmc
Date: 06/12/21 21:49:43
Modified: . configure.ac
Log:
instead of using __FUNCTION__, use __func__ which is part of C99.
Add an autoconf
Revision Changes Path
1.34 +28 -0 eda/geda/gaf/gnetlist/configure.ac
(In the diff below, changes in quantity of whitespace are not shown.)
Index: configure.ac
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/configure.ac,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- configure.ac 22 Nov 2006 00:06:02 -0000 1.33
+++ configure.ac 22 Dec 2006 02:49:43 -0000 1.34
@@ -68,6 +68,34 @@
AC_PATH_PROGS(AWK, nawk gawk mawk awk, )
AC_PATH_PROGS(M4, gm4 m4, m4)
+##############################################################3
+# Test for __func__
+#
+
+AC_MSG_CHECKING([For a working C99 __func__])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ [[const char *foo = __func__;]])],
+ [ac_cv_cpp_func=yes],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ [[const char *foo = __FUNCTION__;]])],
+ [ac_cv_cpp_func=__FUNCTION__],
+ [ac_cv_cpp_func="\"no\""])]
+)
+
+if test "X$ac_cv_cpp_func" = "X__FUNCTION__"; then
+ AC_MSG_RESULT([__FUNCTION__])
+elif test "x$ac_cv_cpp_func" = "xyes" ; then
+ AC_MSG_RESULT([__func__])
+else
+ AC_MSG_RESULT([no])
+fi
+if test "X$ac_cv_cpp_func" != "Xyes" ; then
+ AC_DEFINE_UNQUOTED([__func__], [$ac_cv_cpp_func], [Define to be a __func__ replacement])
+fi
+
+#
+##############################################################3
+
#########################################################################
#
# Misc win32 / mingw checks and variables start
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs