mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Tidied GSDoc to compile nicely for libxml
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6736 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed9a581514
commit
bd6afd1913
7 changed files with 138 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
|||
2000-06-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.in: Added check for recent libxml
|
||||
* config.mak.in: Added defeine for HAVE_LIBXML
|
||||
* GSDoc/gsdoc.m: modified for standard libxml 2.0 installation
|
||||
* GSDoc/README: updated
|
||||
* GSDoc/Makefile.preamble: conditional on presence of libxml
|
||||
|
||||
2000-06-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDate.m: Remove obsolete classForConnectedCoder method
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
#ADDITIONAL_CPPFLAGS +=
|
||||
ADDITIONAL_CPPFLAGS += -DHAVE_LIBXML=$(HAVE_LIBXML)
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
#ADDITIONAL_OBJCFLAGS +=
|
||||
|
@ -43,7 +43,7 @@
|
|||
#ADDITIONAL_CFLAGS +=
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I/usr/include/gnome-xml \
|
||||
ADDITIONAL_INCLUDE_DIRS += \
|
||||
-I../Headers/gnustep -I../Headers \
|
||||
-I../Source/$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
|
||||
|
||||
|
@ -54,7 +54,9 @@ ADDITIONAL_INCLUDE_DIRS += -I/usr/include/gnome-xml \
|
|||
ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
# Additional libraries for XML parsing
|
||||
ifeq ($(HAVE_LIBXML),1)
|
||||
ADDITIONAL_TOOL_LIBS += -lxml -lz
|
||||
endif
|
||||
|
||||
#
|
||||
# Flags dealing with installing and uninstalling
|
||||
|
|
19
GSDoc/README
19
GSDoc/README
|
@ -1,25 +1,18 @@
|
|||
|
||||
11-Mar-2000
|
||||
20-Jun-2000
|
||||
|
||||
GSDoc should probably be part of the 'Tools' directory of gstep-base,
|
||||
but it depends on a version of the nome XML parsing library this is
|
||||
but it depends on a version of the gnome XML parsing library that is
|
||||
probably not available on most machines.
|
||||
|
||||
Before doing anything else - you need to install the Gnome xml parser library!
|
||||
|
||||
I build gsdoc using the latest CVS source of version 1.8.6 of the parser.
|
||||
I build gsdoc using the 2.0.0 release of the parser.
|
||||
|
||||
You can get this via CVS from -
|
||||
cvs -d :pserver:anonymous@dev.w3.org:/sources/public login
|
||||
Password - 'anonymous'
|
||||
cvs -d :pserver:anonymous@dev.w3.org:/sources/public checkout XML
|
||||
You can find out how to get this from http://www.xmlsoft.org
|
||||
|
||||
Older versions of the library may work - but I doubt it.
|
||||
Newer versions may also fail - try using the -D 11-Mar-2000 flag with CVS
|
||||
to get the version I used.
|
||||
|
||||
Once you have built and installed the xml parser library, you can build
|
||||
gsdoc and install it.
|
||||
Once you have installed the xml parser library, you can build gsdoc
|
||||
and install it.
|
||||
|
||||
Run gsdoc giving it the name of a gsdoc file as an argument, and it will
|
||||
produce an html output file.
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
#if HAVE_LIBXML
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "parser.h"
|
||||
#include <libxml/parser.h>
|
||||
|
||||
|
||||
@interface GSDocParser : NSObject
|
||||
|
@ -2066,3 +2068,10 @@ main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
main()
|
||||
{
|
||||
NSLog(@"No libxml available");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
#
|
||||
#
|
||||
DYNAMIC_LINKER=@DYNAMIC_LINKER@
|
||||
HAVE_LIBXML=@HAVE_LIBXML@
|
||||
|
|
83
configure
vendored
83
configure
vendored
|
@ -4325,6 +4325,88 @@ EOF
|
|||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check recent libxlm for GSDoc etc.
|
||||
#--------------------------------------------------------------------
|
||||
echo "Checking for libxml"
|
||||
for ac_hdr in libxml/xmlversion.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:4337: checking for $ac_hdr" >&5
|
||||
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4342 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
if test $ac_cv_header_libxml_xmlversion_h = no; then
|
||||
echo "Could not find libxml headers"
|
||||
echo "Check to make sure you have libxml version 2 or later installed"
|
||||
echo "configure: warning: Could not find libxml headers" 1>&2
|
||||
HAVE_LIBXML=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4380 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "libxml/xmlversion.h"
|
||||
#if LIBXML_VERSION < 20000
|
||||
#error
|
||||
#endif
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
libxml2plus=1
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
libxml2plus=0
|
||||
fi
|
||||
rm -f conftest*
|
||||
if test $libxml2plus = 0; then
|
||||
echo "libxml version older than 2.0.0"
|
||||
echo "configure: warning: libxml version older than 2.0.0" 1>&2
|
||||
HAVE_LIBXML=0
|
||||
else
|
||||
HAVE_LIBXML=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4518,6 +4600,7 @@ s%@_GSC_S_LNG@%$_GSC_S_LNG%g
|
|||
s%@_GSC_S_LNG_LNG@%$_GSC_S_LNG_LNG%g
|
||||
s%@DYNAMIC_LINKER@%$DYNAMIC_LINKER%g
|
||||
s%@GS_FAKE_MAIN@%$GS_FAKE_MAIN%g
|
||||
s%@HAVE_LIBXML@%$HAVE_LIBXML%g
|
||||
s%@whole_archive@%$whole_archive%g
|
||||
s%@no_whole_archive@%$no_whole_archive%g
|
||||
s%@subdirs@%$subdirs%g
|
||||
|
|
25
configure.in
25
configure.in
|
@ -708,6 +708,31 @@ else
|
|||
fi
|
||||
AC_SUBST(GS_FAKE_MAIN)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check recent libxlm for GSDoc etc.
|
||||
#--------------------------------------------------------------------
|
||||
echo "Checking for libxml"
|
||||
AC_CHECK_HEADERS(libxml/xmlversion.h)
|
||||
if test $ac_cv_header_libxml_xmlversion_h = no; then
|
||||
echo "Could not find libxml headers"
|
||||
echo "Check to make sure you have libxml version 2 or later installed"
|
||||
AC_MSG_WARN(Could not find libxml headers)
|
||||
HAVE_LIBXML=0
|
||||
else
|
||||
AC_TRY_CPP([#include "libxml/xmlversion.h"
|
||||
#if LIBXML_VERSION < 20000
|
||||
#error
|
||||
#endif], libxml2plus=1, libxml2plus=0)
|
||||
if test $libxml2plus = 0; then
|
||||
echo "libxml version older than 2.0.0"
|
||||
AC_MSG_WARN(libxml version older than 2.0.0)
|
||||
HAVE_LIBXML=0
|
||||
else
|
||||
HAVE_LIBXML=1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_LIBXML)
|
||||
|
||||
|
||||
AC_SUBST(whole_archive)
|
||||
AC_SUBST(no_whole_archive)
|
||||
|
|
Loading…
Reference in a new issue