[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: configure.ac



  User: danmc   
  Date: 06/12/21 22:00:50

  Modified:    .        configure.ac
  Log:
  Add an autoconf check for C99 __func__ and use __func__ instead of __FUNCTION__
  
  in the code.  This is more portable.
  
  
  
  
  Revision  Changes    Path
  1.32      +28 -0     eda/geda/gaf/utils/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/utils/configure.ac,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -b -r1.31 -r1.32
  --- configure.ac	22 Nov 2006 00:06:03 -0000	1.31
  +++ configure.ac	22 Dec 2006 03:00:49 -0000	1.32
  @@ -34,6 +34,34 @@
   AC_PROG_MAKE_SET
   AM_PROG_LEX
   
  +##############################################################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