mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
stl_string_fwd.h checking improved again. Generalized version also in the works.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@387 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4ed68c1bc2
commit
681f7f3107
14
ChangeLog
14
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.
|
||||
|
@ -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. */
|
||||
|
59
acinclude.m4
59
acinclude.m4
@ -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)])
|
||||
])
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -13,21 +13,19 @@
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user