Mercurial > hg > octave-nkf
changeset 2574:cfa9f35fd407
[project @ 1996-12-09 17:30:39 by jwe]
author | jwe |
---|---|
date | Mon, 09 Dec 1996 17:30:40 +0000 |
parents | 2799980db720 |
children | e57847e2de87 |
files | acconfig.h aclocal.m4 config.h.bot configure.in |
diffstat | 4 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/acconfig.h +++ b/acconfig.h @@ -60,6 +60,9 @@ /* Define if signal handlers must be reinstalled after they are called. */ #undef MUST_REINSTALL_SIGHANDLERS +/* Define (to string::npos) if <string> doesn't. */ +#undef NPOS + /* Define if you don't have NPSOL. */ #undef NPSOL_MISSING
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -369,6 +369,22 @@ fi ]) dnl +dnl See if the standard string class has npos as a member. +dnl +AC_DEFUN(OCTAVE_STRING_NPOS, +[AC_CACHE_CHECK([whether including <string> defines NPOS], +octave_cv_string_npos, +[AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_TRY_COMPILE([#include <string>], +[size_t foo = NPOS], +octave_cv_string_npos=yes, octave_cv_string_npos=no)]) +if test $octave_cv_string_npos = no; then + AC_DEFINE(NPOS, string::npos) +fi +AC_LANG_RESTORE +]) +dnl dnl The following test is from Karl Berry's Kpathseach library. I'm dnl including it here in case we someday want to make the use of dnl kpathsea optional.
--- a/config.h.bot +++ b/config.h.bot @@ -7,12 +7,6 @@ #define GCC_ATTR_UNUSED #endif -#if defined (__GNUC__) -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7) -#define NPOS string::npos -#endif -#endif - #define STATIC_CAST(T, E) (T) (E) #define DYNAMIC_CAST(T, E) (T) (E)
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.238 $) +AC_REVISION($Revision: 1.239 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -458,6 +458,10 @@ OCTAVE_CXXLIBS +### See if we should define NPOS. + +OCTAVE_STRING_NPOS + ### We need these before trying to find libf2c. if test -z "$AR"; then