]> git.lyx.org Git - features.git/commitdiff
stl_string_fwd.h checking improved again. Generalized version also in the works.
authorAllan Rae <rae@lyx.org>
Mon, 20 Dec 1999 01:45:40 +0000 (01:45 +0000)
committerAllan Rae <rae@lyx.org>
Mon, 20 Dec 1999 01:45:40 +0000 (01:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@387 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
acconfig.h
acinclude.m4
configure.in
lib/templates/IEEEtran.lyx
src/stl_string_fwd.h

index 792c54725d1a777e729a8b7fece5bea34e2ad1fc..bf0528d3bce839f7d2bb002b62358b8c81d78ef4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+1999-12-20  Allan Rae  <rae@lyx.org>
+
+       * lib/templates/IEEEtran.lyx: small correction and update.
+
+       * configure.in: Attempted to use LYX_PATH_HEADER
+
+       * src/stl_string_fwd.h: Don't need HAVE_STL_STRING_FWD_H anymore
+
+       * acconfig.h, acinclude.m4 (LYX_STL_STRING_FWD): totally revised after
+       input from JMarc.  Now use preprocessor to find the header.
+       Also stopped making HAVE_STL_STRING_FWD_H and extended the comments.
+       (LYX_PATH_HEADER): My, so far, failed attempt to generalize
+       LYX_STL_STRING_FWD.  See comments in file.      
+
 1999-12-19  Asger Alstrup Nielsen  <alstrup@diku.dk>
 
        * The global MiniBuffer * minibuffer variable is dead.
index e39c682e62160a0d369400cbc18246d0516f05e4..65a6d81d8145d8e06cffdcdc91823ba3032a41fd 100644 (file)
@@ -40,7 +40,7 @@
 /* define this to the location of stl_string_fwd.h to be used with #include,
   NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
        supplied version of the header.
-  e.g. <../include/stl_string_fwd.h> */
+  e.g. <../include/stl_string_fwd.h> or better yet use an absolute path */
 #undef STL_STRING_FWD_H_LOCATION
 
 /* Define if your locale.h file contains LC_MESSAGES.  */
index 75dbd24073d1b336000c72744faf8f12bcaa6ae8..c919e6c3df331fc3b92afde5b2581075d12225f6 100644 (file)
@@ -1065,28 +1065,47 @@ case "$host" in
 esac
 ])
 
+
+### Check for a headers existence and location iff it exists
+## This is supposed to be a generalised version of LYX_STL_STRING_FWD
+## It almost works.  I've tried a few variations but they give errors
+## of one sort or other: bad substitution or file not found etc.  The
+## actual header _is_ found though and the cache variable is set however
+## the reported setting (on screen) is equal to $ac_safe for some unknown
+## reason.
+AC_DEFUN(LYX_PATH_HEADER,
+[ AC_CHECK_HEADER($1,[
+  ac_tr_safe=PATH_`echo $ac_safe | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  AC_CACHE_CHECK([path to $1],lyx_cv_path_$ac_safe,
+  [ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#include <$1>
+EOF
+lyx_cv_path_$ac_safe=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
+  grep $1  2>/dev/null | \
+  sed -e 's/.*\(".*$1"\).*/\1/' -e "1q"`
+rm -f conftest*])
+  AC_DEFINE_UNQUOTED(${ac_tr_safe},${lyx_cv_path_$ac_safe})])
+])
+### end of LYX_PATH_HEADER
+
 ### Check for stl_string_fwd.h existence and location if it exists
-###
-### Three problems remain:
-###   1.  I don't check if $lyx_cv_extra_inc has a value before testing it.
-###   2.  I don't issue a warning/error if AC_CHECK_HEADERS finds it but I
-###       don't.  The warning should only need to be something like:
-###       "Can't find path to stl_string_fwd.h please define
-###        STL_STRING_FWD_H_LOCATION in src/config.h or supply the path
-###        using --with-extra-inc"
-###   3. Multiple extra include dirs? and I don't check --with-extra-prefix yet
-###
 AC_DEFUN(LYX_STL_STRING_FWD,
-[AC_CHECK_HEADERS(stl_string_fwd.h,[
-  lyx_cv_stl_string_fwd_h_location="<../include/stl_string_fwd.h>"
-  AC_CHECK_HEADER(../include/stl_string_fwd.h,[
-    ac_cv_header_stl_string_fwd_h=yes
-    lyx_cv_stl_string_fwd_h_location="<../include/stl_string_fwd.h>"],[
-  AC_CHECK_HEADER($lyx_cv_extra_inc/stl_string_fwd.h,[
-    ac_cv_header_stl_string_fwd_h=yes
-    lyx_cv_stl_string_fwd_h_location="<$lyx_cv_extra_inc/stl_string_fwd.h>"],[
-    ac_cv_header_stl_string_fwd_h=no])])
-  AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_stl_string_fwd_h_location)])
+[ AC_CHECK_HEADER(stl_string_fwd.h,[
+  AC_CACHE_CHECK([path to stl_string_fwd.h],lyx_cv_path_stl_string_fwd_h,
+  [ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#include <stl_string_fwd.h>
+EOF
+lyx_cv_path_stl_string_fwd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
+  grep 'stl_string_fwd.h'  2>/dev/null | \
+  sed -e 's/.*\(".*stl_string_fwd.h"\).*/\1/' -e "1q"`
+rm -f conftest*])
+  AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_path_stl_string_fwd_h)])
 ])
 
 
index 9a1a729d00c5aa6e371cca80fd715c84e54c39ad..80ff6a10d818a160868aa27ca0ceddf30650d03f 100644 (file)
@@ -155,6 +155,7 @@ AC_HEADER_MAJOR
 AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h)
 
 # some annoying header files
+#LYX_PATH_HEADER(stl_string_fwd.h)
 LYX_STL_STRING_FWD
 
 # some standard structures
index 9623fb8bd97a9e47320dddaa51332cac2e7788c4..0d603f49c1ff6ac2334bec4f15a965f4fc54a442 100644 (file)
@@ -1,4 +1,4 @@
-#This file was created by <rae> Mon Dec 13 00:17:21 1999
+#This file was created by <rae> Mon Dec 20 11:39:44 1999
 #LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
 \lyxformat 2.15
 \textclass IEEEtran
@@ -43,6 +43,11 @@ Your name is with xyz Department\SpecialChar \ldots{}
 
 \latex latex 
 }
+\layout LaTeX
+
+
+\backslash 
+thispagestyle{empty}
 \layout Abstract
 
 This paper presents a simple template for IEEEtran documents.
@@ -104,7 +109,7 @@ BibTeX bibliography generation.
 
 
 \backslash 
-begin{bibliography}{Your Name}
+begin{biography}{Your Name}
 \layout Standard
 
 All about you.
@@ -112,5 +117,5 @@ All about you.
 
 
 \backslash 
-end{bibliography}
+end{biography}
 \the_end
index 5bc011b9beb568cdac5791369364711afa8b342f..61a541e01b80234a798263993e94366fb4dcef87 100644 (file)
 #define LYX_STL_STRING_FWD_H
 
 
-#if defined(HAVE_STL_STRING_FWD_H)
-#  ifndef USE_INCLUDED_STRING
+#ifndef USE_INCLUDED_STRING
 //   include the real stl_string_fwd.h
-#    include STL_STRING_FWD_H_LOCATION
-#  else
+#  include STL_STRING_FWD_H_LOCATION
+#else
 // Hide the forward declaration of string by SGI's STL > 3.13.
 // We have to provide the declaration of__get_c_string() ourselves
 // since SGI expects it to exist and we're blocking their string declarations
 // as best we can.
 // Note that a declaration for string is still required so we have to
 // provide one via LString.h.   ARRae.
-#    include "LString.h"
-#    define __SGI_STL_STRING_FWD_H
-     static char const * __get_c_string(string const &);
-#  endif // USE_INCLUDED_STRING
-#endif // HAVE_STL_STRING_FWD_H
+#  include "LString.h"
+#  define __SGI_STL_STRING_FWD_H
+   static char const * __get_c_string(string const &);
+#endif // USE_INCLUDED_STRING
 
 #endif // LYX_STL_STRING_FWD_H