summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/opensp/opensp/attributevalue.patch62
-rw-r--r--meta/recipes-devtools/opensp/opensp/fix-docdir.patch14
-rw-r--r--meta/recipes-devtools/opensp/opensp/m4.patch1925
-rw-r--r--meta/recipes-devtools/opensp/opensp/rangmap-fix.patch15
-rw-r--r--meta/recipes-devtools/opensp/opensp_1.5.bb27
5 files changed, 2043 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opensp/opensp/attributevalue.patch b/meta/recipes-devtools/opensp/opensp/attributevalue.patch
new file mode 100644
index 0000000000..4f3507e19b
--- /dev/null
+++ b/meta/recipes-devtools/opensp/opensp/attributevalue.patch
@@ -0,0 +1,62 @@
1Patch obtained from OpenEmbedded.
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4--- OpenSP-1.5/include/Attribute.h~attributevalue 2000-03-09 13:30:56.000000000 -0500
5+++ OpenSP-1.5/include/Attribute.h 2004-01-20 14:11:36.000000000 -0500
6@@ -31,6 +31,28 @@
7 class AttributeContext;
8 class Syntax;
9
10+class SP_API AttributeValue : public Resource {
11+public:
12+ enum Type {
13+ implied,
14+ cdata,
15+ tokenized
16+ };
17+ AttributeValue();
18+ virtual ~AttributeValue();
19+ virtual AttributeSemantics *makeSemantics(const DeclaredValue *,
20+ AttributeContext &,
21+ const StringC &,
22+ unsigned &,
23+ unsigned &) const;
24+ virtual Type info(const Text *&, const StringC *&) const = 0;
25+ virtual const Text *text() const;
26+ virtual Boolean recoverUnquoted(const StringC &, const Location &,
27+ AttributeContext &, const StringC &);
28+ static Boolean handleAsUnterminated(const Text &, AttributeContext &);
29+};
30+
31+
32 class SP_API AttributeDefinitionDesc {
33 public:
34 AttributeDefinitionDesc() { }
35@@ -380,27 +402,6 @@
36 ConstPtr<Notation> notation_;
37 };
38
39-class SP_API AttributeValue : public Resource {
40-public:
41- enum Type {
42- implied,
43- cdata,
44- tokenized
45- };
46- AttributeValue();
47- virtual ~AttributeValue();
48- virtual AttributeSemantics *makeSemantics(const DeclaredValue *,
49- AttributeContext &,
50- const StringC &,
51- unsigned &,
52- unsigned &) const;
53- virtual Type info(const Text *&, const StringC *&) const = 0;
54- virtual const Text *text() const;
55- virtual Boolean recoverUnquoted(const StringC &, const Location &,
56- AttributeContext &, const StringC &);
57- static Boolean handleAsUnterminated(const Text &, AttributeContext &);
58-};
59-
60 class SP_API ImpliedAttributeValue : public AttributeValue {
61 public:
62 ImpliedAttributeValue();
diff --git a/meta/recipes-devtools/opensp/opensp/fix-docdir.patch b/meta/recipes-devtools/opensp/opensp/fix-docdir.patch
new file mode 100644
index 0000000000..5e2fc8b745
--- /dev/null
+++ b/meta/recipes-devtools/opensp/opensp/fix-docdir.patch
@@ -0,0 +1,14 @@
1Patch obtained from OpenEmbedded.
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4Index: OpenSP-1.5/doc/Makefile.am
5===================================================================
6--- OpenSP-1.5.orig/doc/Makefile.am 2000-05-06 09:10:32.000000000 +1000
7+++ OpenSP-1.5/doc/Makefile.am 2007-06-02 12:46:50.000000000 +1000
8@@ -1,6 +1,5 @@
9 ## Process this file with automake to produce Makefile.in
10
11-docdir = $(prefix)/doc
12 pkgdocdir = $(docdir)/@PACKAGE@
13
14 MAINTAINERCLEANFILES = Makefile.in
diff --git a/meta/recipes-devtools/opensp/opensp/m4.patch b/meta/recipes-devtools/opensp/opensp/m4.patch
new file mode 100644
index 0000000000..a8504c5818
--- /dev/null
+++ b/meta/recipes-devtools/opensp/opensp/m4.patch
@@ -0,0 +1,1925 @@
1Patch obtained from OpenEmbedded.
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4--- /dev/null 2003-09-23 18:19:32.000000000 -0400
5+++ OpenSP-1.5/m4/codeset.m4 2004-01-20 03:01:28.000000000 -0500
6@@ -0,0 +1,23 @@
7+# codeset.m4 serial AM1 (gettext-0.10.40)
8+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
9+dnl This file is free software, distributed under the terms of the GNU
10+dnl General Public License. As a special exception to the GNU General
11+dnl Public License, this file may be distributed as part of a program
12+dnl that contains a configuration script generated by Autoconf, under
13+dnl the same distribution terms as the rest of that program.
14+
15+dnl From Bruno Haible.
16+
17+AC_DEFUN([AM_LANGINFO_CODESET],
18+[
19+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
20+ [AC_TRY_LINK([#include <langinfo.h>],
21+ [char* cs = nl_langinfo(CODESET);],
22+ am_cv_langinfo_codeset=yes,
23+ am_cv_langinfo_codeset=no)
24+ ])
25+ if test $am_cv_langinfo_codeset = yes; then
26+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
27+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
28+ fi
29+])
30--- /dev/null 2003-09-23 18:19:32.000000000 -0400
31+++ OpenSP-1.5/m4/gettext.m4 2004-01-20 03:01:28.000000000 -0500
32@@ -0,0 +1,587 @@
33+# gettext.m4 serial 17 (gettext-0.11.5)
34+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
35+dnl This file is free software, distributed under the terms of the GNU
36+dnl General Public License. As a special exception to the GNU General
37+dnl Public License, this file may be distributed as part of a program
38+dnl that contains a configuration script generated by Autoconf, under
39+dnl the same distribution terms as the rest of that program.
40+dnl
41+dnl This file can can be used in projects which are not available under
42+dnl the GNU General Public License or the GNU Library General Public
43+dnl License but which still want to provide support for the GNU gettext
44+dnl functionality.
45+dnl Please note that the actual code of the GNU gettext library is covered
46+dnl by the GNU Library General Public License, and the rest of the GNU
47+dnl gettext package package is covered by the GNU General Public License.
48+dnl They are *not* in the public domain.
49+
50+dnl Authors:
51+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
52+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
53+
54+dnl Macro to add for using GNU gettext.
55+
56+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
57+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
58+dnl default (if it is not specified or empty) is 'no-libtool'.
59+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
60+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
61+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
62+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
63+dnl depending on --{enable,disable}-{shared,static} and on the presence of
64+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
65+dnl $(top_builddir)/intl/libintl.a will be created.
66+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
67+dnl implementations (in libc or libintl) without the ngettext() function
68+dnl will be ignored. If NEEDSYMBOL is specified and is
69+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
70+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
71+dnl INTLDIR is used to find the intl libraries. If empty,
72+dnl the value `$(top_builddir)/intl/' is used.
73+dnl
74+dnl The result of the configuration is one of three cases:
75+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
76+dnl and used.
77+dnl Catalog format: GNU --> install in $(datadir)
78+dnl Catalog extension: .mo after installation, .gmo in source tree
79+dnl 2) GNU gettext has been found in the system's C library.
80+dnl Catalog format: GNU --> install in $(datadir)
81+dnl Catalog extension: .mo after installation, .gmo in source tree
82+dnl 3) No internationalization, always use English msgid.
83+dnl Catalog format: none
84+dnl Catalog extension: none
85+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
86+dnl The use of .gmo is historical (it was needed to avoid overwriting the
87+dnl GNU format catalogs when building on a platform with an X/Open gettext),
88+dnl but we keep it in order not to force irrelevant filename changes on the
89+dnl maintainers.
90+dnl
91+AC_DEFUN([AM_GNU_GETTEXT],
92+[
93+ dnl Argument checking.
94+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
95+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
96+])])])])])
97+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
98+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
99+])])])])
100+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
101+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
102+
103+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
104+ ifelse(gt_included_intl, yes, [
105+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
106+ ])
107+
108+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
109+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
110+ AC_REQUIRE([AC_LIB_RPATH])
111+
112+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
113+ dnl Ideally we would do this search only after the
114+ dnl if test "$USE_NLS" = "yes"; then
115+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
116+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
117+ dnl the configure script would need to contain the same shell code
118+ dnl again, outside any 'if'. There are two solutions:
119+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
120+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
121+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
122+ dnl documented, we avoid it.
123+ ifelse(gt_included_intl, yes, , [
124+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
125+ ])
126+
127+ AC_MSG_CHECKING([whether NLS is requested])
128+ dnl Default is enabled NLS
129+ AC_ARG_ENABLE(nls,
130+ [ --disable-nls do not use Native Language Support],
131+ USE_NLS=$enableval, USE_NLS=yes)
132+ AC_MSG_RESULT($USE_NLS)
133+ AC_SUBST(USE_NLS)
134+
135+ ifelse(gt_included_intl, yes, [
136+ BUILD_INCLUDED_LIBINTL=no
137+ USE_INCLUDED_LIBINTL=no
138+ ])
139+ LIBINTL=
140+ LTLIBINTL=
141+ POSUB=
142+
143+ dnl If we use NLS figure out what method
144+ if test "$USE_NLS" = "yes"; then
145+ gt_use_preinstalled_gnugettext=no
146+ ifelse(gt_included_intl, yes, [
147+ AC_MSG_CHECKING([whether included gettext is requested])
148+ AC_ARG_WITH(included-gettext,
149+ [ --with-included-gettext use the GNU gettext library included here],
150+ nls_cv_force_use_gnu_gettext=$withval,
151+ nls_cv_force_use_gnu_gettext=no)
152+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
153+
154+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
155+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
156+ ])
157+ dnl User does not insist on using GNU NLS library. Figure out what
158+ dnl to use. If GNU gettext is available we use this. Else we have
159+ dnl to fall back to GNU NLS library.
160+
161+ dnl Add a version number to the cache macros.
162+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
163+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
164+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
165+
166+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
167+ [AC_TRY_LINK([#include <libintl.h>
168+]ifelse([$2], [need-formatstring-macros],
169+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
170+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
171+#endif
172+changequote(,)dnl
173+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
174+changequote([,])dnl
175+], [])[extern int _nl_msg_cat_cntr;
176+extern int *_nl_domain_bindings;],
177+ [bindtextdomain ("", "");
178+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
179+ gt_cv_func_gnugettext_libc=yes,
180+ gt_cv_func_gnugettext_libc=no)])
181+
182+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
183+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
184+ ifelse(gt_included_intl, yes, , [
185+ AM_ICONV_LINK
186+ ])
187+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
188+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
189+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
190+ dnl even if libiconv doesn't exist.
191+ AC_LIB_LINKFLAGS_BODY([intl])
192+ AC_CACHE_CHECK([for GNU gettext in libintl],
193+ gt_cv_func_gnugettext_libintl,
194+ [gt_save_CPPFLAGS="$CPPFLAGS"
195+ CPPFLAGS="$CPPFLAGS $INCINTL"
196+ gt_save_LIBS="$LIBS"
197+ LIBS="$LIBS $LIBINTL"
198+ dnl Now see whether libintl exists and does not depend on libiconv.
199+ AC_TRY_LINK([#include <libintl.h>
200+]ifelse([$2], [need-formatstring-macros],
201+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
202+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
203+#endif
204+changequote(,)dnl
205+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
206+changequote([,])dnl
207+], [])[extern int _nl_msg_cat_cntr;
208+extern
209+#ifdef __cplusplus
210+"C"
211+#endif
212+const char *_nl_expand_alias ();],
213+ [bindtextdomain ("", "");
214+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
215+ gt_cv_func_gnugettext_libintl=yes,
216+ gt_cv_func_gnugettext_libintl=no)
217+ dnl Now see whether libintl exists and depends on libiconv.
218+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
219+ LIBS="$LIBS $LIBICONV"
220+ AC_TRY_LINK([#include <libintl.h>
221+]ifelse([$2], [need-formatstring-macros],
222+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
223+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
224+#endif
225+changequote(,)dnl
226+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
227+changequote([,])dnl
228+], [])[extern int _nl_msg_cat_cntr;
229+extern
230+#ifdef __cplusplus
231+"C"
232+#endif
233+const char *_nl_expand_alias ();],
234+ [bindtextdomain ("", "");
235+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
236+ [LIBINTL="$LIBINTL $LIBICONV"
237+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
238+ gt_cv_func_gnugettext_libintl=yes
239+ ])
240+ fi
241+ CPPFLAGS="$gt_save_CPPFLAGS"
242+ LIBS="$gt_save_LIBS"])
243+ fi
244+
245+ dnl If an already present or preinstalled GNU gettext() is found,
246+ dnl use it. But if this macro is used in GNU gettext, and GNU
247+ dnl gettext is already preinstalled in libintl, we update this
248+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
249+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
250+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
251+ && test "$PACKAGE" != gettext; }; then
252+ gt_use_preinstalled_gnugettext=yes
253+ else
254+ dnl Reset the values set by searching for libintl.
255+ LIBINTL=
256+ LTLIBINTL=
257+ INCINTL=
258+ fi
259+
260+ ifelse(gt_included_intl, yes, [
261+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
262+ dnl GNU gettext is not found in the C library.
263+ dnl Fall back on included GNU gettext library.
264+ nls_cv_use_gnu_gettext=yes
265+ fi
266+ fi
267+
268+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
269+ dnl Mark actions used to generate GNU NLS library.
270+ INTLOBJS="\$(GETTOBJS)"
271+ BUILD_INCLUDED_LIBINTL=yes
272+ USE_INCLUDED_LIBINTL=yes
273+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
274+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
275+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
276+ fi
277+
278+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
279+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
280+ dnl Mark actions to use GNU gettext tools.
281+ CATOBJEXT=.gmo
282+ fi
283+ ])
284+
285+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
286+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
287+ AC_DEFINE(ENABLE_NLS, 1,
288+ [Define to 1 if translation of program messages to the user's native language
289+ is requested.])
290+ else
291+ USE_NLS=no
292+ fi
293+ fi
294+
295+ if test "$USE_NLS" = "yes"; then
296+
297+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
298+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
299+ AC_MSG_CHECKING([how to link with libintl])
300+ AC_MSG_RESULT([$LIBINTL])
301+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
302+ fi
303+
304+ dnl For backward compatibility. Some packages may be using this.
305+ AC_DEFINE(HAVE_GETTEXT, 1,
306+ [Define if the GNU gettext() function is already present or preinstalled.])
307+ AC_DEFINE(HAVE_DCGETTEXT, 1,
308+ [Define if the GNU dcgettext() function is already present or preinstalled.])
309+ fi
310+
311+ dnl We need to process the po/ directory.
312+ POSUB=po
313+ fi
314+
315+ ifelse(gt_included_intl, yes, [
316+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
317+ dnl to 'yes' because some of the testsuite requires it.
318+ if test "$PACKAGE" = gettext; then
319+ BUILD_INCLUDED_LIBINTL=yes
320+ fi
321+
322+ dnl Make all variables we use known to autoconf.
323+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
324+ AC_SUBST(USE_INCLUDED_LIBINTL)
325+ AC_SUBST(CATOBJEXT)
326+ AC_SUBST(INTLOBJS)
327+
328+ dnl For backward compatibility. Some configure.ins may be using this.
329+ nls_cv_header_intl=
330+ nls_cv_header_libgt=
331+
332+ dnl For backward compatibility. Some Makefiles may be using this.
333+ DATADIRNAME=share
334+ AC_SUBST(DATADIRNAME)
335+
336+ dnl For backward compatibility. Some Makefiles may be using this.
337+ INSTOBJEXT=.mo
338+ AC_SUBST(INSTOBJEXT)
339+
340+ dnl For backward compatibility. Some Makefiles may be using this.
341+ GENCAT=gencat
342+ AC_SUBST(GENCAT)
343+
344+ dnl Enable libtool support if the surrounding package wishes it.
345+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
346+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
347+ ])
348+
349+ dnl For backward compatibility. Some Makefiles may be using this.
350+ INTLLIBS="$LIBINTL"
351+ AC_SUBST(INTLLIBS)
352+
353+ dnl Make all documented variables known to autoconf.
354+ AC_SUBST(LIBINTL)
355+ AC_SUBST(LTLIBINTL)
356+ AC_SUBST(POSUB)
357+])
358+
359+
360+dnl Checks for all prerequisites of the po subdirectory,
361+dnl except for USE_NLS.
362+AC_DEFUN([AM_PO_SUBDIRS],
363+[
364+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
365+ AC_REQUIRE([AC_PROG_INSTALL])dnl
366+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
367+
368+ dnl Perform the following tests also if --disable-nls has been given,
369+ dnl because they are needed for "make dist" to work.
370+
371+ dnl Search for GNU msgfmt in the PATH.
372+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
373+ dnl The second test excludes FreeBSD msgfmt.
374+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
375+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
376+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
377+ :)
378+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
379+
380+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
381+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
382+ dnl The second test excludes FreeBSD xgettext.
383+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
384+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
385+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
386+ :)
387+ dnl Remove leftover from FreeBSD xgettext call.
388+ rm -f messages.po
389+
390+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
391+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
392+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
393+
394+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
395+ dnl Test whether we really found GNU msgfmt.
396+ if test "$GMSGFMT" != ":"; then
397+ dnl If it is no GNU msgfmt we define it as : so that the
398+ dnl Makefiles still can work.
399+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
400+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
401+ : ;
402+ else
403+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
404+ AC_MSG_RESULT(
405+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
406+ GMSGFMT=":"
407+ fi
408+ fi
409+
410+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
411+ dnl Test whether we really found GNU xgettext.
412+ if test "$XGETTEXT" != ":"; then
413+ dnl If it is no GNU xgettext we define it as : so that the
414+ dnl Makefiles still can work.
415+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
416+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
417+ : ;
418+ else
419+ AC_MSG_RESULT(
420+ [found xgettext program is not GNU xgettext; ignore it])
421+ XGETTEXT=":"
422+ fi
423+ dnl Remove leftover from FreeBSD xgettext call.
424+ rm -f messages.po
425+ fi
426+
427+ AC_OUTPUT_COMMANDS([
428+ for ac_file in $CONFIG_FILES; do
429+ # Support "outfile[:infile[:infile...]]"
430+ case "$ac_file" in
431+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
432+ esac
433+ # PO directories have a Makefile.in generated from Makefile.in.in.
434+ case "$ac_file" in */Makefile.in)
435+ # Adjust a relative srcdir.
436+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
437+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
438+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
439+ # In autoconf-2.13 it is called $ac_given_srcdir.
440+ # In autoconf-2.50 it is called $srcdir.
441+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
442+ case "$ac_given_srcdir" in
443+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
444+ /*) top_srcdir="$ac_given_srcdir" ;;
445+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
446+ esac
447+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
448+ rm -f "$ac_dir/POTFILES"
449+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
450+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
451+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
452+ # on $ac_dir but don't depend on user-specified configuration
453+ # parameters.
454+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
455+ # The LINGUAS file contains the set of available languages.
456+ if test -n "$ALL_LINGUAS"; then
457+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
458+ fi
459+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
460+ # Hide the ALL_LINGUAS assigment from automake.
461+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
462+ fi
463+ case "$ac_given_srcdir" in
464+ .) srcdirpre= ;;
465+ *) srcdirpre='$(srcdir)/' ;;
466+ esac
467+ POFILES=
468+ GMOFILES=
469+ UPDATEPOFILES=
470+ DUMMYPOFILES=
471+ for lang in $ALL_LINGUAS; do
472+ POFILES="$POFILES $srcdirpre$lang.po"
473+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
474+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
475+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
476+ done
477+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
478+ # environment variable.
479+ INST_LINGUAS=
480+ if test -n "$ALL_LINGUAS"; then
481+ for presentlang in $ALL_LINGUAS; do
482+ useit=no
483+ if test "%UNSET%" != "$LINGUAS"; then
484+ desiredlanguages="$LINGUAS"
485+ else
486+ desiredlanguages="$ALL_LINGUAS"
487+ fi
488+ for desiredlang in $desiredlanguages; do
489+ # Use the presentlang catalog if desiredlang is
490+ # a. equal to presentlang, or
491+ # b. a variant of presentlang (because in this case,
492+ # presentlang can be used as a fallback for messages
493+ # which are not translated in the desiredlang catalog).
494+ case "$desiredlang" in
495+ "$presentlang"*) useit=yes;;
496+ esac
497+ done
498+ if test $useit = yes; then
499+ INST_LINGUAS="$INST_LINGUAS $presentlang"
500+ fi
501+ done
502+ fi
503+ CATALOGS=
504+ if test -n "$INST_LINGUAS"; then
505+ for lang in $INST_LINGUAS; do
506+ CATALOGS="$CATALOGS $lang.gmo"
507+ done
508+ fi
509+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
510+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
511+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
512+ if test -f "$f"; then
513+ case "$f" in
514+ *.orig | *.bak | *~) ;;
515+ *) cat "$f" >> "$ac_dir/Makefile" ;;
516+ esac
517+ fi
518+ done
519+ fi
520+ ;;
521+ esac
522+ done],
523+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
524+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
525+ # from automake.
526+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
527+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
528+ LINGUAS="${LINGUAS-%UNSET%}"
529+ ])
530+])
531+
532+
533+dnl Checks for all prerequisites of the intl subdirectory,
534+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
535+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
536+AC_DEFUN([AM_INTL_SUBDIR],
537+[
538+ AC_REQUIRE([AC_PROG_INSTALL])dnl
539+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
540+ AC_REQUIRE([AC_PROG_CC])dnl
541+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
542+ AC_REQUIRE([AC_PROG_RANLIB])dnl
543+ AC_REQUIRE([AC_ISC_POSIX])dnl
544+ AC_REQUIRE([AC_HEADER_STDC])dnl
545+ AC_REQUIRE([AC_C_CONST])dnl
546+ AC_REQUIRE([AC_C_INLINE])dnl
547+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
548+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
549+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
550+ AC_REQUIRE([AC_FUNC_MMAP])dnl
551+ AC_REQUIRE([jm_GLIBC21])dnl
552+ AC_REQUIRE([gt_INTDIV0])dnl
553+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
554+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
555+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
556+
557+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
558+stdlib.h string.h unistd.h sys/param.h])
559+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
560+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
561+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
562+
563+ AM_ICONV
564+ AM_LANGINFO_CODESET
565+ if test $ac_cv_header_locale_h = yes; then
566+ AM_LC_MESSAGES
567+ fi
568+
569+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
570+ dnl because plural.y uses bison specific features. It requires at least
571+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
572+ dnl compile.
573+ dnl bison is only needed for the maintainer (who touches plural.y). But in
574+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
575+ dnl the rule in general Makefile. Now, some people carelessly touch the
576+ dnl files or have a broken "make" program, hence the plural.c rule will
577+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
578+ dnl present or too old.
579+ AC_CHECK_PROGS([INTLBISON], [bison])
580+ if test -z "$INTLBISON"; then
581+ ac_verc_fail=yes
582+ else
583+ dnl Found it, now check the version.
584+ AC_MSG_CHECKING([version of bison])
585+changequote(<<,>>)dnl
586+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
587+ case $ac_prog_version in
588+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
589+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
590+changequote([,])dnl
591+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
592+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
593+ esac
594+ AC_MSG_RESULT([$ac_prog_version])
595+ fi
596+ if test $ac_verc_fail = yes; then
597+ INTLBISON=:
598+ fi
599+])
600+
601+
602+AC_DEFUN([AM_MKINSTALLDIRS],
603+[
604+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
605+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
606+ dnl Try to locate is.
607+ MKINSTALLDIRS=
608+ if test -n "$ac_aux_dir"; then
609+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
610+ fi
611+ if test -z "$MKINSTALLDIRS"; then
612+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
613+ fi
614+ AC_SUBST(MKINSTALLDIRS)
615+])
616+
617+
618+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
619+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
620--- /dev/null 2003-09-23 18:19:32.000000000 -0400
621+++ OpenSP-1.5/m4/glibc21.m4 2004-01-20 03:01:28.000000000 -0500
622@@ -0,0 +1,32 @@
623+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
624+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
625+dnl This file is free software, distributed under the terms of the GNU
626+dnl General Public License. As a special exception to the GNU General
627+dnl Public License, this file may be distributed as part of a program
628+dnl that contains a configuration script generated by Autoconf, under
629+dnl the same distribution terms as the rest of that program.
630+
631+# Test for the GNU C Library, version 2.1 or newer.
632+# From Bruno Haible.
633+
634+AC_DEFUN([jm_GLIBC21],
635+ [
636+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
637+ ac_cv_gnu_library_2_1,
638+ [AC_EGREP_CPP([Lucky GNU user],
639+ [
640+#include <features.h>
641+#ifdef __GNU_LIBRARY__
642+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
643+ Lucky GNU user
644+ #endif
645+#endif
646+ ],
647+ ac_cv_gnu_library_2_1=yes,
648+ ac_cv_gnu_library_2_1=no)
649+ ]
650+ )
651+ AC_SUBST(GLIBC21)
652+ GLIBC21="$ac_cv_gnu_library_2_1"
653+ ]
654+)
655--- /dev/null 2003-09-23 18:19:32.000000000 -0400
656+++ OpenSP-1.5/m4/iconv.m4 2004-01-20 03:01:28.000000000 -0500
657@@ -0,0 +1,103 @@
658+# iconv.m4 serial AM4 (gettext-0.11.3)
659+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
660+dnl This file is free software, distributed under the terms of the GNU
661+dnl General Public License. As a special exception to the GNU General
662+dnl Public License, this file may be distributed as part of a program
663+dnl that contains a configuration script generated by Autoconf, under
664+dnl the same distribution terms as the rest of that program.
665+
666+dnl From Bruno Haible.
667+
668+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
669+[
670+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
671+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
672+ AC_REQUIRE([AC_LIB_RPATH])
673+
674+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
675+ dnl accordingly.
676+ AC_LIB_LINKFLAGS_BODY([iconv])
677+])
678+
679+AC_DEFUN([AM_ICONV_LINK],
680+[
681+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
682+ dnl those with the standalone portable GNU libiconv installed).
683+
684+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
685+ dnl accordingly.
686+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
687+
688+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
689+ dnl because if the user has installed libiconv and not disabled its use
690+ dnl via --without-libiconv-prefix, he wants to use it. The first
691+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
692+ am_save_CPPFLAGS="$CPPFLAGS"
693+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
694+
695+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
696+ am_cv_func_iconv="no, consider installing GNU libiconv"
697+ am_cv_lib_iconv=no
698+ AC_TRY_LINK([#include <stdlib.h>
699+#include <iconv.h>],
700+ [iconv_t cd = iconv_open("","");
701+ iconv(cd,NULL,NULL,NULL,NULL);
702+ iconv_close(cd);],
703+ am_cv_func_iconv=yes)
704+ if test "$am_cv_func_iconv" != yes; then
705+ am_save_LIBS="$LIBS"
706+ LIBS="$LIBS $LIBICONV"
707+ AC_TRY_LINK([#include <stdlib.h>
708+#include <iconv.h>],
709+ [iconv_t cd = iconv_open("","");
710+ iconv(cd,NULL,NULL,NULL,NULL);
711+ iconv_close(cd);],
712+ am_cv_lib_iconv=yes
713+ am_cv_func_iconv=yes)
714+ LIBS="$am_save_LIBS"
715+ fi
716+ ])
717+ if test "$am_cv_func_iconv" = yes; then
718+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
719+ fi
720+ if test "$am_cv_lib_iconv" = yes; then
721+ AC_MSG_CHECKING([how to link with libiconv])
722+ AC_MSG_RESULT([$LIBICONV])
723+ else
724+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
725+ dnl either.
726+ CPPFLAGS="$am_save_CPPFLAGS"
727+ LIBICONV=
728+ LTLIBICONV=
729+ fi
730+ AC_SUBST(LIBICONV)
731+ AC_SUBST(LTLIBICONV)
732+])
733+
734+AC_DEFUN([AM_ICONV],
735+[
736+ AM_ICONV_LINK
737+ if test "$am_cv_func_iconv" = yes; then
738+ AC_MSG_CHECKING([for iconv declaration])
739+ AC_CACHE_VAL(am_cv_proto_iconv, [
740+ AC_TRY_COMPILE([
741+#include <stdlib.h>
742+#include <iconv.h>
743+extern
744+#ifdef __cplusplus
745+"C"
746+#endif
747+#if defined(__STDC__) || defined(__cplusplus)
748+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
749+#else
750+size_t iconv();
751+#endif
752+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
753+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
754+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
755+ AC_MSG_RESULT([$]{ac_t:-
756+ }[$]am_cv_proto_iconv)
757+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
758+ [Define as const if the declaration of iconv() needs const.])
759+ fi
760+])
761--- /dev/null 2003-09-23 18:19:32.000000000 -0400
762+++ OpenSP-1.5/m4/intdiv0.m4 2004-01-20 03:01:28.000000000 -0500
763@@ -0,0 +1,72 @@
764+# intdiv0.m4 serial 1 (gettext-0.11.3)
765+dnl Copyright (C) 2002 Free Software Foundation, Inc.
766+dnl This file is free software, distributed under the terms of the GNU
767+dnl General Public License. As a special exception to the GNU General
768+dnl Public License, this file may be distributed as part of a program
769+dnl that contains a configuration script generated by Autoconf, under
770+dnl the same distribution terms as the rest of that program.
771+
772+dnl From Bruno Haible.
773+
774+AC_DEFUN([gt_INTDIV0],
775+[
776+ AC_REQUIRE([AC_PROG_CC])dnl
777+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
778+
779+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
780+ gt_cv_int_divbyzero_sigfpe,
781+ [
782+ AC_TRY_RUN([
783+#include <stdlib.h>
784+#include <signal.h>
785+
786+static void
787+#ifdef __cplusplus
788+sigfpe_handler (int sig)
789+#else
790+sigfpe_handler (sig) int sig;
791+#endif
792+{
793+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
794+ exit (sig != SIGFPE);
795+}
796+
797+int x = 1;
798+int y = 0;
799+int z;
800+int nan;
801+
802+int main ()
803+{
804+ signal (SIGFPE, sigfpe_handler);
805+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
806+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
807+ signal (SIGTRAP, sigfpe_handler);
808+#endif
809+/* Linux/SPARC yields signal SIGILL. */
810+#if defined (__sparc__) && defined (__linux__)
811+ signal (SIGILL, sigfpe_handler);
812+#endif
813+
814+ z = x / y;
815+ nan = y / y;
816+ exit (1);
817+}
818+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
819+ [
820+ # Guess based on the CPU.
821+ case "$host_cpu" in
822+ alpha* | i[34567]86 | m68k | s390*)
823+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
824+ *)
825+ gt_cv_int_divbyzero_sigfpe="guessing no";;
826+ esac
827+ ])
828+ ])
829+ case "$gt_cv_int_divbyzero_sigfpe" in
830+ *yes) value=1;;
831+ *) value=0;;
832+ esac
833+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
834+ [Define if integer division by zero raises signal SIGFPE.])
835+])
836--- /dev/null 2003-09-23 18:19:32.000000000 -0400
837+++ OpenSP-1.5/m4/inttypes_h.m4 2004-01-20 03:01:28.000000000 -0500
838@@ -0,0 +1,28 @@
839+# inttypes_h.m4 serial 4 (gettext-0.11.4)
840+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
841+dnl This file is free software, distributed under the terms of the GNU
842+dnl General Public License. As a special exception to the GNU General
843+dnl Public License, this file may be distributed as part of a program
844+dnl that contains a configuration script generated by Autoconf, under
845+dnl the same distribution terms as the rest of that program.
846+
847+dnl From Paul Eggert.
848+
849+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
850+# doesn't clash with <sys/types.h>, and declares uintmax_t.
851+
852+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
853+[
854+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
855+ [AC_TRY_COMPILE(
856+ [#include <sys/types.h>
857+#include <inttypes.h>],
858+ [uintmax_t i = (uintmax_t) -1;],
859+ jm_ac_cv_header_inttypes_h=yes,
860+ jm_ac_cv_header_inttypes_h=no)])
861+ if test $jm_ac_cv_header_inttypes_h = yes; then
862+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
863+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
864+ and declares uintmax_t. ])
865+ fi
866+])
867--- /dev/null 2003-09-23 18:19:32.000000000 -0400
868+++ OpenSP-1.5/m4/inttypes.m4 2004-01-20 03:01:28.000000000 -0500
869@@ -0,0 +1,27 @@
870+# inttypes.m4 serial 1 (gettext-0.11.4)
871+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
872+dnl This file is free software, distributed under the terms of the GNU
873+dnl General Public License. As a special exception to the GNU General
874+dnl Public License, this file may be distributed as part of a program
875+dnl that contains a configuration script generated by Autoconf, under
876+dnl the same distribution terms as the rest of that program.
877+
878+dnl From Paul Eggert.
879+
880+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
881+# <sys/types.h>.
882+
883+AC_DEFUN([gt_HEADER_INTTYPES_H],
884+[
885+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
886+ [
887+ AC_TRY_COMPILE(
888+ [#include <sys/types.h>
889+#include <inttypes.h>],
890+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
891+ ])
892+ if test $gt_cv_header_inttypes_h = yes; then
893+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
894+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
895+ fi
896+])
897--- /dev/null 2003-09-23 18:19:32.000000000 -0400
898+++ OpenSP-1.5/m4/inttypes-pri.m4 2004-01-20 03:01:28.000000000 -0500
899@@ -0,0 +1,32 @@
900+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
901+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
902+dnl This file is free software, distributed under the terms of the GNU
903+dnl General Public License. As a special exception to the GNU General
904+dnl Public License, this file may be distributed as part of a program
905+dnl that contains a configuration script generated by Autoconf, under
906+dnl the same distribution terms as the rest of that program.
907+
908+dnl From Bruno Haible.
909+
910+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
911+# macros to non-string values. This is the case on AIX 4.3.3.
912+
913+AC_DEFUN([gt_INTTYPES_PRI],
914+[
915+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
916+ if test $gt_cv_header_inttypes_h = yes; then
917+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
918+ gt_cv_inttypes_pri_broken,
919+ [
920+ AC_TRY_COMPILE([#include <inttypes.h>
921+#ifdef PRId32
922+char *p = PRId32;
923+#endif
924+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
925+ ])
926+ fi
927+ if test "$gt_cv_inttypes_pri_broken" = yes; then
928+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
929+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
930+ fi
931+])
932--- /dev/null 2003-09-23 18:19:32.000000000 -0400
933+++ OpenSP-1.5/m4/lcmessage.m4 2004-01-20 03:01:28.000000000 -0500
934@@ -0,0 +1,32 @@
935+# lcmessage.m4 serial 3 (gettext-0.11.3)
936+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
937+dnl This file is free software, distributed under the terms of the GNU
938+dnl General Public License. As a special exception to the GNU General
939+dnl Public License, this file may be distributed as part of a program
940+dnl that contains a configuration script generated by Autoconf, under
941+dnl the same distribution terms as the rest of that program.
942+dnl
943+dnl This file can can be used in projects which are not available under
944+dnl the GNU General Public License or the GNU Library General Public
945+dnl License but which still want to provide support for the GNU gettext
946+dnl functionality.
947+dnl Please note that the actual code of the GNU gettext library is covered
948+dnl by the GNU Library General Public License, and the rest of the GNU
949+dnl gettext package package is covered by the GNU General Public License.
950+dnl They are *not* in the public domain.
951+
952+dnl Authors:
953+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
954+
955+# Check whether LC_MESSAGES is available in <locale.h>.
956+
957+AC_DEFUN([AM_LC_MESSAGES],
958+[
959+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
960+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
961+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
962+ if test $am_cv_val_LC_MESSAGES = yes; then
963+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
964+ [Define if your <locale.h> file defines LC_MESSAGES.])
965+ fi
966+])
967--- /dev/null 2003-09-23 18:19:32.000000000 -0400
968+++ OpenSP-1.5/m4/progtest.m4 2004-01-20 03:01:28.000000000 -0500
969@@ -0,0 +1,59 @@
970+# progtest.m4 serial 2 (gettext-0.10.40)
971+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
972+dnl This file is free software, distributed under the terms of the GNU
973+dnl General Public License. As a special exception to the GNU General
974+dnl Public License, this file may be distributed as part of a program
975+dnl that contains a configuration script generated by Autoconf, under
976+dnl the same distribution terms as the rest of that program.
977+dnl
978+dnl This file can can be used in projects which are not available under
979+dnl the GNU General Public License or the GNU Library General Public
980+dnl License but which still want to provide support for the GNU gettext
981+dnl functionality.
982+dnl Please note that the actual code of the GNU gettext library is covered
983+dnl by the GNU Library General Public License, and the rest of the GNU
984+dnl gettext package package is covered by the GNU General Public License.
985+dnl They are *not* in the public domain.
986+
987+dnl Authors:
988+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
989+
990+# Search path for a program which passes the given test.
991+
992+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
993+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
994+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
995+[# Extract the first word of "$2", so it can be a program name with args.
996+set dummy $2; ac_word=[$]2
997+AC_MSG_CHECKING([for $ac_word])
998+AC_CACHE_VAL(ac_cv_path_$1,
999+[case "[$]$1" in
1000+ /*)
1001+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1002+ ;;
1003+ *)
1004+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1005+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
1006+ test -z "$ac_dir" && ac_dir=.
1007+ if test -f $ac_dir/$ac_word; then
1008+ if [$3]; then
1009+ ac_cv_path_$1="$ac_dir/$ac_word"
1010+ break
1011+ fi
1012+ fi
1013+ done
1014+ IFS="$ac_save_ifs"
1015+dnl If no 4th arg is given, leave the cache variable unset,
1016+dnl so AC_PATH_PROGS will keep looking.
1017+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1018+])dnl
1019+ ;;
1020+esac])dnl
1021+$1="$ac_cv_path_$1"
1022+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1023+ AC_MSG_RESULT([$]$1)
1024+else
1025+ AC_MSG_RESULT(no)
1026+fi
1027+AC_SUBST($1)dnl
1028+])
1029--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1030+++ OpenSP-1.5/m4/stdint_h.m4 2004-01-20 03:01:28.000000000 -0500
1031@@ -0,0 +1,28 @@
1032+# stdint_h.m4 serial 2 (gettext-0.11.4)
1033+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1034+dnl This file is free software, distributed under the terms of the GNU
1035+dnl General Public License. As a special exception to the GNU General
1036+dnl Public License, this file may be distributed as part of a program
1037+dnl that contains a configuration script generated by Autoconf, under
1038+dnl the same distribution terms as the rest of that program.
1039+
1040+dnl From Paul Eggert.
1041+
1042+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
1043+# doesn't clash with <sys/types.h>, and declares uintmax_t.
1044+
1045+AC_DEFUN([jm_AC_HEADER_STDINT_H],
1046+[
1047+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
1048+ [AC_TRY_COMPILE(
1049+ [#include <sys/types.h>
1050+#include <stdint.h>],
1051+ [uintmax_t i = (uintmax_t) -1;],
1052+ jm_ac_cv_header_stdint_h=yes,
1053+ jm_ac_cv_header_stdint_h=no)])
1054+ if test $jm_ac_cv_header_stdint_h = yes; then
1055+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
1056+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
1057+ and declares uintmax_t. ])
1058+ fi
1059+])
1060--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1061+++ OpenSP-1.5/m4/uintmax_t.m4 2004-01-20 03:01:28.000000000 -0500
1062@@ -0,0 +1,29 @@
1063+# uintmax_t.m4 serial 6 (gettext-0.11)
1064+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1065+dnl This file is free software, distributed under the terms of the GNU
1066+dnl General Public License. As a special exception to the GNU General
1067+dnl Public License, this file may be distributed as part of a program
1068+dnl that contains a configuration script generated by Autoconf, under
1069+dnl the same distribution terms as the rest of that program.
1070+
1071+dnl From Paul Eggert.
1072+
1073+AC_PREREQ(2.13)
1074+
1075+# Define uintmax_t to `unsigned long' or `unsigned long long'
1076+# if <inttypes.h> does not exist.
1077+
1078+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
1079+[
1080+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
1081+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
1082+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
1083+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
1084+ test $ac_cv_type_unsigned_long_long = yes \
1085+ && ac_type='unsigned long long' \
1086+ || ac_type='unsigned long'
1087+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
1088+ [Define to unsigned long or unsigned long long
1089+ if <inttypes.h> and <stdint.h> don't define.])
1090+ fi
1091+])
1092--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1093+++ OpenSP-1.5/m4/ulonglong.m4 2004-01-20 03:01:28.000000000 -0500
1094@@ -0,0 +1,23 @@
1095+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
1096+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
1097+dnl This file is free software, distributed under the terms of the GNU
1098+dnl General Public License. As a special exception to the GNU General
1099+dnl Public License, this file may be distributed as part of a program
1100+dnl that contains a configuration script generated by Autoconf, under
1101+dnl the same distribution terms as the rest of that program.
1102+
1103+dnl From Paul Eggert.
1104+
1105+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
1106+[
1107+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
1108+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
1109+ [unsigned long long ullmax = (unsigned long long) -1;
1110+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
1111+ ac_cv_type_unsigned_long_long=yes,
1112+ ac_cv_type_unsigned_long_long=no)])
1113+ if test $ac_cv_type_unsigned_long_long = yes; then
1114+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
1115+ [Define if you have the unsigned long long type.])
1116+ fi
1117+])
1118--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1119+++ OpenSP-1.5/m4/lib-ld.m4 2004-01-20 03:02:17.000000000 -0500
1120@@ -0,0 +1,97 @@
1121+# lib-ld.m4 serial 1 (gettext-0.11)
1122+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
1123+dnl This file is free software, distributed under the terms of the GNU
1124+dnl General Public License. As a special exception to the GNU General
1125+dnl Public License, this file may be distributed as part of a program
1126+dnl that contains a configuration script generated by Autoconf, under
1127+dnl the same distribution terms as the rest of that program.
1128+
1129+dnl Subroutines of libtool.m4,
1130+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1131+dnl with libtool.m4.
1132+
1133+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1134+AC_DEFUN([AC_LIB_PROG_LD_GNU],
1135+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1136+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1137+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1138+ acl_cv_prog_gnu_ld=yes
1139+else
1140+ acl_cv_prog_gnu_ld=no
1141+fi])
1142+with_gnu_ld=$acl_cv_prog_gnu_ld
1143+])
1144+
1145+dnl From libtool-1.4. Sets the variable LD.
1146+AC_DEFUN([AC_LIB_PROG_LD],
1147+[AC_ARG_WITH(gnu-ld,
1148+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1149+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1150+AC_REQUIRE([AC_PROG_CC])dnl
1151+AC_REQUIRE([AC_CANONICAL_HOST])dnl
1152+ac_prog=ld
1153+if test "$GCC" = yes; then
1154+ # Check if gcc -print-prog-name=ld gives a path.
1155+ AC_MSG_CHECKING([for ld used by GCC])
1156+ case $host in
1157+ *-*-mingw*)
1158+ # gcc leaves a trailing carriage return which upsets mingw
1159+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1160+ *)
1161+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1162+ esac
1163+ case $ac_prog in
1164+ # Accept absolute paths.
1165+ [[\\/]* | [A-Za-z]:[\\/]*)]
1166+ [re_direlt='/[^/][^/]*/\.\./']
1167+ # Canonicalize the path of ld
1168+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1169+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1170+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1171+ done
1172+ test -z "$LD" && LD="$ac_prog"
1173+ ;;
1174+ "")
1175+ # If it fails, then pretend we aren't using GCC.
1176+ ac_prog=ld
1177+ ;;
1178+ *)
1179+ # If it is relative, then search for the first ld in PATH.
1180+ with_gnu_ld=unknown
1181+ ;;
1182+ esac
1183+elif test "$with_gnu_ld" = yes; then
1184+ AC_MSG_CHECKING([for GNU ld])
1185+else
1186+ AC_MSG_CHECKING([for non-GNU ld])
1187+fi
1188+AC_CACHE_VAL(acl_cv_path_LD,
1189+[if test -z "$LD"; then
1190+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1191+ for ac_dir in $PATH; do
1192+ test -z "$ac_dir" && ac_dir=.
1193+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1194+ acl_cv_path_LD="$ac_dir/$ac_prog"
1195+ # Check to see if the program is GNU ld. I'd rather use --version,
1196+ # but apparently some GNU ld's only accept -v.
1197+ # Break only if it was the GNU/non-GNU ld that we prefer.
1198+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1199+ test "$with_gnu_ld" != no && break
1200+ else
1201+ test "$with_gnu_ld" != yes && break
1202+ fi
1203+ fi
1204+ done
1205+ IFS="$ac_save_ifs"
1206+else
1207+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
1208+fi])
1209+LD="$acl_cv_path_LD"
1210+if test -n "$LD"; then
1211+ AC_MSG_RESULT($LD)
1212+else
1213+ AC_MSG_RESULT(no)
1214+fi
1215+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1216+AC_LIB_PROG_LD_GNU
1217+])
1218--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1219+++ OpenSP-1.5/m4/lib-link.m4 2004-01-20 03:02:17.000000000 -0500
1220@@ -0,0 +1,554 @@
1221+# lib-link.m4 serial 3 (gettext-0.11.3)
1222+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1223+dnl This file is free software, distributed under the terms of the GNU
1224+dnl General Public License. As a special exception to the GNU General
1225+dnl Public License, this file may be distributed as part of a program
1226+dnl that contains a configuration script generated by Autoconf, under
1227+dnl the same distribution terms as the rest of that program.
1228+
1229+dnl From Bruno Haible.
1230+
1231+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1232+dnl the libraries corresponding to explicit and implicit dependencies.
1233+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1234+dnl augments the CPPFLAGS variable.
1235+AC_DEFUN([AC_LIB_LINKFLAGS],
1236+[
1237+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1238+ AC_REQUIRE([AC_LIB_RPATH])
1239+ define([Name],[translit([$1],[./-], [___])])
1240+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1241+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1242+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1243+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
1244+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1245+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1246+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1247+ ])
1248+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1249+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1250+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1251+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1252+ AC_SUBST([LIB]NAME)
1253+ AC_SUBST([LTLIB]NAME)
1254+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1255+ dnl results of this search when this library appears as a dependency.
1256+ HAVE_LIB[]NAME=yes
1257+ undefine([Name])
1258+ undefine([NAME])
1259+])
1260+
1261+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1262+dnl searches for libname and the libraries corresponding to explicit and
1263+dnl implicit dependencies, together with the specified include files and
1264+dnl the ability to compile and link the specified testcode. If found, it
1265+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1266+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1267+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1268+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1269+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1270+[
1271+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1272+ AC_REQUIRE([AC_LIB_RPATH])
1273+ define([Name],[translit([$1],[./-], [___])])
1274+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1275+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1276+
1277+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1278+ dnl accordingly.
1279+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
1280+
1281+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1282+ dnl because if the user has installed lib[]Name and not disabled its use
1283+ dnl via --without-lib[]Name-prefix, he wants to use it.
1284+ ac_save_CPPFLAGS="$CPPFLAGS"
1285+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1286+
1287+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1288+ ac_save_LIBS="$LIBS"
1289+ LIBS="$LIBS $LIB[]NAME"
1290+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1291+ LIBS="$ac_save_LIBS"
1292+ ])
1293+ if test "$ac_cv_lib[]Name" = yes; then
1294+ HAVE_LIB[]NAME=yes
1295+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1296+ AC_MSG_CHECKING([how to link with lib[]$1])
1297+ AC_MSG_RESULT([$LIB[]NAME])
1298+ else
1299+ HAVE_LIB[]NAME=no
1300+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1301+ dnl $INC[]NAME either.
1302+ CPPFLAGS="$ac_save_CPPFLAGS"
1303+ LIB[]NAME=
1304+ LTLIB[]NAME=
1305+ fi
1306+ AC_SUBST([HAVE_LIB]NAME)
1307+ AC_SUBST([LIB]NAME)
1308+ AC_SUBST([LTLIB]NAME)
1309+ undefine([Name])
1310+ undefine([NAME])
1311+])
1312+
1313+dnl Determine the platform dependent parameters needed to use rpath:
1314+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1315+dnl hardcode_direct, hardcode_minus_L,
1316+dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1317+AC_DEFUN([AC_LIB_RPATH],
1318+[
1319+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1320+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1321+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1322+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1323+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1324+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1325+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1326+ . ./conftest.sh
1327+ rm -f ./conftest.sh
1328+ acl_cv_rpath=done
1329+ ])
1330+ wl="$acl_cv_wl"
1331+ libext="$acl_cv_libext"
1332+ shlibext="$acl_cv_shlibext"
1333+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1334+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1335+ hardcode_direct="$acl_cv_hardcode_direct"
1336+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
1337+ sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1338+ sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1339+ dnl Determine whether the user wants rpath handling at all.
1340+ AC_ARG_ENABLE(rpath,
1341+ [ --disable-rpath do not hardcode runtime library paths],
1342+ :, enable_rpath=yes)
1343+])
1344+
1345+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1346+dnl the libraries corresponding to explicit and implicit dependencies.
1347+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1348+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1349+[
1350+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1351+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1352+ dnl By default, look in $includedir and $libdir.
1353+ use_additional=yes
1354+ AC_LIB_WITH_FINAL_PREFIX([
1355+ eval additional_includedir=\"$includedir\"
1356+ eval additional_libdir=\"$libdir\"
1357+ ])
1358+ AC_ARG_WITH([lib$1-prefix],
1359+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1360+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1361+[
1362+ if test "X$withval" = "Xno"; then
1363+ use_additional=no
1364+ else
1365+ if test "X$withval" = "X"; then
1366+ AC_LIB_WITH_FINAL_PREFIX([
1367+ eval additional_includedir=\"$includedir\"
1368+ eval additional_libdir=\"$libdir\"
1369+ ])
1370+ else
1371+ additional_includedir="$withval/include"
1372+ additional_libdir="$withval/lib"
1373+ fi
1374+ fi
1375+])
1376+ dnl Search the library and its dependencies in $additional_libdir and
1377+ dnl $LDFLAGS. Using breadth-first-seach.
1378+ LIB[]NAME=
1379+ LTLIB[]NAME=
1380+ INC[]NAME=
1381+ rpathdirs=
1382+ ltrpathdirs=
1383+ names_already_handled=
1384+ names_next_round='$1 $2'
1385+ while test -n "$names_next_round"; do
1386+ names_this_round="$names_next_round"
1387+ names_next_round=
1388+ for name in $names_this_round; do
1389+ already_handled=
1390+ for n in $names_already_handled; do
1391+ if test "$n" = "$name"; then
1392+ already_handled=yes
1393+ break
1394+ fi
1395+ done
1396+ if test -z "$already_handled"; then
1397+ names_already_handled="$names_already_handled $name"
1398+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1399+ dnl or AC_LIB_HAVE_LINKFLAGS call.
1400+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1401+ eval value=\"\$HAVE_LIB$uppername\"
1402+ if test -n "$value"; then
1403+ if test "$value" = yes; then
1404+ eval value=\"\$LIB$uppername\"
1405+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1406+ eval value=\"\$LTLIB$uppername\"
1407+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1408+ else
1409+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1410+ dnl that this library doesn't exist. So just drop it.
1411+ :
1412+ fi
1413+ else
1414+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1415+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
1416+ found_dir=
1417+ found_la=
1418+ found_so=
1419+ found_a=
1420+ if test $use_additional = yes; then
1421+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1422+ found_dir="$additional_libdir"
1423+ found_so="$additional_libdir/lib$name.$shlibext"
1424+ if test -f "$additional_libdir/lib$name.la"; then
1425+ found_la="$additional_libdir/lib$name.la"
1426+ fi
1427+ else
1428+ if test -f "$additional_libdir/lib$name.$libext"; then
1429+ found_dir="$additional_libdir"
1430+ found_a="$additional_libdir/lib$name.$libext"
1431+ if test -f "$additional_libdir/lib$name.la"; then
1432+ found_la="$additional_libdir/lib$name.la"
1433+ fi
1434+ fi
1435+ fi
1436+ fi
1437+ if test "X$found_dir" = "X"; then
1438+ for x in $LDFLAGS $LTLIB[]NAME; do
1439+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1440+ case "$x" in
1441+ -L*)
1442+ dir=`echo "X$x" | sed -e 's/^X-L//'`
1443+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1444+ found_dir="$dir"
1445+ found_so="$dir/lib$name.$shlibext"
1446+ if test -f "$dir/lib$name.la"; then
1447+ found_la="$dir/lib$name.la"
1448+ fi
1449+ else
1450+ if test -f "$dir/lib$name.$libext"; then
1451+ found_dir="$dir"
1452+ found_a="$dir/lib$name.$libext"
1453+ if test -f "$dir/lib$name.la"; then
1454+ found_la="$dir/lib$name.la"
1455+ fi
1456+ fi
1457+ fi
1458+ ;;
1459+ esac
1460+ if test "X$found_dir" != "X"; then
1461+ break
1462+ fi
1463+ done
1464+ fi
1465+ if test "X$found_dir" != "X"; then
1466+ dnl Found the library.
1467+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1468+ if test "X$found_so" != "X"; then
1469+ dnl Linking with a shared library. We attempt to hardcode its
1470+ dnl directory into the executable's runpath, unless it's the
1471+ dnl standard /usr/lib.
1472+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1473+ dnl No hardcoding is needed.
1474+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1475+ else
1476+ dnl Use an explicit option to hardcode DIR into the resulting
1477+ dnl binary.
1478+ dnl Potentially add DIR to ltrpathdirs.
1479+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1480+ haveit=
1481+ for x in $ltrpathdirs; do
1482+ if test "X$x" = "X$found_dir"; then
1483+ haveit=yes
1484+ break
1485+ fi
1486+ done
1487+ if test -z "$haveit"; then
1488+ ltrpathdirs="$ltrpathdirs $found_dir"
1489+ fi
1490+ dnl The hardcoding into $LIBNAME is system dependent.
1491+ if test "$hardcode_direct" = yes; then
1492+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1493+ dnl resulting binary.
1494+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1495+ else
1496+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1497+ dnl Use an explicit option to hardcode DIR into the resulting
1498+ dnl binary.
1499+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1500+ dnl Potentially add DIR to rpathdirs.
1501+ dnl The rpathdirs will be appended to $LIBNAME at the end.
1502+ haveit=
1503+ for x in $rpathdirs; do
1504+ if test "X$x" = "X$found_dir"; then
1505+ haveit=yes
1506+ break
1507+ fi
1508+ done
1509+ if test -z "$haveit"; then
1510+ rpathdirs="$rpathdirs $found_dir"
1511+ fi
1512+ else
1513+ dnl Rely on "-L$found_dir".
1514+ dnl But don't add it if it's already contained in the LDFLAGS
1515+ dnl or the already constructed $LIBNAME
1516+ haveit=
1517+ for x in $LDFLAGS $LIB[]NAME; do
1518+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1519+ if test "X$x" = "X-L$found_dir"; then
1520+ haveit=yes
1521+ break
1522+ fi
1523+ done
1524+ if test -z "$haveit"; then
1525+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1526+ fi
1527+ if test "$hardcode_minus_L" != no; then
1528+ dnl FIXME: Not sure whether we should use
1529+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1530+ dnl here.
1531+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1532+ else
1533+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1534+ dnl here, because this doesn't fit in flags passed to the
1535+ dnl compiler. So give up. No hardcoding. This affects only
1536+ dnl very old systems.
1537+ dnl FIXME: Not sure whether we should use
1538+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1539+ dnl here.
1540+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1541+ fi
1542+ fi
1543+ fi
1544+ fi
1545+ else
1546+ if test "X$found_a" != "X"; then
1547+ dnl Linking with a static library.
1548+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1549+ else
1550+ dnl We shouldn't come here, but anyway it's good to have a
1551+ dnl fallback.
1552+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1553+ fi
1554+ fi
1555+ dnl Assume the include files are nearby.
1556+ additional_includedir=
1557+ case "$found_dir" in
1558+ */lib | */lib/)
1559+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1560+ additional_includedir="$basedir/include"
1561+ ;;
1562+ esac
1563+ if test "X$additional_includedir" != "X"; then
1564+ dnl Potentially add $additional_includedir to $INCNAME.
1565+ dnl But don't add it
1566+ dnl 1. if it's the standard /usr/include,
1567+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1568+ dnl 3. if it's already present in $CPPFLAGS or the already
1569+ dnl constructed $INCNAME,
1570+ dnl 4. if it doesn't exist as a directory.
1571+ if test "X$additional_includedir" != "X/usr/include"; then
1572+ haveit=
1573+ if test "X$additional_includedir" = "X/usr/local/include"; then
1574+ if test -n "$GCC"; then
1575+ case $host_os in
1576+ linux*) haveit=yes;;
1577+ esac
1578+ fi
1579+ fi
1580+ if test -z "$haveit"; then
1581+ for x in $CPPFLAGS $INC[]NAME; do
1582+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1583+ if test "X$x" = "X-I$additional_includedir"; then
1584+ haveit=yes
1585+ break
1586+ fi
1587+ done
1588+ if test -z "$haveit"; then
1589+ if test -d "$additional_includedir"; then
1590+ dnl Really add $additional_includedir to $INCNAME.
1591+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1592+ fi
1593+ fi
1594+ fi
1595+ fi
1596+ fi
1597+ dnl Look for dependencies.
1598+ if test -n "$found_la"; then
1599+ dnl Read the .la file. It defines the variables
1600+ dnl dlname, library_names, old_library, dependency_libs, current,
1601+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
1602+ save_libdir="$libdir"
1603+ case "$found_la" in
1604+ */* | *\\*) . "$found_la" ;;
1605+ *) . "./$found_la" ;;
1606+ esac
1607+ libdir="$save_libdir"
1608+ dnl We use only dependency_libs.
1609+ for dep in $dependency_libs; do
1610+ case "$dep" in
1611+ -L*)
1612+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1613+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1614+ dnl But don't add it
1615+ dnl 1. if it's the standard /usr/lib,
1616+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1617+ dnl 3. if it's already present in $LDFLAGS or the already
1618+ dnl constructed $LIBNAME,
1619+ dnl 4. if it doesn't exist as a directory.
1620+ if test "X$additional_libdir" != "X/usr/lib"; then
1621+ haveit=
1622+ if test "X$additional_libdir" = "X/usr/local/lib"; then
1623+ if test -n "$GCC"; then
1624+ case $host_os in
1625+ linux*) haveit=yes;;
1626+ esac
1627+ fi
1628+ fi
1629+ if test -z "$haveit"; then
1630+ haveit=
1631+ for x in $LDFLAGS $LIB[]NAME; do
1632+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1633+ if test "X$x" = "X-L$additional_libdir"; then
1634+ haveit=yes
1635+ break
1636+ fi
1637+ done
1638+ if test -z "$haveit"; then
1639+ if test -d "$additional_libdir"; then
1640+ dnl Really add $additional_libdir to $LIBNAME.
1641+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1642+ fi
1643+ fi
1644+ haveit=
1645+ for x in $LDFLAGS $LTLIB[]NAME; do
1646+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1647+ if test "X$x" = "X-L$additional_libdir"; then
1648+ haveit=yes
1649+ break
1650+ fi
1651+ done
1652+ if test -z "$haveit"; then
1653+ if test -d "$additional_libdir"; then
1654+ dnl Really add $additional_libdir to $LTLIBNAME.
1655+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1656+ fi
1657+ fi
1658+ fi
1659+ fi
1660+ ;;
1661+ -R*)
1662+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
1663+ if test "$enable_rpath" != no; then
1664+ dnl Potentially add DIR to rpathdirs.
1665+ dnl The rpathdirs will be appended to $LIBNAME at the end.
1666+ haveit=
1667+ for x in $rpathdirs; do
1668+ if test "X$x" = "X$dir"; then
1669+ haveit=yes
1670+ break
1671+ fi
1672+ done
1673+ if test -z "$haveit"; then
1674+ rpathdirs="$rpathdirs $dir"
1675+ fi
1676+ dnl Potentially add DIR to ltrpathdirs.
1677+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1678+ haveit=
1679+ for x in $ltrpathdirs; do
1680+ if test "X$x" = "X$dir"; then
1681+ haveit=yes
1682+ break
1683+ fi
1684+ done
1685+ if test -z "$haveit"; then
1686+ ltrpathdirs="$ltrpathdirs $dir"
1687+ fi
1688+ fi
1689+ ;;
1690+ -l*)
1691+ dnl Handle this in the next round.
1692+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1693+ ;;
1694+ *.la)
1695+ dnl Handle this in the next round. Throw away the .la's
1696+ dnl directory; it is already contained in a preceding -L
1697+ dnl option.
1698+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1699+ ;;
1700+ *)
1701+ dnl Most likely an immediate library name.
1702+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1703+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1704+ ;;
1705+ esac
1706+ done
1707+ fi
1708+ else
1709+ dnl Didn't find the library; assume it is in the system directories
1710+ dnl known to the linker and runtime loader. (All the system
1711+ dnl directories known to the linker should also be known to the
1712+ dnl runtime loader, otherwise the system is severely misconfigured.)
1713+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1714+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1715+ fi
1716+ fi
1717+ fi
1718+ done
1719+ done
1720+ if test "X$rpathdirs" != "X"; then
1721+ if test -n "$hardcode_libdir_separator"; then
1722+ dnl Weird platform: only the last -rpath option counts, the user must
1723+ dnl pass all path elements in one option. We can arrange that for a
1724+ dnl single library, but not when more than one $LIBNAMEs are used.
1725+ alldirs=
1726+ for found_dir in $rpathdirs; do
1727+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1728+ done
1729+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1730+ acl_save_libdir="$libdir"
1731+ libdir="$alldirs"
1732+ eval flag=\"$hardcode_libdir_flag_spec\"
1733+ libdir="$acl_save_libdir"
1734+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1735+ else
1736+ dnl The -rpath options are cumulative.
1737+ for found_dir in $rpathdirs; do
1738+ acl_save_libdir="$libdir"
1739+ libdir="$found_dir"
1740+ eval flag=\"$hardcode_libdir_flag_spec\"
1741+ libdir="$acl_save_libdir"
1742+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1743+ done
1744+ fi
1745+ fi
1746+ if test "X$ltrpathdirs" != "X"; then
1747+ dnl When using libtool, the option that works for both libraries and
1748+ dnl executables is -R. The -R options are cumulative.
1749+ for found_dir in $ltrpathdirs; do
1750+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1751+ done
1752+ fi
1753+])
1754+
1755+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1756+dnl unless already present in VAR.
1757+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1758+dnl contains two or three consecutive elements that belong together.
1759+AC_DEFUN([AC_LIB_APPENDTOVAR],
1760+[
1761+ for element in [$2]; do
1762+ haveit=
1763+ for x in $[$1]; do
1764+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1765+ if test "X$x" = "X$element"; then
1766+ haveit=yes
1767+ break
1768+ fi
1769+ done
1770+ if test -z "$haveit"; then
1771+ [$1]="${[$1]}${[$1]:+ }$element"
1772+ fi
1773+ done
1774+])
1775--- /dev/null 2003-09-23 18:19:32.000000000 -0400
1776+++ OpenSP-1.5/m4/lib-prefix.m4 2004-01-20 03:02:17.000000000 -0500
1777@@ -0,0 +1,148 @@
1778+# lib-prefix.m4 serial 1 (gettext-0.11)
1779+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1780+dnl This file is free software, distributed under the terms of the GNU
1781+dnl General Public License. As a special exception to the GNU General
1782+dnl Public License, this file may be distributed as part of a program
1783+dnl that contains a configuration script generated by Autoconf, under
1784+dnl the same distribution terms as the rest of that program.
1785+
1786+dnl From Bruno Haible.
1787+
1788+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1789+dnl to access previously installed libraries. The basic assumption is that
1790+dnl a user will want packages to use other packages he previously installed
1791+dnl with the same --prefix option.
1792+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1793+dnl libraries, but is otherwise very convenient.
1794+AC_DEFUN([AC_LIB_PREFIX],
1795+[
1796+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1797+ AC_REQUIRE([AC_PROG_CC])
1798+ AC_REQUIRE([AC_CANONICAL_HOST])
1799+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1800+ dnl By default, look in $includedir and $libdir.
1801+ use_additional=yes
1802+ AC_LIB_WITH_FINAL_PREFIX([
1803+ eval additional_includedir=\"$includedir\"
1804+ eval additional_libdir=\"$libdir\"
1805+ ])
1806+ AC_ARG_WITH([lib-prefix],
1807+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1808+ --without-lib-prefix don't search for libraries in includedir and libdir],
1809+[
1810+ if test "X$withval" = "Xno"; then
1811+ use_additional=no
1812+ else
1813+ if test "X$withval" = "X"; then
1814+ AC_LIB_WITH_FINAL_PREFIX([
1815+ eval additional_includedir=\"$includedir\"
1816+ eval additional_libdir=\"$libdir\"
1817+ ])
1818+ else
1819+ additional_includedir="$withval/include"
1820+ additional_libdir="$withval/lib"
1821+ fi
1822+ fi
1823+])
1824+ if test $use_additional = yes; then
1825+ dnl Potentially add $additional_includedir to $CPPFLAGS.
1826+ dnl But don't add it
1827+ dnl 1. if it's the standard /usr/include,
1828+ dnl 2. if it's already present in $CPPFLAGS,
1829+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1830+ dnl 4. if it doesn't exist as a directory.
1831+ if test "X$additional_includedir" != "X/usr/include"; then
1832+ haveit=
1833+ for x in $CPPFLAGS; do
1834+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1835+ if test "X$x" = "X-I$additional_includedir"; then
1836+ haveit=yes
1837+ break
1838+ fi
1839+ done
1840+ if test -z "$haveit"; then
1841+ if test "X$additional_includedir" = "X/usr/local/include"; then
1842+ if test -n "$GCC"; then
1843+ case $host_os in
1844+ linux*) haveit=yes;;
1845+ esac
1846+ fi
1847+ fi
1848+ if test -z "$haveit"; then
1849+ if test -d "$additional_includedir"; then
1850+ dnl Really add $additional_includedir to $CPPFLAGS.
1851+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1852+ fi
1853+ fi
1854+ fi
1855+ fi
1856+ dnl Potentially add $additional_libdir to $LDFLAGS.
1857+ dnl But don't add it
1858+ dnl 1. if it's the standard /usr/lib,
1859+ dnl 2. if it's already present in $LDFLAGS,
1860+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1861+ dnl 4. if it doesn't exist as a directory.
1862+ if test "X$additional_libdir" != "X/usr/lib"; then
1863+ haveit=
1864+ for x in $LDFLAGS; do
1865+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1866+ if test "X$x" = "X-L$additional_libdir"; then
1867+ haveit=yes
1868+ break
1869+ fi
1870+ done
1871+ if test -z "$haveit"; then
1872+ if test "X$additional_libdir" = "X/usr/local/lib"; then
1873+ if test -n "$GCC"; then
1874+ case $host_os in
1875+ linux*) haveit=yes;;
1876+ esac
1877+ fi
1878+ fi
1879+ if test -z "$haveit"; then
1880+ if test -d "$additional_libdir"; then
1881+ dnl Really add $additional_libdir to $LDFLAGS.
1882+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1883+ fi
1884+ fi
1885+ fi
1886+ fi
1887+ fi
1888+])
1889+
1890+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1891+dnl acl_final_exec_prefix, containing the values to which $prefix and
1892+dnl $exec_prefix will expand at the end of the configure script.
1893+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1894+[
1895+ dnl Unfortunately, prefix and exec_prefix get only finally determined
1896+ dnl at the end of configure.
1897+ if test "X$prefix" = "XNONE"; then
1898+ acl_final_prefix="$ac_default_prefix"
1899+ else
1900+ acl_final_prefix="$prefix"
1901+ fi
1902+ if test "X$exec_prefix" = "XNONE"; then
1903+ acl_final_exec_prefix='${prefix}'
1904+ else
1905+ acl_final_exec_prefix="$exec_prefix"
1906+ fi
1907+ acl_save_prefix="$prefix"
1908+ prefix="$acl_final_prefix"
1909+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1910+ prefix="$acl_save_prefix"
1911+])
1912+
1913+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1914+dnl variables prefix and exec_prefix bound to the values they will have
1915+dnl at the end of the configure script.
1916+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1917+[
1918+ acl_save_prefix="$prefix"
1919+ prefix="$acl_final_prefix"
1920+ acl_save_exec_prefix="$exec_prefix"
1921+ exec_prefix="$acl_final_exec_prefix"
1922+ $1
1923+ exec_prefix="$acl_save_exec_prefix"
1924+ prefix="$acl_save_prefix"
1925+])
diff --git a/meta/recipes-devtools/opensp/opensp/rangmap-fix.patch b/meta/recipes-devtools/opensp/opensp/rangmap-fix.patch
new file mode 100644
index 0000000000..cc849ca3a8
--- /dev/null
+++ b/meta/recipes-devtools/opensp/opensp/rangmap-fix.patch
@@ -0,0 +1,15 @@
1Patch obtained from OpenEmbedded.
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4Index: OpenSP-1.5/include/RangeMap.cxx
5===================================================================
6--- OpenSP-1.5.orig/include/RangeMap.cxx 2000-02-26 03:55:21.000000000 +1100
7+++ OpenSP-1.5/include/RangeMap.cxx 2007-06-02 11:48:17.000000000 +1000
8@@ -7,6 +7,7 @@
9 #include "RangeMap.h"
10 #include "ISet.h"
11 #include "types.h"
12+#include "constant.h"
13
14 #ifdef SP_NAMESPACE
15 namespace SP_NAMESPACE {
diff --git a/meta/recipes-devtools/opensp/opensp_1.5.bb b/meta/recipes-devtools/opensp/opensp_1.5.bb
new file mode 100644
index 0000000000..bda87cb06d
--- /dev/null
+++ b/meta/recipes-devtools/opensp/opensp_1.5.bb
@@ -0,0 +1,27 @@
1SUMMARY = "An SGML parser"
2DESCRIPTION = "An SGML parser used by the OpenJade suite of utilities."
3HOMEPAGE = "http://openjade.sourceforge.net"
4SECTION = "libs"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=641ff1e4511f0a87044ad42f87cb1045"
7
8PR = "r0"
9
10# At -Os it encounters calls to some inline functions which are then
11# not found in any other objects with gcc 4.5
12FULL_OPTIMIZATION += "-O2"
13
14SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/OpenSP-${PV}.tar.gz \
15 file://m4.patch \
16 file://attributevalue.patch \
17 file://rangmap-fix.patch \
18 file://fix-docdir.patch"
19
20SRC_URI[md5sum] = "87f56e79ae0c20397f4207d61d154303"
21SRC_URI[sha256sum] = "987eeb9460185950e066e5db3b5fa531e53e213742b545288405552a5a7bb704"
22
23S = "${WORKDIR}/OpenSP-${PV}"
24
25inherit autotools gettext
26
27BBCLASSEXTEND = "native"