diff options
author | Jo Shields <directhex@apebox.org> | 2010-10-18 13:25:11 +0100 |
---|---|---|
committer | Jo Shields <directhex@apebox.org> | 2010-10-18 13:25:11 +0100 |
commit | 5c6aba561a13a666267e90e0109e9d82e7a7d59d (patch) | |
tree | d9a1153ea300350607189fd2ae2bd0cb428aa318 /eglib | |
parent | 665316e3fe5fcc613bf7ba81d33c05004889d7cf (diff) | |
download | mono-5c6aba561a13a666267e90e0109e9d82e7a7d59d.tar.gz |
Imported Upstream version 2.8upstream/2.8
Diffstat (limited to 'eglib')
87 files changed, 48743 insertions, 0 deletions
diff --git a/eglib/AUTHORS b/eglib/AUTHORS new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/eglib/AUTHORS diff --git a/eglib/COPYING b/eglib/COPYING new file mode 100644 index 0000000000..1bb5a44356 --- /dev/null +++ b/eglib/COPYING @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/eglib/ChangeLog b/eglib/ChangeLog new file mode 100644 index 0000000000..89b624fbd8 --- /dev/null +++ b/eglib/ChangeLog @@ -0,0 +1,1643 @@ +2010-09-10 Miguel de Icaza <miguel@gnome.org> + + [Fix] Correct fix for the g_shell_parse_argv bug + + Simplifies the code a little bit by eliminating the in_quote + variable, but also fixes the rules to follow the requirements from + the "Shell Command Language" specification on the Unix03 site: + + http://opengroup.org/onlinepubs/007908775/xcu/chap2.html#tag_001_002 + + In particular, the interpretation of the backslash inside double + quotes is limited to a handful of characters. Notice that this + differs from the glib implementation which is not correct either. + +2010-09-09 Miguel de Icaza <miguel@gnome.org> + + [Fix] Allow escape characters inside quoted text, and do not let + nested quote reset the quoting state + + This should fix #637680 + +2010-09-07 Zoltan Varga <vargaz@gmail.com> + + Add a few more remaps. + +2010-09-07 Zoltan Varga <vargaz@gmail.com> + + Remap g_strdupv too. + +2010-08-28 Zoltan Varga <vargaz@gmail.com> + + Add a g_hash_table_print_stats () helper function. + +2010-08-28 Zoltan Varga <vargaz@gmail.com> + + Optimize g_utf8_to_utf16 for the common case of ASCII strings. + +2010-08-20 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> + + No more warnings building eglib. + + Ditto. + +2010-08-20 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> + + eglib build is now 'quiet' by default + + Ditto. + +2010-08-20 Zoltan Varga <vargaz@gmail.com> + + Don't return malloc-ed memory from g_get_charset (). + +2010-08-18 Zoltan Varga <vargaz@gmail.com> + + Fix handling of stdio in g_spawn_async_with_pipes (). + +2010-08-09 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> + + Ignore a few more files. + +2010-08-09 Elijah Taylor <elijahtaylor@google.com> + + Add dummy implementation of g_module functions for NACL. + +2010-08-07 Miguel de Icaza <miguel@gnome.org> + + Do not mandate that pkg-config is installed, it is only used for + the comparative test suite + +2010-08-02 Zoltan Varga <vargaz@gmail.com> + + * test/test.c (FAILED): Fix linking on systems without vasprintf. + +2010-08-02 Zoltan Varga <vargaz@gmail.com> + + * configure.ac: Define _POSIX_PTHREAD_SEMANTICS on solaris to get + posix compliant versions of some functions. + +2010-07-25 Zoltan Varga <vargaz@gmail.com> + + * configure.ac src/eglib-config.h.in src/eglib-config.hw: Define G_GINT64_FORMAT. + +2010-07-20 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (G_LIKELY): Implement these for gcc properly. + +2010-07-19 Miguel de Icaza <miguel@novell.com> + + * src/gmisc-win32.c (g_getenv): Distinguish between variable not + found and an empty variable. + + This should fix 566152 + +2010-07-19 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (G_MAXUINT64): Define this. Fixes #623293. + + * src/eglib-config.hw: Define UINT64_MAX. + +2010-07-16 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gmisc-unix.c: include config.h. Fixes bug #609632. + Use getpwuid_r instead of getpwent_r. + +2010-07-02 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Define gboolean as int32_t to match mono_bool. + +2010-06-22 Rodrigo Kumpera <rkumpera@novell.com> + + * src/ghashtable.c: Add code to sanity check the + hashtable contents. This is invaluable, for example, + to catch bugs where a key hashcode changes after + insertion. + +2010-06-18 Chris Toshok <toshok@ximian.com> + + patch from Jacob Berkman: + + * src/glib.h (g_mkdir): #define to mkdir + (g_ascii_strtoull): #define to strtoull + + * src/gmodule.h: add G_BEGIN/END_DECLS + + * src/gstr.c (g_strdupv): new function. + +2010-06-18 Rolf Bjarne Kvinge <RKvinge@novell.com> + + * src/eglib-remap.h: Remap g_ptr_array_remove_fast too. + +2010-06-15 Zoltan Varga <vargaz@gmail.com> + + * src/gunicode.c: Applied patch from Hib Eris <hib@hiberis.nl>. use "windows.h" + instead of "Windows.h". + +2010-05-25 Zoltan Varga <vargaz@gmail.com> + + * Applied patch from Burkhard Linke (blinke@cebitec.uni-bielefeld.de). Fix + building on solaris. + +2010-05-21 Zoltan Varga <vargaz@gmail.com> + + * src/gmisc-win32.c (g_setenv): Use the + GetEnvironmentVariableW/SetEnvironmentVariableW variants. + +2010-05-15 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (g_error): Add a for (;;) after the call to tell GCC this doesn't + return, fixing some warnings. + +2010-05-13 Alan McGovern <amcgovern@novell.com> + + * src/gstring.c: Put in some null guards for the ctors + +2010-05-11 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c: Pull the Windows.h header when G_OS_WIN32 is + defined. + +2010-05-11 Atsushi Enomoto <atsushi@ximian.com> + + * Makefile.am : do not try to build test on windows (fails). + * src/glib.h : fix cygwin build, do not include unistd.h. + +2010-05-10 Miguel de Icaza <miguel@novell.com> + + * gfile-win32.c: Port this to use the Win32 APIs to get this + building with Cygwin. + +2010-05-07 Andrew Jorgensen <ajorgensen@novell.com> + + * test/test.h: Fix some compiler warning that SUSE takes seriously. + +2010-05-06 Alan McGovern <amcgovern@novell.com> + + * src/gmarkup.c: Fix a parser issue when skipping the xml declaration. + +2010-05-06 Jonathan Chambers <joncham@gmail.com> + + * gfile-win32.c: Use __stat64 instead of _stat64. + +2010-05-04 Jonathan Chambers <joncham@gmail.com> + + * gspawn.c: Remove extern define for MSVC. + +2010-05-03 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include unistd.h on !windows for pid_t. + + * gspawn.c: Add an extern define for environ on !apple platforms. + +2010-05-02 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include sys/types.h for pid_t. + +2010-05-01 Zoltan Varga <vargaz@gmail.com> + + * src/goutput.c (g_logv): Append a '\n' to the end of the string as glib does. + +2010-04-28 Zoltan Varga <vargaz@gmail.com> + + * configure.ac src/gspawn.c: Applied openbsd changes from Robert Nagy + <robert@openbsd.org>. + +2010-04-16 Miguel de Icaza <miguel@novell.com> + + * src/gshell.c (g_shell_unquote): Implement this. + +2010-04-25 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: The iconv function may be libiconv_open. + Fixes linking with GNU libiconv. + + Contributed under MIT/X11 license. + +2010-04-23 Geoff Norton <gnorton@novell.com> + + * configure.ac: The iconv function is iconv_open. + +2010-04-19 Jonathan Pryor <jpryor@novell.com> + + * src/glib.h: Rebase g_return_if_fail(), g_return_val_if_fail() in + terms of g_critical() instead of printf, and turn g_printerr() into + an actual function instead of a macro. + * src/goutput.c: Add Android support, sending g_print(), g_printerr(), + and g_log() messages to the Android system log. + +2010-04-16 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * test/ptrarray.c: new tests + * src/gptrarray.c: implemented g_ptr_array_remove_fast(). + +2010-04-10 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: Add checks for libm and libdl. + * {src,test}/Makefile.am: Remove hardcoded library dependencies. + Fixes compilation on Haiku. + + Contributed under MIT/X11 license. + +2010-03-05 Zoltan Varga <vargaz@gmail.com> + + * test/test.c (_GNU_SOURCE): Fix compilation if _GNU_SOURCE is already defined. + + +Thu Mar 4 16:34:37 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/unicode-data.h: save 70 KB. + +Thu Mar 4 16:18:34 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/eglib-remap.h, src/glib.h: header file to remap the symbols + so there is no clash with system glib. + * src/Makefile.am: build static lib as well. + +2010-03-04 Zoltan Varga <vargaz@gmail.com> + + * configure.ac: Add a check for ISO varargs. + + * test/test.c: Fix the build. + + * src/glib.h src/goutput.c: Emit asserts through a g_assertion_message () + function which is decorated with G_GNUC_NORETURN, to fix many warnings when using + the eglib build. + +Mon Mar 1 17:12:24 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/unicode-data.h, src/gutf8.c: don't export private symbols. + +2009-12-03 Zoltan Varga <vargaz@gmail.com> + + * src/gmisc-unix.c (g_get_user_name): Avoid returning NULL if the env + var is not set. + +2009-10-15 Andreia Gaita <avidigal@novell.com> + + * src/gptrarray.c: implement g_ptr_array_remove_index_fast + * src/glib.h: fix g_ptr_array_remove_index_fast declaration + * test/ptrarray.c: new tests + +2009-10-15 Andreia Gaita <avidigal@novell.com> + + * src/garray.c: (g_array_remove_index_fast) only move 1 element + and not the whole shebang + +2009-09-26 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * test/queue.c: new tests. + * src/gqueue.c: fixed pop_head. + +2009-09-26 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gqueue.c: add g_queue_push_tail. + +2009-06-20 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Add GUINT32_FROM/TO_BE macros. + +2009-06-09 Jonathan Chambers <joncham@gmail.com> + + * CMakeLists.txt: Add start of CMake build. + * src/CMakeLists.txt: Add start of CMake build. + + Contribution is licensed as MIT/X11. + +2009-06-02 Bill Holmes <billholmes54@gmail.com> + + * src/gpath.c (g_find_program_in_path): While searching on Windows + also try additional suffixes .exe, .cmd, .bat, and.com. + + Contributed under MIT/X11 license. + +2009-05-27 Geoff Norton <gnorton@novell.com> + + * src/gfile-posix.c: Fix g_get_current_dir on amd64 + +2009-04-22 Jeffrey Stedfast <fejj@novell.com> + + * src/gtimer-win32.c (g_timer_elapsed): Avoid re-querying freq by + just saving it in a static variable. Also modified microseconds + calculation to avoid overflow. + +2009-04-05 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c: Avoid situations where we add the separator if one + of the elements is the separator. + +2009-04-02 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c: If the first element is NULL, return an empty + string. + +2009-02-19 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gstr.c: use memset in g_strnfill. + +2009-01-19 Bill Holmes <billholmes54@gmail.com> + + * src/gstr.c (g_strnfill): Fixing a warning for MSVC. + + Contributed under MIT/X11 license. + +2009-02-05 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c: Add g_strnfill + + * src/glib.h: Add g_list_previous + +2009-01-19 Bill Holmes <billholmes54@gmail.com> + + * gmisc-win32.c (g_path_is_absolute): Adding support for UNC + paths on Windows. + + Contributed under MIT/X11 license. + +2009-01-08 Bill Holmes <billholmes54@gmail.com> + + * winconfig.h, src/gfile-posix.c : + Fixing the MSVC builds. + + Contributed under MIT/X11 license. + +2009-01-07 Miguel de Icaza <miguel@novell.com> + + * src/gfile-posix.c: Move g_get_current_dir, as it is a + POSIX-esque feature, and some other systems do not have current + directories. + + * src/glib.h (G_LOCK_DEFINE, G_LOCK_DEFINE_STATIC): + + Embedded support from Paolo's work on quack. + + * configure.ac: check for strtok_r, langinfo.h and iconv.h + + * src/gpath.c (strtok_r): Add a strtok_r implementation if it is + not available on the target system. + +2008-11-05 Bill Holmes <billholmes54@gmail.com> + + * src/gutf8.c, src/unicode-data.h, src/gunicode.c : + Fixing the MSVC builds. + + Contributed under MIT/X11 license. + +2008-11-04 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c, src/gunicode.c, src/glib.h: + implemented g_unichar_type(), g_unichar_toupper(), + g_unichar_tolower(), g_unichar_totitle(), g_utf8_strup() + and g_utf8_strdown(). Fixed some surrogate pair bugs. + * TODO : removed implemented things. + * test/unicode.c, test/tests.h, test/utf8.c, test/Makefile.am: + added new tests. + +2008-11-04 Atsushi Enomoto <atsushi@ximian.com> + + * src/unicode-data.h : new header for some new unicode manipulation + functions. + +2008-10-17 Miguel de Icaza <miguel@novell.com> + + * Allow types to be defined on the eglib-config.h file, that could + be a platform specific generated type file. + + * gtimer.c: split functionality in platforms. + +2008-10-13 Bill Holmes <billholmes54@gmail.com> + + * src/gdate-win32.c : Fix compiler errors for MSVC. + + * src/gpath.c : Fix compiler errors for MSVC. + + * src/gfile-posix.c : Adding declaration for mkstemp for the win 32 + implementation in gfile-win32.c. + + Contributed under MIT/X11 license. + +2008-10-11 Miguel de Icaza <miguel@novell.com> + + * gtimer.c: Same process. + + * src/glib.h: Move g_strdup here, to consolidate all allocations + in this header, will help for merging the allocation work later. + + * src/gpattern.c (compile_pattern): From Unity, use -1 in the enum + for MatchType. + + * src/gpath.c: Split this one as well. + + * src/gmodule-win32.c, src/gmisc-unix.c, src/gmisc-win32.c, + src/gmodule-unix.c: split functionality in platforms. + + * src/goutput.c (g_logv): On some platforms, before we abort we + want to flush the stdout/stderr. + +2008-10-10 Miguel de Icaza <miguel@novell.com> + + * Split functionality that is operating system specific into + -win32.c, -unix.c and -posix.c + + * Use g_malloc everywhere, and g_free, so that these can be easily + overwritten consistently. + +2008-09-16 Bill Holmes <billholmes54@gmail.com> + + * src/gunicode.c : Fix a warning. + + Contributed under MIT/X11 license. + +2008-08-28 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Adding a c++ definition for G_BEGIN_DECLS. + + Contributed under MIT/X11 license. + +2008-08-27 Bill Holmes <billholmes54@gmail.com> + + * glib.h, gunicode.c : Fixing some compiler errors. + + Contributed under MIT/X11 license. + +2008-08-20 Mike Voorhees <vernish13@gmail.com> + + * Patch from Mike Voorhees to fix various problems with + g_utf8_validate compared to the glib implementation and unit tests + to ensure that there are no regressions. + + From a mailing list post to mono-devel-list on August 19th, 2008 + + [Mono-dev] utf8 related patches. Please review. + +2008-08-20 Mike Voorhees <vernish13@gmail.com> + + * src/glib.h : Adding declarations for g_utf8_strlen, g_utf8_get_char, + and g_utf8_next_char. + + * src/gunicode.c : Adding implementation for g_utf8_strlen, g_utf8_get_char, + and g_utf8_next_char. + + * src/gunicode.c : Rewrote g_utf8_validate. + + * test/utf8.c Adding tests for g_utf8_strlen, g_utf8_get_char, + g_utf8_next_char, and g_utf8_validate. + + Contributed under MIT/X11 license. + +2008-08-05 Andreas Faerber <andreas.faerber@web.de> + + * autogen.sh: Suppress arguments warning for NOCONFIGURE. + + Contributed under MIT/X11 license. + +2008-08-04 Bill Holmes <billholmes54@gmail.com> + + * test/tests.h, test/Makefile.am, test/memory.c : Adding memory tests to test + allocation routines return NULL when 0 size is passed in. + + Contributed under MIT/X11 license. + +2008-08-04 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Changing the allocation routines to return null if 0 size is + passed in. + + Contributed under MIT/X11 license. + +2008-06-16 Zoltan Varga <vargaz@gmail.com> + + * src/vasprintf.c (vasprintf): Applied patch from Michail Ushakov + <migelU@gmail.com>. Workaround broken vsnprintf on windows. Fixes + #400445. + +2008-06-11 Zoltan Varga <vargaz@gmail.com> + + * src/goutput.c (g_log): Remove unnecessary and incorrect call to + g_strdup_printf (). Fixes #398918. + +2008-05-01 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Adding declarations for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + * src/gutf8.c : Adding implementation for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + * test/utf8.c Adding tests for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + Contributed under MIT/X11 license. + +2008-04-20 Geoff Norton <gnorton@novell.com> + + * src/gspan.c: Fix the _NSGetEnviron define to prevent an impropoer + pointer dereference. + +2008-03-19 Bill Holmes <billholmes54@gmail.com> + + * src/gpath.c (g_path_is_absolute) : Adding a case for '/' + on Windows. + + * src/gpath.c (g_get_user_name) : On Windows add a check for %USERNAME% + when %USER% fails. + + * src/gstr.c (g_strsplit, g_strsplit_set): Change to remove truncation + errors with MSVC build. + + * src/gstr.c (g_filename_to_uri, g_filename_from_uri): Fixes to handle + Windows paths. + + * src/gstr.c (g_ascii_strncasecmp): Convert each character to lower case + before comparing. + + * src/gunicode.c (g_get_charset): Implement for Windows. + + Contributed under MIT/X11 license. + +2008-03-12 Geoff Norton <gnorton@novell.com> + + * src/gutf8.c: Implement g_ucs4_to_utf16 and g_utf16_to_ucs4 as + asserts. They're needed to build mono with eglib. + * src/gutil.h: Add a few missing function declarations to the header. + * src/gspawn.c: Some darwin implementations don't have crt_externs.h + So we'll just define _NSGetEnviron() ourselves. + * Makefile.am: Dont build test when cross compiling. + * configure.ac: Define CROSS_COMPILING when cross compiling. + Undefine _FORTIFY_SOURCE on arm-apple-darwin as the headers it + requires are not available. + +2008-01-15 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: Add default G_BREAKPOINT implementation. + Fix typo in breakpoint CPU output. + +2007-12-23 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include <limits.h>. Fixes #350482. + +2007-11-21 Dick Porter <dick@ximian.com> + + * src/gslist.c (g_slist_find_custom): Implement + + * src/glist.c (g_list_find_custom): Implement + + * test/list.c: Test g_list_find_custom() + + * test/slist.c: Test g_slist_find_custom() + +2007-11-20 Dick Porter <dick@ximian.com> + + * src/gstr.c: Implement g_strsplit_set() and re-implement + g_strsplit() so it passes the additional tests. (g_strsplit() + should treat multi-char delimiters as just a single token, rather + than a set of delimiters.) + + * src/gslist.c: Implement g_slist_index(), g_slist_nth() and + g_slist_nth_data(). + + * test/string-util.c: Test g_strsplit_set() and more tests for + g_strsplit(). + + * test/slist.c: Test g_slist_nth() and + g_slist_index(). + +2007-11-06 Geoff Norton <gnorton@novell.com> + + * configure.ac: Check for libiconv_open as the previous check was failing against + some versions of libiconv. + +2007-11-06 Andreas Faerber <andreas.faerber@web.de> + + * test/Makefile.am: Fix noinst_PROGRAMS for automake 1.6.3 + Add support for VPATH + +2007-11-06 Geoff Norton <gnorton@novell.com> + + * configure.ac: Determing if glib-2.0 is installed and set HAVE_GLIB appropriately + * test/Makefile.am: Only build test-glib if glib-2.0 is available + +2007-11-05 Geoff Norton <gnorton@novell.com> + + * configure.ac: Check for getpwent_r and wether libiconv is needed to be linked. + Also look to see if we can use export-dynamic in the test suite. + * test/Makefile.am: Get LDFLAGS from configure instead of setting them. + * src/gerror.c: Implement g_clear_error. + * src/glib.h: Only use the format, ... convention is HAVE_C99_SUPPORT is available. + * src/gpath.c: Only use the getpwent_r codepath if getpwent_r is available. + * src/gspawn.c: Define environ to call _NSGetEnviron() on Apple. + * src/Makefile.am: Remove -Werror so we dont fail on different function declarations. + Portions of all of the above are from Andreas Faerber & Jonathan Chambers + +2007-10-31 Jonathan Chambers <joncham@gmail.com> + + * src/ghashtable.c: Add g_hash_table_foreach_steal. + * src/garray.c: Add g_array_remove_index_fast. + * src/gpath.c (g_path_is_absolute): Handle windows paths. + * src/glib.h: Add g_hash_table_foreach_steal and g_array_remove_index_fast + + Contribution is licensed as MIT/X11. + +2007-06-13 Jonathan Chambers <joncham@gmail.com> + + * src/gunicode.c: Add g_unichar_isxdigit and g_unichar_xdigit_value. + * src/gmisc.c: Add g_win32_getlocale stub. + * src/glib.h: Add declarations of above functions, + GFreeFunc typedef, and CLAMP, GUINT_TO_LE, and threading + macros. + + * test/string-util.c: Fix warning. + * test/utf8.c: Add test for g_unichar_xdigit_value. + + Contribution is licensed as MIT/X11. + +2007-05-05 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: + * src/glib.h: Added g_ascii_tolower implementation; make g_ascii_strdown + use it to do the transformation + + * test/string-util.c: Added a test for g_ascii_strdown + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/gstr.c: Fix off by one error in g_strdup allocation. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/eglib-config.hw: Forgot to add for msvc build. + * src/vasprintf: Forgot to add for msvc build. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/gstr.c: Fix off by one error for NULL terminator. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + Combined patch from Michael Jerris <mike@jerris.com> and me. + * winconfig.h: Config file for msvc builds. + * configure.ac: Add AC_CHECK_HEADERS for getopt.h, sys/time.h, + sys/wait.h, and pwd.h. + + * src/gspawn.c: Include config.h and use HAVE_* macros. + * src/eglib-config.h.in: Add inclusion guards. + * src/ghashtable.c: Fix warnings. + * src/gmisc.c: Windows implementation of g_getenv, g_setenv, + and g_unsetenv. + * src/gpath.c: Include config.h and use HAVE_* macros. + * src/gmarkup.c: Fix warnings. + * src/gptrarray.c: Fix warnings. + * src/gstr.c: Fix warnings and use HAVE_* macros. + * src/glib.h: Move macros to eglib-config.h and include it. + * src/gdate.c: Implement g_get_current_time on windows. + * src/gpattern.c: Fix warnings. + * src/gdir.c: Implement g_dir on windows. + * src/gfile.c: Implement mkstemp and g_file_test on windows. + * src/gtimer.c: Implement g_timer on windows. + * src/gmodule.c: Fix warnings. + * src/gunicode.c: Fix warnings. + * src/gutf8.c: Fix warnings. + + * test/ptrarray.c: Fix warnings. + * test/string.c: Fix warnings. + * test/list.c: Fix warnings. + * test/pattern.c: Use HAVE_* macros. + * test/dir.c: Use HAVE_* macros. + * test/file.c: Use HAVE_* macros and use system specific files for tests. + * test/test.c: Fix warnings and use HAVE_* macros. + * test/timer.c: Use HAVE_* macros. + * test/string-util.c: Fix warnings. + * test/test.h: Supress warnings on msvc. + * test/module.c: Use HAVE_* macros. + * test/utf8.c: Fix warnings. + * test/spawn.c: Use HAVE_* macros. + * test/driver.c: Fix warnings and use HAVE_* macros. + * test/path.c: Use HAVE_* macros and use system specific files for tests. + * test/sizes.c: Fix warnings. + +2007-04-24 Jonathan Chambers <joncham@gmail.com> + + Patch from Michael Jerris <mike@jerris.com> + * src/gspawn.c: Start msvc build. + * src/gpath.c: Start msvc build. + * src/gmarkup.c: Start msvc build. + * src/gshell.c: Start msvc build. + * src/gstr.c: Start msvc build. + * src/glist.c: Start msvc build. + * src/glib.h: Start msvc build. + * src/gdate.c: Start msvc build. + * src/gpattern.c: Start msvc build. + * src/gdir.c: Start msvc build. + * src/gfile.c: Start msvc build. + * src/gtimer.c: Start msvc build. + * src/gmodule.c: Start msvc build. + * src/gunicode.c: Start msvc build. + +2007-01-27 Robert Jordan <robertj@gmx.net> + + * test/Makefile.am: Add linker option to be able to + load symbols from the main program. + * test/module.c: Clean-ups. + +2007-01-26 Robert Jordan <robertj@gmx.net> + + * configure.ac: Add PLATFORM_WIN32 conditional. + * src/Makefile.ac: Use PLATFORM_WIN32 conditional for psapi, iconv + * test/module.c, test/tests.h, test/Makefile.am: New test for gmodule. + * src/gmodule.h: Add G_MODULE_{IMPORT|EXPORT} defines. + * src/gmodule.c (g_module_symbol): Implement in-proc symbol lookup + for Win32. + * src/gmodule.c: Add GModule.main_module, consider it in + g_module_close (). + * src/gpath.c (g_get_home_dir): Add dummy Win32 implementation to + fix the build. + +2006-11-03 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_path_get_dirname): If the pathname starts with a + "/", return the "/". + + * test/string-util.c (test_strlcpy): Add new test. + + * src/gunicode.c (g_filename_from_utf8): g_strlcpy needs the full + size, with the extra zero at the end; Fixes the stack trace + issue. + +2006-10-30 Miguel de Icaza <miguel@novell.com> + + * test/utf8.c (test_utf8_seq): Add new failing test. + +2006-10-30 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c : several fixes: + - fixed incorrect mb_size clear and mb_remain computation. + - initialize items_written to 0 for error case. + - in utf8_to_utf16_len differentiate error messages completely. + - in g_utf8_to_utf16 use guchar instead of gchar. + * test/utf8.c : added test case string in test_utf8_seq() to + both test_utf8_to_utf16() and test_utf16_to_utf8(). + +2006-10-21 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c (g_filename_from_utf8): Use g_strlcpy here. + + * src/gmarkup.c (g_markup_parse_context_parse): Do not dereference + null values here. This gets things a little bit further in + corlib, but not too far. + + * src/gdir.c (g_dir_read_name): Do not return . or .. + + * src/gstr.c (g_ascii_xdigit_value): Make this into a function, + thanks to Paolo for pointing the problem with the double macro + expansion. + + * src/gmodule.c (g_module_open): Actually return NULL if we fail + to load the module (was hiding the real bug in the pinvoke tests). + + (g_module_build_path): Do not prepend "lib" if the "lib" is part + of the call. + + * src/gstr.c (g_strsplit): this routine has some non-expected + behavior, if the string begins with the delimiter, it will return + an empty first string, unlike strtok + + * src/gpath.c (g_path_get_dirname): Return "." as a dirname for + paths that do not contain a directory. + +2006-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/array.c: new test for insertion in the middle of other values. + * src/garray.c: fixed destination index. + +2006-10-18 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_build_path): Do not append terminator if the next + string is empty. + + * src/gutf8.c (g_utf8_to_utf16): Include trailing zero as + documented. + (g_utf16_to_utf8): Include trailing zero as documented. + +2006-10-17 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_strdown): Actually move. + + * src/gmarkup.c (g_markup_parse_context_parse): Accept dots in the + sequence, reset the state after a closing element. + + * src/garray.c (g_array_insert_vals): Shift the elements the + correct amount. + + (g_array_insert_vals): Should actually use the + number of elements to insert. + + * test/array.c: Add new test case, this was happening in the JIT. + + * Add _GNU_SOURCE at configure time, remove from sources. + + * src/gstr.c (g_strsplit): Empty strings return a 0 value vector. + + * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros + for the support stuff. + + Move private prototypes elsewhere + + * src/glib.h (g_thread_init): Adding missing brace + (g_list_next): remove ; from the macro definition. + +2006-10-17 Miguel de Icaza <miguel@novell.com> + + * src/gutf8.c: internal methods + + * src/ghashtable.c: internal methods. + +2006-10-16 Miguel de Icaza <miguel@novell.com> + + * src/gerror.c (g_propagate_error): Implement. + + * src/gstr.c (g_strjoinv, g_ascii_strncasecmp): implement. + + * test/string-util.c (test_ascii_strncasecmp): test + +2006-10-15 Miguel de Icaza <miguel@novell.com> + + * configure.in: Fix detection of platforms the [3456] stuff does + not work inside autoconf. + + * src/eglib-config.h.in: Make G_BREAKPOINT into a function-macro + + * src/glib.h (offsetof): Mono sources depend on this, bring this + from the standard definition. Redefine G_STRUCT_OFFSET in terms + of this. + + * src/glib.h (G_STRUCT_OFFSET): fix macro definition. + fix typo. + + * src/sizes.c: Add test. + + * src/gshell.c: Make it build + +2006-10-14 Miguel de Icaza <miguel@novell.com> + + * src/glib.h: add various _TO_LE and _FROM_LE macros. + + * test/endian.c: tests for endian conversion macros. + +2006-10-09 Miguel de Icaza <miguel@novell.com> + + * src/gmodule.h: Move definitions of gmodule to gmodule.h because + Mono expects it there. + +Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <lupus@ximian.com> + + * src/ghashtable.c: s/to_prime/g_spaced_primes_closest/g + and put the array in readonly memory. + * src/gstr.c: fixed the build and made array const. + * src/gmodule.c: fixed thinko. + +2006-10-08 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_strdup): should allow NULL as an argument. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strescape. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * configure.ac: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strlcpy. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strdelimit. + +2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/spawn.c: add search path flag when running ls. + * src/gspawn.c: g_spawn_command_line_sync searches the program in the + PATH if it's not an absolute path. + +2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * src/glib.h: implement g_ascii_xdigit_value and tests. + +2006-10-06 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_ascii_strdown): Implement. + + * str/glib.c (g_log_set_handler): empty. + (g_printerr): empty. + (GMemVTable): define, empty, ignored. + (G_USEC_PER_SEC) :-) + + * src/gunicode.c (g_convert): Add bytes_read, bytes_written + support; Small fixes to avoid valgrind errors. + + (g_utf8_validate): Add, based on the libxml code. + + gstr.c: implement g_strdown. + +2006-10-05 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c: Some work in progress to implement g_convert + (which is needed by g_locale_to_utf8). + +2006-09-18 Miguel de Icaza <miguel@novell.com> + + * test/string-util.c (test_filename_from_uri): tests for new + methods. + + * src/gstr.c (g_filename_to_uri, g_filename_from_uri): implement. + +2006-09-14 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c, test/utf8.c : EOL fix. + +2006-09-04 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c: The leak fixing commit. + + * src/gmarkup.c (g_markup_parse_context_end_parse): Add missing + method. + (g_markup_parse_context_free): Implement. + (parse_attributes): Store the value, not the attribute name + twice. + Properly check the /> section. + (g_markup_parse_context_parse): When checking for error, use the + "error!=NULL && *error != NULL" upon return from callbacks, + it is only then that its valid to check for *error for error + conditions. + (g_markup_parse_context_parse): Add comment processing. + + Only release one element of the list. + + * test/markup.c: Incorporate the kind of code that is used in Mono + for domain loading; Will test the rest later. + +2006-09-01 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c (g_markup_parse_context_parse): Add text parsing + support, and end-element support; not tested yet. + +2006-09-01 Atsushi Enomoto <atsushi@ximian.com> + + * gutf8.c : bad allocation size. multiply sizeof gchar/gunichar2. + +2006-09-01 Atsushi Enomoto <atsushi@ximian.com> + + * gutf8.c : when error is null, utf8_to_utf16_len() and + utf16_to_utf8_len() could return -1, so return NULL for those + cases in g_utf8_to_utf16() and g_utf16_to_utf8(). + +2006-09-01 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c: Builds and does minimal parsing. + + * test/markup.c: Sample test cases I have been using + +2006-08-31 Atsushi Enomoto <atsushi@ximian.com> + + * src/gerror.h, + src/gerror.c : added g_set_error(). + * src/gutf8.c : + g_utf8_to_utf16() and g_utf16_to_utf8() implementation. + * src/glib.h : added all above, and some dependent bits. + * src/Makefile.am : added gutf8.c. + * TODO: removed above. + * test/Makefile.am, + test/tests.h : added utf8 tests. + * test/utf8.c : test for g_utf8_to_utf16 and g_utf16_to_utf8. + It still needs more tests e.g. for multibytes. + +2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/gspawn.c: small touch-ups and make read/write EINTR-proof. + +2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/file.c: remove useless test. + + * test/spawn.c: new g_spawn_async_with_pipes test. + * src/glib.h: Modified file. + * src/gspawn.c: implemented g_spawn_async_with_pipes. Needs fine tuning. + +2006-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: Modified file. + * test/tests.h: + * test/pattern.c: + * test/dir.c: + * test/Makefile.am: + * src/Makefile.am: + * src/glib.h: + * src/gdir.c: + * src/gfile.c: implemented g_dir_*, unix version. + +2006-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/glib.h: + * test/Makefile.am: Modified file. + * test/tests.h: + * src/Makefile.am: Modified file. + * test/pattern.c: + * src/gpattern.c: implemented the 3 pattern matching functions used. + + * test/ptrarray.c: fix the compare function to work with qsort. + + * test/file.c: + * test/path.c: + * src/gspawn.c: + * src/gpath.c: made valgrind happy. + +2006-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/file.c: + * src/glib.h: + * src/gfile.c: implemented g_file_test. Changed the default mask to + .XXXXXX. Add tests. + +2006-08-26 Raja R Harinath <rharinath@novell.com> + + * src/sort.frag.h (digit): Declare here based on externally + provided typedef 'list_node'. + (MAX_DIGITS): Use 'sizeof (list_node)'. + * src/gslist.c (list_node): Declare instead of 'digit'. + * src/glist.c: Likewise. + + * test/slist.c (verify_sort): Verify the length of the list too. + (test_slist_sort): Free the correct list. + * test/list.c: Likewise. + * src/sort.frag.h (MAX_DIGITS): Rename from N_DIGITS. + (combine_sort): Change 'max_pos' argument to more natural + 'n_digits'. + (increment): Likewise. Use 'n_digits' to avoid reading at an + offset that hasn't been initialized. + (do_sort): Remove memset. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: + * test/file.c: + * src/glib.h: + * src/gfile.c: implement g_file_open_tmp. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: + * src/glib.h: + * src/gdate.c: New file. + * src/gfile.c: New file. + * src/Makefile.am: implemented g_file_get_contents and + g_get_current_time. + + * test/tests.h: + * test/file.c: New file. + * test/Makefile.am: tests for the above. + +2006-08-26 Raja R Harinath <rharinath@novell.com> + + * src/sort.frag.h: Add copyright notice and some explanation. + (increment): Remove null check. + (combine_digits): Add 'list' argument to seed the summation. + (do_sort): Use the empty or singleton tail as the seed, rather + than calling 'increment'. + +2006-08-25 Raja R Harinath <rharinath@novell.com> + + * TODO: Remove 'List' entries. + * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h. + * src/sort.frag.h: New. Implements a "generic" bottom-up "counting" + mergesort that works both on singly- and doubly-linked lists. + * src/gslist.c (g_slist_sort): Use it. + * src/glist.c (g_list_sort): Likewise. + * src/glib.h (g_slist_sort, g_list_sort): Declare. + * test/slist.c, test/list.c: Add basic testcases. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/gspawn.c: propagate errors from reads. + * src/gpath.c: an empty PATH is like a NULL one. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/tests.h: + * test/timer.c: + * test/Makefile.am: + * TODO: + * src/glib.h: + * src/gtimer.c: + * src/Makefile.am: implemented GTimer. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/tests.h: + * test/Makefile.am: + * test/spawn.c: + * src/gspawn.c: + * src/glib.h: + * src/Makefile.am: initial implentation of g_spawn_command_line_sync. + Still need better error handling, but works for the most part. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/garray.c: grow faster so that the 'big' test does not crawl. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/shell.c: + * src/gqueue.c: plugged leaks. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/path.c: + * src/gpath.c: when PATH is not defined, the current dir is used. + See execvp(3). + +2006-08-25 Alp Toker <alp@atoker.com> + + * src/gstr.c: g_strv_length() should return guint, not gint + * src/glib.h: Add g_strv_length() prototype + +2006-08-24 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name, + g_get_prgname, g_set_prgname): implemented. + + * test/ Fix leaks. + + * src/gpath.c (g_get_current_dir): Implement. + + (g_find_program_in_path, g_path_is_absolute): implement. + + Add g_path_get_dirname, g_path_get_basename + + * src/gpath.c: Path routines + +2006-08-23 Miguel de Icaza <miguel@novell.com> + + * src/gerror.c: Implement. + + * src/glist.c (g_list_sort): Remove routine instead of hoping that + it wont crash when we run it. + +2006-08-23 Raja R Harinath <rharinath@novell.com> + + * src/glist.c (g_list_insert_before): Avoid non-head declaration. + + * test/slist.c (test_slist_insert_before): Add. + * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null. + + * test/list.c (test_list_insert_before): Add test for return value + of g_list_insert_before. + * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as + to rebuild test if eglib changes. + * src/glist.c (new_node, disconnect_node): New helpers that + maintain doubly-linked list invariants. + (g_list_prepend, g_list_append): Express in terms of new_node. + (g_list_insert_before): Likewise. Fix return value when inserting + in the middle of the list. + (g_list_concat): Reorganize to make more compact. + (g_list_nth): Likewise. + (g_list_nth_data): Don't segfault if 'n' is too large. + (g_list_remove): Rewrite using _find and disconnect_node. + (g_list_remove_link): Don't traverse list: use disconnect_node. + (g_list_insert_sorted): Rewrite to make more compact. Use new_node. + (g_list_copy): Likewise. + (_prepend, _concat): Remove. + * src/gslist.c (insert_after, find_prev, find_prev_link): + New helpers. + (g_slist_copy): Simplify slightly, using insert_after. + (g_slist_concat): Reorganize to make more compact. + (g_slist_find): Likewise. + (g_slist_insert_sorted): Likewise. + (g_slist_remove): Rewrite using find_prev. + (g_slist_remove_link): Rewrite using find_prev_link. + (g_slist_remove_all, g_slist_insert_before): New. + +2006-08-21 Duncan Mak <duncan@a-chinaman.com> + + * src/gqueue.c: GQueue implementation. + * src/glib.h: Add prototypes. + * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c. + + * test/queue.c: + * test/Makefile.am (SOURCES): + * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue. + +2006-08-21 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no + realloc/delimiter token not found); use memcpy instead of strncpy for + better performance + + * test/test.c (run_group): allow running specific tests under a group; + added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit + and eg_strfreev to avoid performance skews in the driver + + * test/driver.c: allow user-specified group name to contain specific + test to run under the group as 'group_name:test1,test2,...testN' + + * test/string-util.c: Added more g_strsplit tests + + * test/slist.c: + * test/ptrarray.c: + * test/fake.c: + * test/string.c: + * test/list.c: + * test/array.c: + * test/hashtable.c: make test names shorter (no need to prefix with + the group since it runs under the group) + +2006-08-21 Miguel de Icaza <miguel@novell.com> + + * src/glib.h (g_hash_table_new_full): Add missing prototype. + Replace g_free(x) with plain free, so it can be used as a function + argument. + Add ABS + + * src/ghashtable.c: Add rehashing. + + * test/hashtable.c: Add a bunch of extra tests. + + * src/goutput.c: Fix g_log so it actually formats the data. + + * src/ghashtable.c (g_hash_table_new): The glib test suite + uncovered a bunch of bugs, the g_hash_table_new should actually + have parameters. + + (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs + uncovered. + +2006-08-20 Aaron Bockover <abockover@novell.com> + + * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv + + * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf + + * src/glib.h: added macros for above va_args printf functions + + * src/Makefile.am: added gmisc.c + + * test/whats-implemented: script to see what needs to be implemented + +2006-08-20 Chris Toshok <toshok@ximian.com> + + * test/array.c (test_array_big): add a test from the glib + documentation. + +2006-08-20 Chris Toshok <toshok@ximian.com> + + * test/tests.h: add array tests to the mix. + + * test/array.c: a few array tests. + + * src/glib.h: add array prototypes. + + * src/garray.c: initial array foo. + + * test/Makefile.am (SOURCES): add array.c + + * src/Makefile.am (libeglib_la_SOURCES): add garray.c + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * src/gstring.c: optimize and generalize reallocation by providing + a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are + very, very slow; GString is now much closer to GLib's implementation + in terms of performance + + * test/string.c: added speed-specific tests to beat on reallocation code + + * test/test-both: run make if the test drivers don't exist + +2006-08-19 Jonathan Chambers <jonathan.chambers@gmail.com> + + * src/gmodule.c: Add gmodule support for windows and fix + windows build. Contribution is licensed as MIT/X11. + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/driver.c: Added --debug mode that allows for testing all paths + of the driver without actually running real tests; runs only the 'fake' + test, which does nothing; useful for running the driver through valgrind + + * test/Makefile.am: + * test/tests.h: + * test/fake.c: Added fake test for valgrinding the driver + + * test/ptrarray.c: update sort test + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test-both: added --help + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/driver.c: added -n mode to show only raw global run times, + which is useful for scripts (test-both --speed-compare) + + * test/test-both: added --speed-compare mode + + * test/README: updated with information on --speed-compare + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test.c: do not print times if -t is not passed + + * test/driver.c: removed use of GList from the driver to avoid skews due + to performance differences between GLib and EGLib + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test.c: Perform iterations at the test level, only output one + report for all iterations of tests in a group to produce more usable + output; add timing for the tests and group; added get_timestamp for + easy code timing + + * test/test.h: Removed run_test as it should only be called from + run_group, added get_timestamp + + * test/Makefile.am: Added -DDRIVER_NAME + + * test/test-both: simple script to run both drivers with the same options + + * test/driver.c: Iterations are now run at the test level, show a global + status (OK/FAIL) indicator + + * test/README: Updated + + * configure.ac: Renamed from configure.in as configure.in naming + convention is deprecated in favor of configure.ac + + * autogen.sh: s/configure.in/configure.ac/ + +2006-08-19 Miguel de Icaza <miguel@novell.com> + + * Makefile.am: Removed MAINTAINERCLEANFILES that was too + aggresive, it failed make distcheck and the resulting tarball was + not buildable. + + * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER, + GSIZE_FORMAT macros, and move them into src/eglib-config.h + + Moved also gssize and gsize to be arch specific. This should fix + the 32/64 problems that Jon Chambers reported. + + * configure.in: test for pointer size, define the various values + depending on 32 vs 32/64 worlds, might need further porting in the + future. + + Change package name to eglib + + * test/slist.c, test/list.c, test/hashtable.c: Update tests to use + FAILURE macro. + + * test/string-util.c: fix leak for valgrind tests. + + * test/tests.h: New size test, for testing datatypes. + + * test/sizes.c: New tests. + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/README: Added quick guide on adding new tests/groups to the + driver and some examples on how to perform various tests with the driver + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/driver.c: Added getopt support and code timing, among other + nice features to make testing/profiling easier + + * test/test.c: Add support for suppressing output (quiet) and + define RESULT, FAILED, and OK + + * src/glib.h: + * src/glist.c: Added g_list_nth_data implementation + + * test/slist.c: + * test/string-util.c: + * test/ptrarray.c: + * test/string.c: + * test/hashtable.c: + * test/list.c: Use RESULT, FAILURE, and OK for tests + +2006-08-18 Miguel de Icaza <miguel@novell.com> + + * src/gstring.c (g_string_truncate): Implement truncate. + (g_string_prepend): implement. + + Fix various bugs uncovered by new tests. + + * src/glib.h: introduce gssize type, the signed one. Important. + + * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32 + defines that we can use to check on the host OS. + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/test.[ch]: + * test/driver.c: Support pass/fail logging on tests to show group report + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/test.c: + * test/test.h: Added result() to be used in place of g_strdup_printf(), + it's shorter to write and allows the duped string to be freed safely; + added license header to file + + * test/driver.c: Added license header to file + + * test/string-util.c: + * test/ptrarray.c: + * test/string.c: + * test/list.c: Use result() in place of g_strdup_printf(), it's nicer + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Implemented g_ptr_array_sort + + * test/ptrarray.c: Added sort test + + * test/driver.c: Added --help; support running N iterations and allow + selecting which test groups to run; uses the test group table in tests.h + + * test/tests.h: Added group table + + * test/test.h: + * test/test.c: Using a Group structure and table, removed run_groups + as we only need run_group now + + * test/slist.h: Removed, not needed, tests/groups defined in tests.h + +2006-08-18 Miguel de Icaza <miguel@novell.com> + + * src/unicode.c: New file, to host unicode code, it will throw as + this code is no longer used in the Mono runtime anyways. + + * src/glib.h: Use stdint.h types, a lot of the good stuff is + replicated by glib. + +2006-08-18 Duncan Mak <duncan@a-chinaman.com> + + * src/glist.c (g_list_remove, g_list_remove_link): Implemented. + + * src/gslist.c (g_slist_remove): Remember to set the next pointer + to NULL when the item to remove is the first item in the list. + +2006-08-18 Duncan Mak <duncan@a-chinaman.com> + + * src/glist.c: Implemented. Missing remove, + remove_link and insert_before. + + * test/list.c: Tests for GList. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Implemented g_ptr_array_remove and + g_ptr_array_remove_index + + * test/other: Removed, rewritten in Makefile.am + + * test/Makefile.am: Build test-eglib against local eglib and + test-glib against GLib 2.0 (replaces 'other') + + * test/ptrarray.c: Added tests for g_ptr_array_remove and + g_ptr_array_remove_index + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c: Added MIT license. + (g_slist_insert_sorted): Forgot the case where the data is + appended to the end of the list. + + * test/slist.c (test_slist_insert_sorted): Fix the test. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Added g_ptr_array_set_size implementation + + * test/ptrarray.c: Added test for g_ptr_array_set_size + +2006-08-17 Miguel de Icaza <miguel@novell.com> + + * src/glib.h: A handful of extra macros + + * configure.in, src/eglib-config.h.in: Set some system-specific + settings that are probed at configure time. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate) + + * src/glib.h: Added GPtrArray signatures + + * src/Makefile.am: Added gptrarray.c to build + + * test/ptrarray.c: + * test/tests.h: + * test/driver.c: + * test/Makefile.am: Add ptrarray tests for available functionality + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * test/test.h: + * test/test.c: Added group iterator/test driver functionality + + * test/driver.c: Added groups to run using new test functionality + + * test/slist.h: + * test/hashtable.h: + * test/string-util.h: Test group definitions for string util/hashtable + + * test/slist.c: + * test/str.c: + * test/hash.c: Added test definition table + + * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2 + + * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix + + * src/glib.h: Added missing function signatures + + * src/Makefile.am: added -D_FORTIFY_SOURCE=2 + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c (g_slist_remove_link): I misread the function + signature. Re-implemented. + (g_slist_delete_link): Implemented. + (g_slist_reverse): Implemented. + (g_slist_insert_sorted): Implemented. + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c (g_slist_find): + (g_slist_length): + (g_slist_remove): + (g_slist_remove_link): Implemented. + + * test/slist.c: Tests for GSList. + +2006-08-17 Raja R Harinath <harinath@gmail.com> + + * src/gslist.c (g_slist_free_1): New. Free a single list node. + (g_slist_free): Use it to free the list nodes. Don't free the + data, since the list doesn't own it. + (g_slist_append): Convert into a one-liner. + (g_slist_foreach): Remove redundant null check. + (g_slist_last): Actually return the last node. + (g_slist_copy): Simplify. + * src/gslist.h (g_slist_free_1): Add. + +2006-08-16 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c: + + * src/gslist.h: First attempt at implementing GSList, incomplete. + + * src/Makefile.am (libeglib_la_SOURCES): add gslist.c + * src/glib.h: Add GFunc definition. #include the new gslist.h. + +2006-08-16 Miguel de Icaza <miguel@novell.com> + + * src/Makefile.am: Added -Wall,-Werror, corrected lots of + mistakes. + + * src/gstring.c: Gstring implementation. + + * test/str.c (test_gstring): string tests. + +2006-08-16 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: Added g_strsplit implementation + + * test/driver.c: Run the split test + + * test/str.c: Added a test for g_strsplit + + * Makefile.am: + * src/Makefile.am: + * test/Makefile.am: Added MAINTAINERCLEANFILES + +2006-08-16 Miguel de Icaza <miguel@novell.com> + + * src/gouput.c: Implement some output routines, update missing + progress. + + * test: Add test driver, and initial tests. + +2006-08-15 Miguel de Icaza <miguel@novell.com> + + * src/ghashtable.c: Implement most of this, it is completely + untested at this point. + + + diff --git a/eglib/ChangeLog.old b/eglib/ChangeLog.old new file mode 100644 index 0000000000..204674eb31 --- /dev/null +++ b/eglib/ChangeLog.old @@ -0,0 +1,1564 @@ +2010-07-25 Zoltan Varga <vargaz@gmail.com> + + * configure.ac src/eglib-config.h.in src/eglib-config.hw: Define G_GINT64_FORMAT. + +2010-07-20 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (G_LIKELY): Implement these for gcc properly. + +2010-07-19 Miguel de Icaza <miguel@novell.com> + + * src/gmisc-win32.c (g_getenv): Distinguish between variable not + found and an empty variable. + + This should fix 566152 + +2010-07-19 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (G_MAXUINT64): Define this. Fixes #623293. + + * src/eglib-config.hw: Define UINT64_MAX. + +2010-07-16 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gmisc-unix.c: include config.h. Fixes bug #609632. + Use getpwuid_r instead of getpwent_r. + +2010-07-02 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Define gboolean as int32_t to match mono_bool. + +2010-06-22 Rodrigo Kumpera <rkumpera@novell.com> + + * src/ghashtable.c: Add code to sanity check the + hashtable contents. This is invaluable, for example, + to catch bugs where a key hashcode changes after + insertion. + +2010-06-18 Chris Toshok <toshok@ximian.com> + + patch from Jacob Berkman: + + * src/glib.h (g_mkdir): #define to mkdir + (g_ascii_strtoull): #define to strtoull + + * src/gmodule.h: add G_BEGIN/END_DECLS + + * src/gstr.c (g_strdupv): new function. + +2010-06-18 Rolf Bjarne Kvinge <RKvinge@novell.com> + + * src/eglib-remap.h: Remap g_ptr_array_remove_fast too. + +2010-06-15 Zoltan Varga <vargaz@gmail.com> + + * src/gunicode.c: Applied patch from Hib Eris <hib@hiberis.nl>. use "windows.h" + instead of "Windows.h". + +2010-05-25 Zoltan Varga <vargaz@gmail.com> + + * Applied patch from Burkhard Linke (blinke@cebitec.uni-bielefeld.de). Fix + building on solaris. + +2010-05-21 Zoltan Varga <vargaz@gmail.com> + + * src/gmisc-win32.c (g_setenv): Use the + GetEnvironmentVariableW/SetEnvironmentVariableW variants. + +2010-05-15 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h (g_error): Add a for (;;) after the call to tell GCC this doesn't + return, fixing some warnings. + +2010-05-13 Alan McGovern <amcgovern@novell.com> + + * src/gstring.c: Put in some null guards for the ctors + +2010-05-11 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c: Pull the Windows.h header when G_OS_WIN32 is + defined. + +2010-05-11 Atsushi Enomoto <atsushi@ximian.com> + + * Makefile.am : do not try to build test on windows (fails). + * src/glib.h : fix cygwin build, do not include unistd.h. + +2010-05-10 Miguel de Icaza <miguel@novell.com> + + * gfile-win32.c: Port this to use the Win32 APIs to get this + building with Cygwin. + +2010-05-07 Andrew Jorgensen <ajorgensen@novell.com> + + * test/test.h: Fix some compiler warning that SUSE takes seriously. + +2010-05-06 Alan McGovern <amcgovern@novell.com> + + * src/gmarkup.c: Fix a parser issue when skipping the xml declaration. + +2010-05-06 Jonathan Chambers <joncham@gmail.com> + + * gfile-win32.c: Use __stat64 instead of _stat64. + +2010-05-04 Jonathan Chambers <joncham@gmail.com> + + * gspawn.c: Remove extern define for MSVC. + +2010-05-03 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include unistd.h on !windows for pid_t. + + * gspawn.c: Add an extern define for environ on !apple platforms. + +2010-05-02 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include sys/types.h for pid_t. + +2010-05-01 Zoltan Varga <vargaz@gmail.com> + + * src/goutput.c (g_logv): Append a '\n' to the end of the string as glib does. + +2010-04-28 Zoltan Varga <vargaz@gmail.com> + + * configure.ac src/gspawn.c: Applied openbsd changes from Robert Nagy + <robert@openbsd.org>. + +2010-04-16 Miguel de Icaza <miguel@novell.com> + + * src/gshell.c (g_shell_unquote): Implement this. + +2010-04-25 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: The iconv function may be libiconv_open. + Fixes linking with GNU libiconv. + + Contributed under MIT/X11 license. + +2010-04-23 Geoff Norton <gnorton@novell.com> + + * configure.ac: The iconv function is iconv_open. + +2010-04-19 Jonathan Pryor <jpryor@novell.com> + + * src/glib.h: Rebase g_return_if_fail(), g_return_val_if_fail() in + terms of g_critical() instead of printf, and turn g_printerr() into + an actual function instead of a macro. + * src/goutput.c: Add Android support, sending g_print(), g_printerr(), + and g_log() messages to the Android system log. + +2010-04-16 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * test/ptrarray.c: new tests + * src/gptrarray.c: implemented g_ptr_array_remove_fast(). + +2010-04-10 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: Add checks for libm and libdl. + * {src,test}/Makefile.am: Remove hardcoded library dependencies. + Fixes compilation on Haiku. + + Contributed under MIT/X11 license. + +2010-03-05 Zoltan Varga <vargaz@gmail.com> + + * test/test.c (_GNU_SOURCE): Fix compilation if _GNU_SOURCE is already defined. + + +Thu Mar 4 16:34:37 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/unicode-data.h: save 70 KB. + +Thu Mar 4 16:18:34 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/eglib-remap.h, src/glib.h: header file to remap the symbols + so there is no clash with system glib. + * src/Makefile.am: build static lib as well. + +2010-03-04 Zoltan Varga <vargaz@gmail.com> + + * configure.ac: Add a check for ISO varargs. + + * test/test.c: Fix the build. + + * src/glib.h src/goutput.c: Emit asserts through a g_assertion_message () + function which is decorated with G_GNUC_NORETURN, to fix many warnings when using + the eglib build. + +Mon Mar 1 17:12:24 CET 2010 Paolo Molaro <lupus@ximian.com> + + * src/unicode-data.h, src/gutf8.c: don't export private symbols. + +2009-12-03 Zoltan Varga <vargaz@gmail.com> + + * src/gmisc-unix.c (g_get_user_name): Avoid returning NULL if the env + var is not set. + +2009-10-15 Andreia Gaita <avidigal@novell.com> + + * src/gptrarray.c: implement g_ptr_array_remove_index_fast + * src/glib.h: fix g_ptr_array_remove_index_fast declaration + * test/ptrarray.c: new tests + +2009-10-15 Andreia Gaita <avidigal@novell.com> + + * src/garray.c: (g_array_remove_index_fast) only move 1 element + and not the whole shebang + +2009-09-26 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * test/queue.c: new tests. + * src/gqueue.c: fixed pop_head. + +2009-09-26 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gqueue.c: add g_queue_push_tail. + +2009-06-20 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Add GUINT32_FROM/TO_BE macros. + +2009-06-09 Jonathan Chambers <joncham@gmail.com> + + * CMakeLists.txt: Add start of CMake build. + * src/CMakeLists.txt: Add start of CMake build. + + Contribution is licensed as MIT/X11. + +2009-06-02 Bill Holmes <billholmes54@gmail.com> + + * src/gpath.c (g_find_program_in_path): While searching on Windows + also try additional suffixes .exe, .cmd, .bat, and.com. + + Contributed under MIT/X11 license. + +2009-05-27 Geoff Norton <gnorton@novell.com> + + * src/gfile-posix.c: Fix g_get_current_dir on amd64 + +2009-04-22 Jeffrey Stedfast <fejj@novell.com> + + * src/gtimer-win32.c (g_timer_elapsed): Avoid re-querying freq by + just saving it in a static variable. Also modified microseconds + calculation to avoid overflow. + +2009-04-05 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c: Avoid situations where we add the separator if one + of the elements is the separator. + +2009-04-02 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c: If the first element is NULL, return an empty + string. + +2009-02-19 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * src/gstr.c: use memset in g_strnfill. + +2009-01-19 Bill Holmes <billholmes54@gmail.com> + + * src/gstr.c (g_strnfill): Fixing a warning for MSVC. + + Contributed under MIT/X11 license. + +2009-02-05 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c: Add g_strnfill + + * src/glib.h: Add g_list_previous + +2009-01-19 Bill Holmes <billholmes54@gmail.com> + + * gmisc-win32.c (g_path_is_absolute): Adding support for UNC + paths on Windows. + + Contributed under MIT/X11 license. + +2009-01-08 Bill Holmes <billholmes54@gmail.com> + + * winconfig.h, src/gfile-posix.c : + Fixing the MSVC builds. + + Contributed under MIT/X11 license. + +2009-01-07 Miguel de Icaza <miguel@novell.com> + + * src/gfile-posix.c: Move g_get_current_dir, as it is a + POSIX-esque feature, and some other systems do not have current + directories. + + * src/glib.h (G_LOCK_DEFINE, G_LOCK_DEFINE_STATIC): + + Embedded support from Paolo's work on quack. + + * configure.ac: check for strtok_r, langinfo.h and iconv.h + + * src/gpath.c (strtok_r): Add a strtok_r implementation if it is + not available on the target system. + +2008-11-05 Bill Holmes <billholmes54@gmail.com> + + * src/gutf8.c, src/unicode-data.h, src/gunicode.c : + Fixing the MSVC builds. + + Contributed under MIT/X11 license. + +2008-11-04 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c, src/gunicode.c, src/glib.h: + implemented g_unichar_type(), g_unichar_toupper(), + g_unichar_tolower(), g_unichar_totitle(), g_utf8_strup() + and g_utf8_strdown(). Fixed some surrogate pair bugs. + * TODO : removed implemented things. + * test/unicode.c, test/tests.h, test/utf8.c, test/Makefile.am: + added new tests. + +2008-11-04 Atsushi Enomoto <atsushi@ximian.com> + + * src/unicode-data.h : new header for some new unicode manipulation + functions. + +2008-10-17 Miguel de Icaza <miguel@novell.com> + + * Allow types to be defined on the eglib-config.h file, that could + be a platform specific generated type file. + + * gtimer.c: split functionality in platforms. + +2008-10-13 Bill Holmes <billholmes54@gmail.com> + + * src/gdate-win32.c : Fix compiler errors for MSVC. + + * src/gpath.c : Fix compiler errors for MSVC. + + * src/gfile-posix.c : Adding declaration for mkstemp for the win 32 + implementation in gfile-win32.c. + + Contributed under MIT/X11 license. + +2008-10-11 Miguel de Icaza <miguel@novell.com> + + * gtimer.c: Same process. + + * src/glib.h: Move g_strdup here, to consolidate all allocations + in this header, will help for merging the allocation work later. + + * src/gpattern.c (compile_pattern): From Unity, use -1 in the enum + for MatchType. + + * src/gpath.c: Split this one as well. + + * src/gmodule-win32.c, src/gmisc-unix.c, src/gmisc-win32.c, + src/gmodule-unix.c: split functionality in platforms. + + * src/goutput.c (g_logv): On some platforms, before we abort we + want to flush the stdout/stderr. + +2008-10-10 Miguel de Icaza <miguel@novell.com> + + * Split functionality that is operating system specific into + -win32.c, -unix.c and -posix.c + + * Use g_malloc everywhere, and g_free, so that these can be easily + overwritten consistently. + +2008-09-16 Bill Holmes <billholmes54@gmail.com> + + * src/gunicode.c : Fix a warning. + + Contributed under MIT/X11 license. + +2008-08-28 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Adding a c++ definition for G_BEGIN_DECLS. + + Contributed under MIT/X11 license. + +2008-08-27 Bill Holmes <billholmes54@gmail.com> + + * glib.h, gunicode.c : Fixing some compiler errors. + + Contributed under MIT/X11 license. + +2008-08-20 Mike Voorhees <vernish13@gmail.com> + + * Patch from Mike Voorhees to fix various problems with + g_utf8_validate compared to the glib implementation and unit tests + to ensure that there are no regressions. + + From a mailing list post to mono-devel-list on August 19th, 2008 + + [Mono-dev] utf8 related patches. Please review. + +2008-08-20 Mike Voorhees <vernish13@gmail.com> + + * src/glib.h : Adding declarations for g_utf8_strlen, g_utf8_get_char, + and g_utf8_next_char. + + * src/gunicode.c : Adding implementation for g_utf8_strlen, g_utf8_get_char, + and g_utf8_next_char. + + * src/gunicode.c : Rewrote g_utf8_validate. + + * test/utf8.c Adding tests for g_utf8_strlen, g_utf8_get_char, + g_utf8_next_char, and g_utf8_validate. + + Contributed under MIT/X11 license. + +2008-08-05 Andreas Faerber <andreas.faerber@web.de> + + * autogen.sh: Suppress arguments warning for NOCONFIGURE. + + Contributed under MIT/X11 license. + +2008-08-04 Bill Holmes <billholmes54@gmail.com> + + * test/tests.h, test/Makefile.am, test/memory.c : Adding memory tests to test + allocation routines return NULL when 0 size is passed in. + + Contributed under MIT/X11 license. + +2008-08-04 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Changing the allocation routines to return null if 0 size is + passed in. + + Contributed under MIT/X11 license. + +2008-06-16 Zoltan Varga <vargaz@gmail.com> + + * src/vasprintf.c (vasprintf): Applied patch from Michail Ushakov + <migelU@gmail.com>. Workaround broken vsnprintf on windows. Fixes + #400445. + +2008-06-11 Zoltan Varga <vargaz@gmail.com> + + * src/goutput.c (g_log): Remove unnecessary and incorrect call to + g_strdup_printf (). Fixes #398918. + +2008-05-01 Bill Holmes <billholmes54@gmail.com> + + * src/glib.h : Adding declarations for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + * src/gutf8.c : Adding implementation for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + * test/utf8.c Adding tests for g_ucs4_to_utf16 and g_utf16_to_ucs4. + + Contributed under MIT/X11 license. + +2008-04-20 Geoff Norton <gnorton@novell.com> + + * src/gspan.c: Fix the _NSGetEnviron define to prevent an impropoer + pointer dereference. + +2008-03-19 Bill Holmes <billholmes54@gmail.com> + + * src/gpath.c (g_path_is_absolute) : Adding a case for '/' + on Windows. + + * src/gpath.c (g_get_user_name) : On Windows add a check for %USERNAME% + when %USER% fails. + + * src/gstr.c (g_strsplit, g_strsplit_set): Change to remove truncation + errors with MSVC build. + + * src/gstr.c (g_filename_to_uri, g_filename_from_uri): Fixes to handle + Windows paths. + + * src/gstr.c (g_ascii_strncasecmp): Convert each character to lower case + before comparing. + + * src/gunicode.c (g_get_charset): Implement for Windows. + + Contributed under MIT/X11 license. + +2008-03-12 Geoff Norton <gnorton@novell.com> + + * src/gutf8.c: Implement g_ucs4_to_utf16 and g_utf16_to_ucs4 as + asserts. They're needed to build mono with eglib. + * src/gutil.h: Add a few missing function declarations to the header. + * src/gspawn.c: Some darwin implementations don't have crt_externs.h + So we'll just define _NSGetEnviron() ourselves. + * Makefile.am: Dont build test when cross compiling. + * configure.ac: Define CROSS_COMPILING when cross compiling. + Undefine _FORTIFY_SOURCE on arm-apple-darwin as the headers it + requires are not available. + +2008-01-15 Andreas Faerber <andreas.faerber@web.de> + + * configure.ac: Add default G_BREAKPOINT implementation. + Fix typo in breakpoint CPU output. + +2007-12-23 Zoltan Varga <vargaz@gmail.com> + + * src/glib.h: Include <limits.h>. Fixes #350482. + +2007-11-21 Dick Porter <dick@ximian.com> + + * src/gslist.c (g_slist_find_custom): Implement + + * src/glist.c (g_list_find_custom): Implement + + * test/list.c: Test g_list_find_custom() + + * test/slist.c: Test g_slist_find_custom() + +2007-11-20 Dick Porter <dick@ximian.com> + + * src/gstr.c: Implement g_strsplit_set() and re-implement + g_strsplit() so it passes the additional tests. (g_strsplit() + should treat multi-char delimiters as just a single token, rather + than a set of delimiters.) + + * src/gslist.c: Implement g_slist_index(), g_slist_nth() and + g_slist_nth_data(). + + * test/string-util.c: Test g_strsplit_set() and more tests for + g_strsplit(). + + * test/slist.c: Test g_slist_nth() and + g_slist_index(). + +2007-11-06 Geoff Norton <gnorton@novell.com> + + * configure.ac: Check for libiconv_open as the previous check was failing against + some versions of libiconv. + +2007-11-06 Andreas Faerber <andreas.faerber@web.de> + + * test/Makefile.am: Fix noinst_PROGRAMS for automake 1.6.3 + Add support for VPATH + +2007-11-06 Geoff Norton <gnorton@novell.com> + + * configure.ac: Determing if glib-2.0 is installed and set HAVE_GLIB appropriately + * test/Makefile.am: Only build test-glib if glib-2.0 is available + +2007-11-05 Geoff Norton <gnorton@novell.com> + + * configure.ac: Check for getpwent_r and wether libiconv is needed to be linked. + Also look to see if we can use export-dynamic in the test suite. + * test/Makefile.am: Get LDFLAGS from configure instead of setting them. + * src/gerror.c: Implement g_clear_error. + * src/glib.h: Only use the format, ... convention is HAVE_C99_SUPPORT is available. + * src/gpath.c: Only use the getpwent_r codepath if getpwent_r is available. + * src/gspawn.c: Define environ to call _NSGetEnviron() on Apple. + * src/Makefile.am: Remove -Werror so we dont fail on different function declarations. + Portions of all of the above are from Andreas Faerber & Jonathan Chambers + +2007-10-31 Jonathan Chambers <joncham@gmail.com> + + * src/ghashtable.c: Add g_hash_table_foreach_steal. + * src/garray.c: Add g_array_remove_index_fast. + * src/gpath.c (g_path_is_absolute): Handle windows paths. + * src/glib.h: Add g_hash_table_foreach_steal and g_array_remove_index_fast + + Contribution is licensed as MIT/X11. + +2007-06-13 Jonathan Chambers <joncham@gmail.com> + + * src/gunicode.c: Add g_unichar_isxdigit and g_unichar_xdigit_value. + * src/gmisc.c: Add g_win32_getlocale stub. + * src/glib.h: Add declarations of above functions, + GFreeFunc typedef, and CLAMP, GUINT_TO_LE, and threading + macros. + + * test/string-util.c: Fix warning. + * test/utf8.c: Add test for g_unichar_xdigit_value. + + Contribution is licensed as MIT/X11. + +2007-05-05 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: + * src/glib.h: Added g_ascii_tolower implementation; make g_ascii_strdown + use it to do the transformation + + * test/string-util.c: Added a test for g_ascii_strdown + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/gstr.c: Fix off by one error in g_strdup allocation. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/eglib-config.hw: Forgot to add for msvc build. + * src/vasprintf: Forgot to add for msvc build. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + * src/gstr.c: Fix off by one error for NULL terminator. + +2007-04-27 Jonathan Chambers <joncham@gmail.com> + + Combined patch from Michael Jerris <mike@jerris.com> and me. + * winconfig.h: Config file for msvc builds. + * configure.ac: Add AC_CHECK_HEADERS for getopt.h, sys/time.h, + sys/wait.h, and pwd.h. + + * src/gspawn.c: Include config.h and use HAVE_* macros. + * src/eglib-config.h.in: Add inclusion guards. + * src/ghashtable.c: Fix warnings. + * src/gmisc.c: Windows implementation of g_getenv, g_setenv, + and g_unsetenv. + * src/gpath.c: Include config.h and use HAVE_* macros. + * src/gmarkup.c: Fix warnings. + * src/gptrarray.c: Fix warnings. + * src/gstr.c: Fix warnings and use HAVE_* macros. + * src/glib.h: Move macros to eglib-config.h and include it. + * src/gdate.c: Implement g_get_current_time on windows. + * src/gpattern.c: Fix warnings. + * src/gdir.c: Implement g_dir on windows. + * src/gfile.c: Implement mkstemp and g_file_test on windows. + * src/gtimer.c: Implement g_timer on windows. + * src/gmodule.c: Fix warnings. + * src/gunicode.c: Fix warnings. + * src/gutf8.c: Fix warnings. + + * test/ptrarray.c: Fix warnings. + * test/string.c: Fix warnings. + * test/list.c: Fix warnings. + * test/pattern.c: Use HAVE_* macros. + * test/dir.c: Use HAVE_* macros. + * test/file.c: Use HAVE_* macros and use system specific files for tests. + * test/test.c: Fix warnings and use HAVE_* macros. + * test/timer.c: Use HAVE_* macros. + * test/string-util.c: Fix warnings. + * test/test.h: Supress warnings on msvc. + * test/module.c: Use HAVE_* macros. + * test/utf8.c: Fix warnings. + * test/spawn.c: Use HAVE_* macros. + * test/driver.c: Fix warnings and use HAVE_* macros. + * test/path.c: Use HAVE_* macros and use system specific files for tests. + * test/sizes.c: Fix warnings. + +2007-04-24 Jonathan Chambers <joncham@gmail.com> + + Patch from Michael Jerris <mike@jerris.com> + * src/gspawn.c: Start msvc build. + * src/gpath.c: Start msvc build. + * src/gmarkup.c: Start msvc build. + * src/gshell.c: Start msvc build. + * src/gstr.c: Start msvc build. + * src/glist.c: Start msvc build. + * src/glib.h: Start msvc build. + * src/gdate.c: Start msvc build. + * src/gpattern.c: Start msvc build. + * src/gdir.c: Start msvc build. + * src/gfile.c: Start msvc build. + * src/gtimer.c: Start msvc build. + * src/gmodule.c: Start msvc build. + * src/gunicode.c: Start msvc build. + +2007-01-27 Robert Jordan <robertj@gmx.net> + + * test/Makefile.am: Add linker option to be able to + load symbols from the main program. + * test/module.c: Clean-ups. + +2007-01-26 Robert Jordan <robertj@gmx.net> + + * configure.ac: Add PLATFORM_WIN32 conditional. + * src/Makefile.ac: Use PLATFORM_WIN32 conditional for psapi, iconv + * test/module.c, test/tests.h, test/Makefile.am: New test for gmodule. + * src/gmodule.h: Add G_MODULE_{IMPORT|EXPORT} defines. + * src/gmodule.c (g_module_symbol): Implement in-proc symbol lookup + for Win32. + * src/gmodule.c: Add GModule.main_module, consider it in + g_module_close (). + * src/gpath.c (g_get_home_dir): Add dummy Win32 implementation to + fix the build. + +2006-11-03 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_path_get_dirname): If the pathname starts with a + "/", return the "/". + + * test/string-util.c (test_strlcpy): Add new test. + + * src/gunicode.c (g_filename_from_utf8): g_strlcpy needs the full + size, with the extra zero at the end; Fixes the stack trace + issue. + +2006-10-30 Miguel de Icaza <miguel@novell.com> + + * test/utf8.c (test_utf8_seq): Add new failing test. + +2006-10-30 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c : several fixes: + - fixed incorrect mb_size clear and mb_remain computation. + - initialize items_written to 0 for error case. + - in utf8_to_utf16_len differentiate error messages completely. + - in g_utf8_to_utf16 use guchar instead of gchar. + * test/utf8.c : added test case string in test_utf8_seq() to + both test_utf8_to_utf16() and test_utf16_to_utf8(). + +2006-10-21 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c (g_filename_from_utf8): Use g_strlcpy here. + + * src/gmarkup.c (g_markup_parse_context_parse): Do not dereference + null values here. This gets things a little bit further in + corlib, but not too far. + + * src/gdir.c (g_dir_read_name): Do not return . or .. + + * src/gstr.c (g_ascii_xdigit_value): Make this into a function, + thanks to Paolo for pointing the problem with the double macro + expansion. + + * src/gmodule.c (g_module_open): Actually return NULL if we fail + to load the module (was hiding the real bug in the pinvoke tests). + + (g_module_build_path): Do not prepend "lib" if the "lib" is part + of the call. + + * src/gstr.c (g_strsplit): this routine has some non-expected + behavior, if the string begins with the delimiter, it will return + an empty first string, unlike strtok + + * src/gpath.c (g_path_get_dirname): Return "." as a dirname for + paths that do not contain a directory. + +2006-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/array.c: new test for insertion in the middle of other values. + * src/garray.c: fixed destination index. + +2006-10-18 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_build_path): Do not append terminator if the next + string is empty. + + * src/gutf8.c (g_utf8_to_utf16): Include trailing zero as + documented. + (g_utf16_to_utf8): Include trailing zero as documented. + +2006-10-17 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_strdown): Actually move. + + * src/gmarkup.c (g_markup_parse_context_parse): Accept dots in the + sequence, reset the state after a closing element. + + * src/garray.c (g_array_insert_vals): Shift the elements the + correct amount. + + (g_array_insert_vals): Should actually use the + number of elements to insert. + + * test/array.c: Add new test case, this was happening in the JIT. + + * Add _GNU_SOURCE at configure time, remove from sources. + + * src/gstr.c (g_strsplit): Empty strings return a 0 value vector. + + * src/glib.h (G_MAXINT64, G_MININT64): Add another set of macros + for the support stuff. + + Move private prototypes elsewhere + + * src/glib.h (g_thread_init): Adding missing brace + (g_list_next): remove ; from the macro definition. + +2006-10-17 Miguel de Icaza <miguel@novell.com> + + * src/gutf8.c: internal methods + + * src/ghashtable.c: internal methods. + +2006-10-16 Miguel de Icaza <miguel@novell.com> + + * src/gerror.c (g_propagate_error): Implement. + + * src/gstr.c (g_strjoinv, g_ascii_strncasecmp): implement. + + * test/string-util.c (test_ascii_strncasecmp): test + +2006-10-15 Miguel de Icaza <miguel@novell.com> + + * configure.in: Fix detection of platforms the [3456] stuff does + not work inside autoconf. + + * src/eglib-config.h.in: Make G_BREAKPOINT into a function-macro + + * src/glib.h (offsetof): Mono sources depend on this, bring this + from the standard definition. Redefine G_STRUCT_OFFSET in terms + of this. + + * src/glib.h (G_STRUCT_OFFSET): fix macro definition. + fix typo. + + * src/sizes.c: Add test. + + * src/gshell.c: Make it build + +2006-10-14 Miguel de Icaza <miguel@novell.com> + + * src/glib.h: add various _TO_LE and _FROM_LE macros. + + * test/endian.c: tests for endian conversion macros. + +2006-10-09 Miguel de Icaza <miguel@novell.com> + + * src/gmodule.h: Move definitions of gmodule to gmodule.h because + Mono expects it there. + +Mon Oct 9 12:59:16 CEST 2006 Paolo Molaro <lupus@ximian.com> + + * src/ghashtable.c: s/to_prime/g_spaced_primes_closest/g + and put the array in readonly memory. + * src/gstr.c: fixed the build and made array const. + * src/gmodule.c: fixed thinko. + +2006-10-08 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_strdup): should allow NULL as an argument. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strescape. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * configure.ac: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strlcpy. + +2006-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * TODO: + * src/gstr.c: + * src/glib.h: implemented g_strdelimit. + +2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/spawn.c: add search path flag when running ls. + * src/gspawn.c: g_spawn_command_line_sync searches the program in the + PATH if it's not an absolute path. + +2006-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/string-util.c: + * src/glib.h: implement g_ascii_xdigit_value and tests. + +2006-10-06 Miguel de Icaza <miguel@novell.com> + + * src/gstr.c (g_ascii_strdown): Implement. + + * str/glib.c (g_log_set_handler): empty. + (g_printerr): empty. + (GMemVTable): define, empty, ignored. + (G_USEC_PER_SEC) :-) + + * src/gunicode.c (g_convert): Add bytes_read, bytes_written + support; Small fixes to avoid valgrind errors. + + (g_utf8_validate): Add, based on the libxml code. + + gstr.c: implement g_strdown. + +2006-10-05 Miguel de Icaza <miguel@novell.com> + + * src/gunicode.c: Some work in progress to implement g_convert + (which is needed by g_locale_to_utf8). + +2006-09-18 Miguel de Icaza <miguel@novell.com> + + * test/string-util.c (test_filename_from_uri): tests for new + methods. + + * src/gstr.c (g_filename_to_uri, g_filename_from_uri): implement. + +2006-09-14 Atsushi Enomoto <atsushi@ximian.com> + + * src/gutf8.c, test/utf8.c : EOL fix. + +2006-09-04 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c: The leak fixing commit. + + * src/gmarkup.c (g_markup_parse_context_end_parse): Add missing + method. + (g_markup_parse_context_free): Implement. + (parse_attributes): Store the value, not the attribute name + twice. + Properly check the /> section. + (g_markup_parse_context_parse): When checking for error, use the + "error!=NULL && *error != NULL" upon return from callbacks, + it is only then that its valid to check for *error for error + conditions. + (g_markup_parse_context_parse): Add comment processing. + + Only release one element of the list. + + * test/markup.c: Incorporate the kind of code that is used in Mono + for domain loading; Will test the rest later. + +2006-09-01 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c (g_markup_parse_context_parse): Add text parsing + support, and end-element support; not tested yet. + +2006-09-01 Atsushi Enomoto <atsushi@ximian.com> + + * gutf8.c : bad allocation size. multiply sizeof gchar/gunichar2. + +2006-09-01 Atsushi Enomoto <atsushi@ximian.com> + + * gutf8.c : when error is null, utf8_to_utf16_len() and + utf16_to_utf8_len() could return -1, so return NULL for those + cases in g_utf8_to_utf16() and g_utf16_to_utf8(). + +2006-09-01 Miguel de Icaza <miguel@novell.com> + + * src/gmarkup.c: Builds and does minimal parsing. + + * test/markup.c: Sample test cases I have been using + +2006-08-31 Atsushi Enomoto <atsushi@ximian.com> + + * src/gerror.h, + src/gerror.c : added g_set_error(). + * src/gutf8.c : + g_utf8_to_utf16() and g_utf16_to_utf8() implementation. + * src/glib.h : added all above, and some dependent bits. + * src/Makefile.am : added gutf8.c. + * TODO: removed above. + * test/Makefile.am, + test/tests.h : added utf8 tests. + * test/utf8.c : test for g_utf8_to_utf16 and g_utf16_to_utf8. + It still needs more tests e.g. for multibytes. + +2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/gspawn.c: small touch-ups and make read/write EINTR-proof. + +2006-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/file.c: remove useless test. + + * test/spawn.c: new g_spawn_async_with_pipes test. + * src/glib.h: Modified file. + * src/gspawn.c: implemented g_spawn_async_with_pipes. Needs fine tuning. + +2006-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: Modified file. + * test/tests.h: + * test/pattern.c: + * test/dir.c: + * test/Makefile.am: + * src/Makefile.am: + * src/glib.h: + * src/gdir.c: + * src/gfile.c: implemented g_dir_*, unix version. + +2006-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/glib.h: + * test/Makefile.am: Modified file. + * test/tests.h: + * src/Makefile.am: Modified file. + * test/pattern.c: + * src/gpattern.c: implemented the 3 pattern matching functions used. + + * test/ptrarray.c: fix the compare function to work with qsort. + + * test/file.c: + * test/path.c: + * src/gspawn.c: + * src/gpath.c: made valgrind happy. + +2006-08-26 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/file.c: + * src/glib.h: + * src/gfile.c: implemented g_file_test. Changed the default mask to + .XXXXXX. Add tests. + +2006-08-26 Raja R Harinath <rharinath@novell.com> + + * src/sort.frag.h (digit): Declare here based on externally + provided typedef 'list_node'. + (MAX_DIGITS): Use 'sizeof (list_node)'. + * src/gslist.c (list_node): Declare instead of 'digit'. + * src/glist.c: Likewise. + + * test/slist.c (verify_sort): Verify the length of the list too. + (test_slist_sort): Free the correct list. + * test/list.c: Likewise. + * src/sort.frag.h (MAX_DIGITS): Rename from N_DIGITS. + (combine_sort): Change 'max_pos' argument to more natural + 'n_digits'. + (increment): Likewise. Use 'n_digits' to avoid reading at an + offset that hasn't been initialized. + (do_sort): Remove memset. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: + * test/file.c: + * src/glib.h: + * src/gfile.c: implement g_file_open_tmp. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TODO: + * src/glib.h: + * src/gdate.c: New file. + * src/gfile.c: New file. + * src/Makefile.am: implemented g_file_get_contents and + g_get_current_time. + + * test/tests.h: + * test/file.c: New file. + * test/Makefile.am: tests for the above. + +2006-08-26 Raja R Harinath <rharinath@novell.com> + + * src/sort.frag.h: Add copyright notice and some explanation. + (increment): Remove null check. + (combine_digits): Add 'list' argument to seed the summation. + (do_sort): Use the empty or singleton tail as the seed, rather + than calling 'increment'. + +2006-08-25 Raja R Harinath <rharinath@novell.com> + + * TODO: Remove 'List' entries. + * src/Makefile.am (libeglib_la_SOURCES): Add sort.frag.h. + * src/sort.frag.h: New. Implements a "generic" bottom-up "counting" + mergesort that works both on singly- and doubly-linked lists. + * src/gslist.c (g_slist_sort): Use it. + * src/glist.c (g_list_sort): Likewise. + * src/glib.h (g_slist_sort, g_list_sort): Declare. + * test/slist.c, test/list.c: Add basic testcases. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/gspawn.c: propagate errors from reads. + * src/gpath.c: an empty PATH is like a NULL one. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/tests.h: + * test/timer.c: + * test/Makefile.am: + * TODO: + * src/glib.h: + * src/gtimer.c: + * src/Makefile.am: implemented GTimer. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/tests.h: + * test/Makefile.am: + * test/spawn.c: + * src/gspawn.c: + * src/glib.h: + * src/Makefile.am: initial implentation of g_spawn_command_line_sync. + Still need better error handling, but works for the most part. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * src/garray.c: grow faster so that the 'big' test does not crawl. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/shell.c: + * src/gqueue.c: plugged leaks. + +2006-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * test/path.c: + * src/gpath.c: when PATH is not defined, the current dir is used. + See execvp(3). + +2006-08-25 Alp Toker <alp@atoker.com> + + * src/gstr.c: g_strv_length() should return guint, not gint + * src/glib.h: Add g_strv_length() prototype + +2006-08-24 Miguel de Icaza <miguel@novell.com> + + * src/gpath.c (g_get_home_dir, g_get_tmp_dir, g_get_user_name, + g_get_prgname, g_set_prgname): implemented. + + * test/ Fix leaks. + + * src/gpath.c (g_get_current_dir): Implement. + + (g_find_program_in_path, g_path_is_absolute): implement. + + Add g_path_get_dirname, g_path_get_basename + + * src/gpath.c: Path routines + +2006-08-23 Miguel de Icaza <miguel@novell.com> + + * src/gerror.c: Implement. + + * src/glist.c (g_list_sort): Remove routine instead of hoping that + it wont crash when we run it. + +2006-08-23 Raja R Harinath <rharinath@novell.com> + + * src/glist.c (g_list_insert_before): Avoid non-head declaration. + + * test/slist.c (test_slist_insert_before): Add. + * src/gslist.c (g_slist_insert_before): Append if 'sibling' is null. + + * test/list.c (test_list_insert_before): Add test for return value + of g_list_insert_before. + * test/Makefile.am (test_eglib_LDADD): Refer to the .la file so as + to rebuild test if eglib changes. + * src/glist.c (new_node, disconnect_node): New helpers that + maintain doubly-linked list invariants. + (g_list_prepend, g_list_append): Express in terms of new_node. + (g_list_insert_before): Likewise. Fix return value when inserting + in the middle of the list. + (g_list_concat): Reorganize to make more compact. + (g_list_nth): Likewise. + (g_list_nth_data): Don't segfault if 'n' is too large. + (g_list_remove): Rewrite using _find and disconnect_node. + (g_list_remove_link): Don't traverse list: use disconnect_node. + (g_list_insert_sorted): Rewrite to make more compact. Use new_node. + (g_list_copy): Likewise. + (_prepend, _concat): Remove. + * src/gslist.c (insert_after, find_prev, find_prev_link): + New helpers. + (g_slist_copy): Simplify slightly, using insert_after. + (g_slist_concat): Reorganize to make more compact. + (g_slist_find): Likewise. + (g_slist_insert_sorted): Likewise. + (g_slist_remove): Rewrite using find_prev. + (g_slist_remove_link): Rewrite using find_prev_link. + (g_slist_remove_all, g_slist_insert_before): New. + +2006-08-21 Duncan Mak <duncan@a-chinaman.com> + + * src/gqueue.c: GQueue implementation. + * src/glib.h: Add prototypes. + * src/Makefile.am (libeglib_la_SOURCES): Include gqueue.c. + + * test/queue.c: + * test/Makefile.am (SOURCES): + * test/tests.h (DEFINE_TEST_GROUP_INIT_H): add tests for GQueue. + +2006-08-21 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: fixed bug/invalid read/write on malloc-only case (no + realloc/delimiter token not found); use memcpy instead of strncpy for + better performance + + * test/test.c (run_group): allow running specific tests under a group; + added copied g_strsplit/g_strfreev from EGlib source as eg_strsplit + and eg_strfreev to avoid performance skews in the driver + + * test/driver.c: allow user-specified group name to contain specific + test to run under the group as 'group_name:test1,test2,...testN' + + * test/string-util.c: Added more g_strsplit tests + + * test/slist.c: + * test/ptrarray.c: + * test/fake.c: + * test/string.c: + * test/list.c: + * test/array.c: + * test/hashtable.c: make test names shorter (no need to prefix with + the group since it runs under the group) + +2006-08-21 Miguel de Icaza <miguel@novell.com> + + * src/glib.h (g_hash_table_new_full): Add missing prototype. + Replace g_free(x) with plain free, so it can be used as a function + argument. + Add ABS + + * src/ghashtable.c: Add rehashing. + + * test/hashtable.c: Add a bunch of extra tests. + + * src/goutput.c: Fix g_log so it actually formats the data. + + * src/ghashtable.c (g_hash_table_new): The glib test suite + uncovered a bunch of bugs, the g_hash_table_new should actually + have parameters. + + (g_hash_table_remove, g_hash_table_foreach_remove): Fixed bugs + uncovered. + +2006-08-20 Aaron Bockover <abockover@novell.com> + + * src/gmisc.c: added g_setenv, g_getenv, g_unsetenv + + * src/gstr.c: added g_snprintf, g_sprintf, g_fprintf, g_printf + + * src/glib.h: added macros for above va_args printf functions + + * src/Makefile.am: added gmisc.c + + * test/whats-implemented: script to see what needs to be implemented + +2006-08-20 Chris Toshok <toshok@ximian.com> + + * test/array.c (test_array_big): add a test from the glib + documentation. + +2006-08-20 Chris Toshok <toshok@ximian.com> + + * test/tests.h: add array tests to the mix. + + * test/array.c: a few array tests. + + * src/glib.h: add array prototypes. + + * src/garray.c: initial array foo. + + * test/Makefile.am (SOURCES): add array.c + + * src/Makefile.am (libeglib_la_SOURCES): add garray.c + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * src/gstring.c: optimize and generalize reallocation by providing + a GROW_IF_NECESSARY macro, do not use strcpy/strcat as they are + very, very slow; GString is now much closer to GLib's implementation + in terms of performance + + * test/string.c: added speed-specific tests to beat on reallocation code + + * test/test-both: run make if the test drivers don't exist + +2006-08-19 Jonathan Chambers <jonathan.chambers@gmail.com> + + * src/gmodule.c: Add gmodule support for windows and fix + windows build. Contribution is licensed as MIT/X11. + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/driver.c: Added --debug mode that allows for testing all paths + of the driver without actually running real tests; runs only the 'fake' + test, which does nothing; useful for running the driver through valgrind + + * test/Makefile.am: + * test/tests.h: + * test/fake.c: Added fake test for valgrinding the driver + + * test/ptrarray.c: update sort test + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test-both: added --help + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/driver.c: added -n mode to show only raw global run times, + which is useful for scripts (test-both --speed-compare) + + * test/test-both: added --speed-compare mode + + * test/README: updated with information on --speed-compare + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test.c: do not print times if -t is not passed + + * test/driver.c: removed use of GList from the driver to avoid skews due + to performance differences between GLib and EGLib + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/test.c: Perform iterations at the test level, only output one + report for all iterations of tests in a group to produce more usable + output; add timing for the tests and group; added get_timestamp for + easy code timing + + * test/test.h: Removed run_test as it should only be called from + run_group, added get_timestamp + + * test/Makefile.am: Added -DDRIVER_NAME + + * test/test-both: simple script to run both drivers with the same options + + * test/driver.c: Iterations are now run at the test level, show a global + status (OK/FAIL) indicator + + * test/README: Updated + + * configure.ac: Renamed from configure.in as configure.in naming + convention is deprecated in favor of configure.ac + + * autogen.sh: s/configure.in/configure.ac/ + +2006-08-19 Miguel de Icaza <miguel@novell.com> + + * Makefile.am: Removed MAINTAINERCLEANFILES that was too + aggresive, it failed make distcheck and the resulting tarball was + not buildable. + + * src/glib.h: remove the various GPOINTER_TO_*, G*_TO_POINTER, + GSIZE_FORMAT macros, and move them into src/eglib-config.h + + Moved also gssize and gsize to be arch specific. This should fix + the 32/64 problems that Jon Chambers reported. + + * configure.in: test for pointer size, define the various values + depending on 32 vs 32/64 worlds, might need further porting in the + future. + + Change package name to eglib + + * test/slist.c, test/list.c, test/hashtable.c: Update tests to use + FAILURE macro. + + * test/string-util.c: fix leak for valgrind tests. + + * test/tests.h: New size test, for testing datatypes. + + * test/sizes.c: New tests. + +2006-08-19 Aaron Bockover <abockover@novell.com> + + * test/README: Added quick guide on adding new tests/groups to the + driver and some examples on how to perform various tests with the driver + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/driver.c: Added getopt support and code timing, among other + nice features to make testing/profiling easier + + * test/test.c: Add support for suppressing output (quiet) and + define RESULT, FAILED, and OK + + * src/glib.h: + * src/glist.c: Added g_list_nth_data implementation + + * test/slist.c: + * test/string-util.c: + * test/ptrarray.c: + * test/string.c: + * test/hashtable.c: + * test/list.c: Use RESULT, FAILURE, and OK for tests + +2006-08-18 Miguel de Icaza <miguel@novell.com> + + * src/gstring.c (g_string_truncate): Implement truncate. + (g_string_prepend): implement. + + Fix various bugs uncovered by new tests. + + * src/glib.h: introduce gssize type, the signed one. Important. + + * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32 + defines that we can use to check on the host OS. + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/test.[ch]: + * test/driver.c: Support pass/fail logging on tests to show group report + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * test/test.c: + * test/test.h: Added result() to be used in place of g_strdup_printf(), + it's shorter to write and allows the duped string to be freed safely; + added license header to file + + * test/driver.c: Added license header to file + + * test/string-util.c: + * test/ptrarray.c: + * test/string.c: + * test/list.c: Use result() in place of g_strdup_printf(), it's nicer + +2006-08-18 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Implemented g_ptr_array_sort + + * test/ptrarray.c: Added sort test + + * test/driver.c: Added --help; support running N iterations and allow + selecting which test groups to run; uses the test group table in tests.h + + * test/tests.h: Added group table + + * test/test.h: + * test/test.c: Using a Group structure and table, removed run_groups + as we only need run_group now + + * test/slist.h: Removed, not needed, tests/groups defined in tests.h + +2006-08-18 Miguel de Icaza <miguel@novell.com> + + * src/unicode.c: New file, to host unicode code, it will throw as + this code is no longer used in the Mono runtime anyways. + + * src/glib.h: Use stdint.h types, a lot of the good stuff is + replicated by glib. + +2006-08-18 Duncan Mak <duncan@a-chinaman.com> + + * src/glist.c (g_list_remove, g_list_remove_link): Implemented. + + * src/gslist.c (g_slist_remove): Remember to set the next pointer + to NULL when the item to remove is the first item in the list. + +2006-08-18 Duncan Mak <duncan@a-chinaman.com> + + * src/glist.c: Implemented. Missing remove, + remove_link and insert_before. + + * test/list.c: Tests for GList. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Implemented g_ptr_array_remove and + g_ptr_array_remove_index + + * test/other: Removed, rewritten in Makefile.am + + * test/Makefile.am: Build test-eglib against local eglib and + test-glib against GLib 2.0 (replaces 'other') + + * test/ptrarray.c: Added tests for g_ptr_array_remove and + g_ptr_array_remove_index + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c: Added MIT license. + (g_slist_insert_sorted): Forgot the case where the data is + appended to the end of the list. + + * test/slist.c (test_slist_insert_sorted): Fix the test. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Added g_ptr_array_set_size implementation + + * test/ptrarray.c: Added test for g_ptr_array_set_size + +2006-08-17 Miguel de Icaza <miguel@novell.com> + + * src/glib.h: A handful of extra macros + + * configure.in, src/eglib-config.h.in: Set some system-specific + settings that are probed at configure time. + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * src/gptrarray.c: Added beginnings of GPtrArray (alloc, free, add, iterate) + + * src/glib.h: Added GPtrArray signatures + + * src/Makefile.am: Added gptrarray.c to build + + * test/ptrarray.c: + * test/tests.h: + * test/driver.c: + * test/Makefile.am: Add ptrarray tests for available functionality + +2006-08-17 Aaron Bockover <abockover@novell.com> + + * test/test.h: + * test/test.c: Added group iterator/test driver functionality + + * test/driver.c: Added groups to run using new test functionality + + * test/slist.h: + * test/hashtable.h: + * test/string-util.h: Test group definitions for string util/hashtable + + * test/slist.c: + * test/str.c: + * test/hash.c: Added test definition table + + * test/Makefile.am: Added -Wall -Werror -D_FORTIFY_SOURCE=2 + + * src/gstr.c: Added implementation for g_str_has_prefix, g_str_has_suffix + + * src/glib.h: Added missing function signatures + + * src/Makefile.am: added -D_FORTIFY_SOURCE=2 + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c (g_slist_remove_link): I misread the function + signature. Re-implemented. + (g_slist_delete_link): Implemented. + (g_slist_reverse): Implemented. + (g_slist_insert_sorted): Implemented. + +2006-08-17 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c (g_slist_find): + (g_slist_length): + (g_slist_remove): + (g_slist_remove_link): Implemented. + + * test/slist.c: Tests for GSList. + +2006-08-17 Raja R Harinath <harinath@gmail.com> + + * src/gslist.c (g_slist_free_1): New. Free a single list node. + (g_slist_free): Use it to free the list nodes. Don't free the + data, since the list doesn't own it. + (g_slist_append): Convert into a one-liner. + (g_slist_foreach): Remove redundant null check. + (g_slist_last): Actually return the last node. + (g_slist_copy): Simplify. + * src/gslist.h (g_slist_free_1): Add. + +2006-08-16 Duncan Mak <duncan@a-chinaman.com> + + * src/gslist.c: + + * src/gslist.h: First attempt at implementing GSList, incomplete. + + * src/Makefile.am (libeglib_la_SOURCES): add gslist.c + * src/glib.h: Add GFunc definition. #include the new gslist.h. + +2006-08-16 Miguel de Icaza <miguel@novell.com> + + * src/Makefile.am: Added -Wall,-Werror, corrected lots of + mistakes. + + * src/gstring.c: Gstring implementation. + + * test/str.c (test_gstring): string tests. + +2006-08-16 Aaron Bockover <abockover@novell.com> + + * src/gstr.c: Added g_strsplit implementation + + * test/driver.c: Run the split test + + * test/str.c: Added a test for g_strsplit + + * Makefile.am: + * src/Makefile.am: + * test/Makefile.am: Added MAINTAINERCLEANFILES + +2006-08-16 Miguel de Icaza <miguel@novell.com> + + * src/gouput.c: Implement some output routines, update missing + progress. + + * test: Add test driver, and initial tests. + +2006-08-15 Miguel de Icaza <miguel@novell.com> + + * src/ghashtable.c: Implement most of this, it is completely + untested at this point. + + + diff --git a/eglib/INSTALL b/eglib/INSTALL new file mode 100644 index 0000000000..d3c5b40a94 --- /dev/null +++ b/eglib/INSTALL @@ -0,0 +1,237 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/eglib/Makefile.am b/eglib/Makefile.am new file mode 100644 index 0000000000..b33e244c3c --- /dev/null +++ b/eglib/Makefile.am @@ -0,0 +1,12 @@ +if HOST_WIN32 +SUBDIRS = src +else +if CROSS_COMPILING +SUBDIRS = src +else +SUBDIRS = src test +endif +endif + +EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog + diff --git a/eglib/Makefile.in b/eglib/Makefile.in new file mode 100644 index 0000000000..2ec9f0f725 --- /dev/null +++ b/eglib/Makefile.in @@ -0,0 +1,664 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/../config.guess \ + $(srcdir)/../config.sub $(srcdir)/../install-sh \ + $(srcdir)/../ltmain.sh $(srcdir)/../missing \ + $(srcdir)/../mkinstalldirs $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = src test +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BREAKPOINT = @BREAKPOINT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GINT_TO_POINTER = @GINT_TO_POINTER@ +GNUC_NORETURN = @GNUC_NORETURN@ +GNUC_PRETTY = @GNUC_PRETTY@ +GNUC_UNUSED = @GNUC_UNUSED@ +GPOINTER_TO_INT = @GPOINTER_TO_INT@ +GPOINTER_TO_UINT = @GPOINTER_TO_UINT@ +GREP = @GREP@ +GSIZE = @GSIZE@ +GSIZE_FORMAT = @GSIZE_FORMAT@ +GUINT_TO_POINTER = @GUINT_TO_POINTER@ +G_GINT64_FORMAT = @G_GINT64_FORMAT@ +G_GUINT64_FORMAT = @G_GUINT64_FORMAT@ +G_HAVE_ISO_VARARGS = @G_HAVE_ISO_VARARGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORDER = @ORDER@ +OS = @OS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATHSEP = @PATHSEP@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SEARCHSEP = @SEARCHSEP@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@CROSS_COMPILING_FALSE@@HOST_WIN32_FALSE@SUBDIRS = src test +@CROSS_COMPILING_TRUE@@HOST_WIN32_FALSE@SUBDIRS = src +@HOST_WIN32_TRUE@SUBDIRS = src +EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/eglib/NEWS b/eglib/NEWS new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/eglib/NEWS diff --git a/eglib/README b/eglib/README new file mode 100644 index 0000000000..eea89f520a --- /dev/null +++ b/eglib/README @@ -0,0 +1,54 @@ + +The purpose of eglib is to be an X11-licensed subset of glib that can +be used with Mono when the Mono runtime is explicitly relicensed under +a different license by Novell. + +The implementation is done from the public documentation available here: + + http://developer.gnome.org/doc/API/2.0/glib/ + +Currently this is only being built standalone, use: + + ./autogen.sh --prefix=/tmp/test + +Currently all the definitions go into a single file: glib.h, there are +no separate files, please try to follow the convetions in the source code + +* Tests + + Please read the README in tests/ + +* Features + + The source code is designed to allow for different operating + system builds of the eglib code. + + Files in src that: + + * Have a plain name: are cross platform, and should work on + every operating system. + + * That end in -unix.c: These files contain Unix specific code. + + * That end in -win32.c: These files contain Win32 specific code. + + * That end in -posix.c: Will work on both Windows and Unix, + but should not be included for other operating systems. + +* Plans: short and long term. + + The short term plans for eglib is to allow Mono to optionally + build with it instead of using glib, gmodule and gthread, but + the default build will continue to be done against glib 2.0. + + In the long-term we are considering dropping glib as a + dependency, considering that Mono requires a modern Unix + system to run anyways (for its thread support) it would allow + us to fix some of the glib API limitations we have to live + with (explicit thread support for example), rework the API to + use types from stdint.h and we would be able to drop three + external shared libraries. + + This would reduce memory usage for the handful of routines + that we use from glib, dynamic linker overhead for those and + would allow us to tune the implementation to Mono's needs. diff --git a/eglib/TODO b/eglib/TODO new file mode 100644 index 0000000000..bbbb49bbba --- /dev/null +++ b/eglib/TODO @@ -0,0 +1,33 @@ +* Missing code + + * Process launching + 3 g_shell_quote + 1 g_shell_unquote + +---------------------------------------------------------------------- + +* Should implement, for better performance: + +Macros: + 6 G_UNLIKELY + 4 G_LIKELY + +* Unimplemented, not supported currently: + + (none as yet.) + +* Dead Code + + The GMainLoop code was no longer in use in Mono. + +* Windows implementations needed + + Directory, File manipulation: + + g_dir_open, g_dir_close, g_dir_read_name + + We're missing a native windows implementation. The unix one is in place. + + * Information retrieval + 1 g_win32_getlocale + diff --git a/eglib/aclocal.m4 b/eglib/aclocal.m4 new file mode 100644 index 0000000000..113994ab28 --- /dev/null +++ b/eglib/aclocal.m4 @@ -0,0 +1,8855 @@ +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.63],, +[m4_warning([this file was generated for autoconf 2.63. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to <bug-libtool@gnu.org>." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$lt_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +_LT_PATH_LD_GNU +AC_SUBST([LD]) + +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD + +# Old names: +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_LD], []) +dnl AC_DEFUN([AC_PROG_LD], []) + + +# _LT_PATH_LD_GNU +#- -------------- +m4_defun([_LT_PATH_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac]) +with_gnu_ld=$lt_cv_prog_gnu_ld +])# _LT_PATH_LD_GNU + + +# _LT_CMD_RELOAD +# -------------- +# find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +m4_defun([_LT_CMD_RELOAD], +[AC_CACHE_CHECK([for $LD option to reload object files], + lt_cv_ld_reload_flag, + [lt_cv_ld_reload_flag='-r']) +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac +_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_DECL([], [reload_cmds], [2])dnl +])# _LT_CMD_RELOAD + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 13 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/eglib/autogen.sh b/eglib/autogen.sh new file mode 100755 index 0000000000..ce2acf6856 --- /dev/null +++ b/eglib/autogen.sh @@ -0,0 +1,136 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +# Ripped off from GNOME macros version + +DIE=0 + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +if [ -n "$MONO_PATH" ]; then + # from -> /mono/lib:/another/mono/lib + # to -> /mono /another/mono + for i in `echo ${MONO_PATH} | tr ":" " "`; do + i=`dirname ${i}` + if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then + ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" + fi + if [ -n "{i}" -a -d "${i}/bin" ]; then + PATH="${i}/bin:$PATH" + fi + done + export PATH +fi + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to compile Mono." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if [ -z "$LIBTOOL" ]; then + LIBTOOL=`which glibtool 2>/dev/null` + if [ ! -x "$LIBTOOL" ]; then + LIBTOOL=`which libtool` + fi +fi + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed to compile Mono." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test x$NOCONFIGURE = x && test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + + +if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + ${LIBTOOL}ize --force --copy + fi +fi + +echo "Running aclocal $ACLOCAL_FLAGS ..." +aclocal $ACLOCAL_FLAGS || { + echo + echo "**Error**: aclocal failed. This may mean that you have not" + echo "installed all of the packages you need, or you may need to" + echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" + echo "for the prefix where you installed the packages whose" + echo "macros were not found" + exit 1 +} + +if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader || { echo "**Error**: autoheader failed."; exit 1; } +fi + +echo "Running automake --gnu $am_opt ..." +automake --add-missing --gnu $am_opt || + { echo "**Error**: automake failed."; exit 1; } +echo "Running autoconf ..." +autoconf || { echo "**Error**: autoconf failed."; exit 1; } + + +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME || exit 1 +else + echo Skipping configure process. +fi diff --git a/eglib/config.h.in b/eglib/config.h.in new file mode 100644 index 0000000000..1cd57fb706 --- /dev/null +++ b/eglib/config.h.in @@ -0,0 +1,116 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the <getopt.h> header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getpwuid_r' function. */ +#undef HAVE_GETPWUID_R + +/* Define to 1 if you have the <iconv.h> header file. */ +#undef HAVE_ICONV_H + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the <langinfo.h> header file. */ +#undef HAVE_LANGINFO_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H + +/* Define to 1 if you have the `rewinddir' function. */ +#undef HAVE_REWINDDIR + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strndup' function. */ +#undef HAVE_STRNDUP + +/* Define to 1 if you have the `strtok_r' function. */ +#undef HAVE_STRTOK_R + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <sys/wait.h> header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vasprintf' function. */ +#undef HAVE_VASPRINTF + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif diff --git a/eglib/configure b/eglib/configure new file mode 100755 index 0000000000..1f45ba500d --- /dev/null +++ b/eglib/configure @@ -0,0 +1,15591 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +exec 7<&0 </dev/null 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="README" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +G_GINT64_FORMAT +G_GUINT64_FORMAT +GSIZE_FORMAT +GSIZE +GUINT_TO_POINTER +GINT_TO_POINTER +GPOINTER_TO_UINT +GPOINTER_TO_INT +HAVE_GLIB_FALSE +HAVE_GLIB_TRUE +PKG_CONFIG +G_HAVE_ISO_VARARGS +NEED_VASPRINTF_FALSE +NEED_VASPRINTF_TRUE +TARGET_WIN32_FALSE +TARGET_WIN32_TRUE +HOST_WIN32_FALSE +HOST_WIN32_TRUE +OS +SEARCHSEP +PATHSEP +ORDER +CROSS_COMPILING_FALSE +CROSS_COMPILING_TRUE +BREAKPOINT +GNUC_NORETURN +GNUC_UNUSED +GNUC_PRETTY +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_crosspkgdir +enable_quiet_build +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-quiet-build Enable quiet runtime build (on by default) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +ac_config_headers="$ac_config_headers config.h" + +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +$as_echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=eglib + VERSION=0.3 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6' +macro_revision='1.3012' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:4412: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4415: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4418: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5624 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7477: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7481: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7816: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7820: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7921: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7925: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7976: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7980: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10776 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10872 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE" +GNUC_PRETTY= +GNUC_UNUSED= +BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END" +if test x$GCC = xyes; then + GNUC_UNUSED='__attribute__((__unused__))' + GNUC_NORETURN='__attribute__((__noreturn__))' + echo target_cpu=$target_cpu + case $target_cpu in + i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;; + esac +fi + + + + + +# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono +# configure, because of autoconf brokeness +if test "x$CPPFLAGS_FOR_EGLIB" != "x"; then + CPPFLAGS=$CPPFLAGS_FOR_EGLIB +fi +if test "x$CFLAGS_FOR_EGLIB" != "x"; then + CFLAGS=$CFLAGS_FOR_EGLIB +fi + + if test x$cross_compiling = xyes; then + CROSS_COMPILING_TRUE= + CROSS_COMPILING_FALSE='#' +else + CROSS_COMPILING_TRUE='#' + CROSS_COMPILING_FALSE= +fi + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + ORDER=G_BIG_ENDIAN;; #( + no) + ORDER=G_LITTLE_ENDIAN ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + +case $host in +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) + PATHSEP='\\' + SEARCHSEP=';' + OS="WIN32" + ;; +*) + PATHSEP='/' + SEARCHSEP=':' + OS="UNIX" + ;; +esac + +case $host in + *-*-solaris*) + CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" + ;; +esac + +case $target in +arm*-darwin*) + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE" + ;; +i*86-*-darwin*) + ORDER=G_LITTLE_ENDIAN + ;; +*-*-openbsd*) + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + ;; +esac + + + + + + + if test x$OS = xWIN32; then + HOST_WIN32_TRUE= + HOST_WIN32_FALSE='#' +else + HOST_WIN32_TRUE='#' + HOST_WIN32_FALSE= +fi + + if test x$OS = xWIN32; then + TARGET_WIN32_TRUE= + TARGET_WIN32_FALSE='#' +else + TARGET_WIN32_TRUE='#' + TARGET_WIN32_FALSE= +fi + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_int=$ac_lo;; +'') if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_int=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (void *))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_void_p=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + + + + + + + +for ac_func in strndup strlcpy getpwuid_r strtok_r rewinddir vasprintf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + if test x$have_vasprintf = x ; then + NEED_VASPRINTF_TRUE= + NEED_VASPRINTF_FALSE='#' +else + NEED_VASPRINTF_TRUE='#' + NEED_VASPRINTF_FALSE= +fi + +{ $as_echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5 +$as_echo_n "checking for iconv_open in -liconv... " >&6; } +if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char iconv_open (); +int +main () +{ +return iconv_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_iconv_iconv_open=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_iconv_open=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv_open" >&5 +$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; } +if test "x$ac_cv_lib_iconv_iconv_open" = x""yes; then + LIBS="$LIBS -liconv" +fi + +{ $as_echo "$as_me:$LINENO: checking for libiconv_open in -liconv" >&5 +$as_echo_n "checking for libiconv_open in -liconv... " >&6; } +if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char libiconv_open (); +int +main () +{ +return libiconv_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_iconv_libiconv_open=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_iconv_libiconv_open=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv_open" >&5 +$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; } +if test "x$ac_cv_lib_iconv_libiconv_open" = x""yes; then + LIBS="$LIBS -liconv" +fi + +{ $as_echo "$as_me:$LINENO: checking for library containing sqrtf" >&5 +$as_echo_n "checking for library containing sqrtf... " >&6; } +if test "${ac_cv_search_sqrtf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrtf (); +int +main () +{ +return sqrtf (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_sqrtf=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_sqrtf+set}" = set; then + break +fi +done +if test "${ac_cv_search_sqrtf+set}" = set; then + : +else + ac_cv_search_sqrtf=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sqrtf" >&5 +$as_echo "$ac_cv_search_sqrtf" >&6; } +ac_res=$ac_cv_search_sqrtf +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +# nanosleep may not be part of libc, also search it in other libraries +{ $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 +$as_echo_n "checking for library containing nanosleep... " >&6; } +if test "${ac_cv_search_nanosleep+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_nanosleep=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_nanosleep+set}" = set; then + break +fi +done +if test "${ac_cv_search_nanosleep+set}" = set; then + : +else + ac_cv_search_nanosleep=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 +$as_echo "$ac_cv_search_nanosleep" >&6; } +ac_res=$ac_cv_search_nanosleep +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_dlopen=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_dlopen+set}" = set; then + break +fi +done +if test "${ac_cv_search_dlopen+set}" = set; then + : +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +old_ldflags="${LDFLAGS}" +LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + found_export_dynamic=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + found_export_dynamic=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test $found_export_dynamic = no; then + LDFLAGS="${old_ldflags}" +fi + +{ $as_echo "$as_me:$LINENO: checking for varargs macros" >&5 +$as_echo_n "checking for varargs macros... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + +int foo (int i, int j); +#define bar(...) foo (1, __VA_ARGS__) +void main () { + bar (2); +} + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + have_iso_varargs=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + have_iso_varargs=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $have_iso_varargs" >&5 +$as_echo "$have_iso_varargs" >&6; } +G_HAVE_ISO_VARARGS=0 +if test "x$have_iso_varargs" = "xyes"; then + G_HAVE_ISO_VARARGS=1 +fi + + + + + + + + +for ac_header in getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then + GPOINTER_TO_INT="((gint)(long) (ptr))" + GPOINTER_TO_UINT="((guint)(long) (ptr))" + GINT_TO_POINTER="((gpointer)(glong) (v))" + GUINT_TO_POINTER="((gpointer)(gulong) (v))" + GSIZE="long" + GSIZE_FORMAT='"lu"' + G_GUINT64_FORMAT='"lu"' + G_GINT64_FORMAT='"ld"' +else + GPOINTER_TO_INT="((gint) (ptr))" + GPOINTER_TO_UINT="((guint) (ptr))" + GINT_TO_POINTER="((gpointer) (v))" + GUINT_TO_POINTER="((gpointer) (v))" + GSIZE="int" + GSIZE_FORMAT='"u"' + G_GUINT64_FORMAT='"llu"' + G_GINT64_FORMAT='"lld"' +fi + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +pkg_config_path= + +# Check whether --with-crosspkgdir was given. +if test "${with_crosspkgdir+set}" = set; then + withval=$with_crosspkgdir; if test x$with_crosspkgdir = "x"; then + if test -s $PKG_CONFIG_PATH; then + pkg_config_path=$PKG_CONFIG_PATH + fi + else + pkg_config_path=$with_crosspkgdir + PKG_CONFIG_PATH=$pkg_config_path + export PKG_CONFIG_PATH + fi + +fi + + +have_glib=false +if test "x$PKG_CONFIG" != "xno"; then + if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then + have_glib=true; + else + have_glib=false; + fi +fi + if $have_glib; then + HAVE_GLIB_TRUE= + HAVE_GLIB_FALSE='#' +else + HAVE_GLIB_TRUE='#' + HAVE_GLIB_FALSE= +fi + + +# Check whether --enable-quiet-build was given. +if test "${enable_quiet_build+set}" = set; then + enableval=$enable_quiet_build; enable_quiet_build=$enableval +else + enable_quiet_build=yes +fi + + + + + + + + + + +if test x$enable_quiet_build = xyes; then + ac_config_commands="$ac_config_commands quiet" + + ac_config_commands="$ac_config_commands quiet-libtool" + +fi + +ac_config_files="$ac_config_files Makefile src/Makefile src/eglib-config.h test/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +if test -z "${HOST_WIN32_TRUE}" && test -z "${HOST_WIN32_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HOST_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HOST_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${TARGET_WIN32_TRUE}" && test -z "${TARGET_WIN32_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"TARGET_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"TARGET_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${NEED_VASPRINTF_TRUE}" && test -z "${NEED_VASPRINTF_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"NEED_VASPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"NEED_VASPRINTF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_GLIB_TRUE}" && test -z "${HAVE_GLIB_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_GLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HAVE_GLIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to <bug-autoconf@gnu.org>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + +shell=$SHELL + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "quiet") CONFIG_COMMANDS="$CONFIG_COMMANDS quiet" ;; + "quiet-libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS quiet-libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/eglib-config.h") CONFIG_FILES="$CONFIG_FILES src/eglib-config.h" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr='
' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "quiet":C) for i in `find src test -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/../scripts/patch-quiet.sh $i; fi; done ;; + "quiet-libtool":C) sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/eglib/configure.ac b/eglib/configure.ac new file mode 100644 index 0000000000..51e448d89a --- /dev/null +++ b/eglib/configure.ac @@ -0,0 +1,183 @@ +AC_INIT(README) +AC_CANONICAL_SYSTEM + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(eglib,0.3) +AM_MAINTAINER_MODE + +AC_PROG_CC +AM_PROG_LIBTOOL +CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE" +GNUC_PRETTY= +GNUC_UNUSED= +BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END" +if test x$GCC = xyes; then + GNUC_UNUSED='__attribute__((__unused__))' + GNUC_NORETURN='__attribute__((__noreturn__))' + echo target_cpu=$target_cpu + case $target_cpu in + i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;; + esac +fi +AC_SUBST(GNUC_PRETTY) +AC_SUBST(GNUC_UNUSED) +AC_SUBST(GNUC_NORETURN) +AC_SUBST(BREAKPOINT) + +# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono +# configure, because of autoconf brokeness +if test "x$CPPFLAGS_FOR_EGLIB" != "x"; then + CPPFLAGS=$CPPFLAGS_FOR_EGLIB +fi +if test "x$CFLAGS_FOR_EGLIB" != "x"; then + CFLAGS=$CFLAGS_FOR_EGLIB +fi + +AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes]) +AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN]) + +case $host in +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) + PATHSEP='\\' + SEARCHSEP=';' + OS="WIN32" + ;; +*) + PATHSEP='/' + SEARCHSEP=':' + OS="UNIX" + ;; +esac + +case $host in + *-*-solaris*) + CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" + ;; +esac + +case $target in +arm*-darwin*) + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE" + ;; +i*86-*-darwin*) + ORDER=G_LITTLE_ENDIAN + ;; +*-*-openbsd*) + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + ;; +esac + +AC_SUBST(ORDER) +AC_SUBST(CFLAGS) +AC_SUBST(PATHSEP) +AC_SUBST(SEARCHSEP) +AC_SUBST(OS) +AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32) +AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32) + +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(void *) +AC_CHECK_FUNCS(strndup strlcpy getpwuid_r strtok_r rewinddir vasprintf) +AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x ) +AC_CHECK_LIB(iconv, iconv_open, LIBS="$LIBS -liconv") +AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv") +AC_SEARCH_LIBS(sqrtf, m) + +# nanosleep may not be part of libc, also search it in other libraries +AC_SEARCH_LIBS(nanosleep, rt) + +AC_SEARCH_LIBS(dlopen, dl) +old_ldflags="${LDFLAGS}" +LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" +AC_TRY_LINK(, [int i;], found_export_dynamic=yes, found_export_dynamic=no) +if test $found_export_dynamic = no; then + LDFLAGS="${old_ldflags}" +fi + +AC_MSG_CHECKING(for varargs macros) +AC_TRY_COMPILE([],[ +int foo (int i, int j); +#define bar(...) foo (1, __VA_ARGS__) +void main () { + bar (2); +} +],have_iso_varargs=yes,have_iso_varargs=no) +AC_MSG_RESULT($have_iso_varargs) +G_HAVE_ISO_VARARGS=0 +if test "x$have_iso_varargs" = "xyes"; then + G_HAVE_ISO_VARARGS=1 +fi +AC_SUBST(G_HAVE_ISO_VARARGS) + +AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h) + +if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then + GPOINTER_TO_INT="((gint)(long) (ptr))" + GPOINTER_TO_UINT="((guint)(long) (ptr))" + GINT_TO_POINTER="((gpointer)(glong) (v))" + GUINT_TO_POINTER="((gpointer)(gulong) (v))" + GSIZE="long" + GSIZE_FORMAT='"lu"' + G_GUINT64_FORMAT='"lu"' + G_GINT64_FORMAT='"ld"' +else + GPOINTER_TO_INT="((gint) (ptr))" + GPOINTER_TO_UINT="((guint) (ptr))" + GINT_TO_POINTER="((gpointer) (v))" + GUINT_TO_POINTER="((gpointer) (v))" + GSIZE="int" + GSIZE_FORMAT='"u"' + G_GUINT64_FORMAT='"llu"' + G_GINT64_FORMAT='"lld"' +fi + +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + +pkg_config_path= +AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir], + if test x$with_crosspkgdir = "x"; then + if test -s $PKG_CONFIG_PATH; then + pkg_config_path=$PKG_CONFIG_PATH + fi + else + pkg_config_path=$with_crosspkgdir + PKG_CONFIG_PATH=$pkg_config_path + export PKG_CONFIG_PATH + fi +) + +dnl +dnl No, you can not replace the call below with a pkg.m4 macro +dnl +have_glib=false +if test "x$PKG_CONFIG" != "xno"; then + if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then + have_glib=true; + else + have_glib=false; + fi +fi +AM_CONDITIONAL(HAVE_GLIB, $have_glib) + +AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet runtime build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes) +AC_SUBST(GPOINTER_TO_INT) +AC_SUBST(GPOINTER_TO_UINT) +AC_SUBST(GINT_TO_POINTER) +AC_SUBST(GUINT_TO_POINTER) +AC_SUBST(GSIZE) +AC_SUBST(GSIZE_FORMAT) +AC_SUBST(G_GUINT64_FORMAT) +AC_SUBST(G_GINT64_FORMAT) + +if test x$enable_quiet_build = xyes; then + AC_CONFIG_COMMANDS([quiet], [for i in `find src test -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/../scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL]) + AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool]) +fi + +AC_OUTPUT([ +Makefile +src/Makefile +src/eglib-config.h +test/Makefile +]) diff --git a/eglib/src/Makefile.am b/eglib/src/Makefile.am new file mode 100644 index 0000000000..1251d04c3c --- /dev/null +++ b/eglib/src/Makefile.am @@ -0,0 +1,70 @@ +noinst_LTLIBRARIES = libeglib.la libeglib-static.la + +win_files = \ + gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \ + gmodule-win32.c gtimer-win32.c + +unix_files = \ + gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \ + gmodule-unix.c gtimer-unix.c + +# some unices and windows do not have an implementation of vasprintf +# used by eglib, use provided implementation instead +if NEED_VASPRINTF +vasprintf_files = vasprintf.c +else +vaprinttf_files = foo.c +endif + +if HOST_WIN32 +os_files = $(win_files) +else +os_files = $(unix_files) +endif + +libeglib_la_SOURCES = \ + eglib-config.h \ + eglib-remap.h \ + sort.frag.h \ + glib.h \ + garray.c \ + gerror.c \ + ghashtable.c \ + gmem.c \ + gmodule.h \ + goutput.c \ + gstr.c \ + gslist.c \ + gstring.c \ + gptrarray.c \ + glist.c \ + gqueue.c \ + gpath.c \ + gshell.c \ + gspawn.c \ + gfile.c \ + gfile-posix.c \ + gpattern.c \ + gmarkup.c \ + gutf8.c \ + gunicode.c \ + unicode-data.h \ + $(os_files) \ + $(vasprintf_files) + +libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2 +libeglib_static_la_SOURCES=$(libeglib_la_SOURCES) +libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS) + +INCLUDES = -I$(srcdir) + +if HOST_WIN32 +libeglib_la_LIBADD = -lm -liconv -lpsapi +endif + +libeglib_static_la_LIBADD = $(libeglib_la_LIBADD) +libeglib_static_la_LDFLAGS = -static + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files) diff --git a/eglib/src/Makefile.in b/eglib/src/Makefile.in new file mode 100644 index 0000000000..edbd916456 --- /dev/null +++ b/eglib/src/Makefile.in @@ -0,0 +1,1120 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/eglib-config.h.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = eglib-config.h +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +libeglib_static_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libeglib_static_la_SOURCES_DIST = eglib-config.h eglib-remap.h \ + sort.frag.h glib.h garray.c gerror.c ghashtable.c gmem.c \ + gmodule.h goutput.c gstr.c gslist.c gstring.c gptrarray.c \ + glist.c gqueue.c gpath.c gshell.c gspawn.c gfile.c \ + gfile-posix.c gpattern.c gmarkup.c gutf8.c gunicode.c \ + unicode-data.h gdate-unix.c gdir-unix.c gfile-unix.c \ + gmisc-unix.c gmodule-unix.c gtimer-unix.c gdate-win32.c \ + gdir-win32.c gfile-win32.c gmisc-win32.c gmodule-win32.c \ + gtimer-win32.c vasprintf.c +am__objects_1 = libeglib_static_la-gdate-unix.lo \ + libeglib_static_la-gdir-unix.lo \ + libeglib_static_la-gfile-unix.lo \ + libeglib_static_la-gmisc-unix.lo \ + libeglib_static_la-gmodule-unix.lo \ + libeglib_static_la-gtimer-unix.lo +am__objects_2 = libeglib_static_la-gdate-win32.lo \ + libeglib_static_la-gdir-win32.lo \ + libeglib_static_la-gfile-win32.lo \ + libeglib_static_la-gmisc-win32.lo \ + libeglib_static_la-gmodule-win32.lo \ + libeglib_static_la-gtimer-win32.lo +@HOST_WIN32_FALSE@am__objects_3 = $(am__objects_1) +@HOST_WIN32_TRUE@am__objects_3 = $(am__objects_2) +@NEED_VASPRINTF_TRUE@am__objects_4 = libeglib_static_la-vasprintf.lo +am__objects_5 = libeglib_static_la-garray.lo \ + libeglib_static_la-gerror.lo libeglib_static_la-ghashtable.lo \ + libeglib_static_la-gmem.lo libeglib_static_la-goutput.lo \ + libeglib_static_la-gstr.lo libeglib_static_la-gslist.lo \ + libeglib_static_la-gstring.lo libeglib_static_la-gptrarray.lo \ + libeglib_static_la-glist.lo libeglib_static_la-gqueue.lo \ + libeglib_static_la-gpath.lo libeglib_static_la-gshell.lo \ + libeglib_static_la-gspawn.lo libeglib_static_la-gfile.lo \ + libeglib_static_la-gfile-posix.lo \ + libeglib_static_la-gpattern.lo libeglib_static_la-gmarkup.lo \ + libeglib_static_la-gutf8.lo libeglib_static_la-gunicode.lo \ + $(am__objects_3) $(am__objects_4) +am_libeglib_static_la_OBJECTS = $(am__objects_5) +libeglib_static_la_OBJECTS = $(am_libeglib_static_la_OBJECTS) +libeglib_static_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libeglib_static_la_CFLAGS) $(CFLAGS) \ + $(libeglib_static_la_LDFLAGS) $(LDFLAGS) -o $@ +libeglib_la_DEPENDENCIES = +am__libeglib_la_SOURCES_DIST = eglib-config.h eglib-remap.h \ + sort.frag.h glib.h garray.c gerror.c ghashtable.c gmem.c \ + gmodule.h goutput.c gstr.c gslist.c gstring.c gptrarray.c \ + glist.c gqueue.c gpath.c gshell.c gspawn.c gfile.c \ + gfile-posix.c gpattern.c gmarkup.c gutf8.c gunicode.c \ + unicode-data.h gdate-unix.c gdir-unix.c gfile-unix.c \ + gmisc-unix.c gmodule-unix.c gtimer-unix.c gdate-win32.c \ + gdir-win32.c gfile-win32.c gmisc-win32.c gmodule-win32.c \ + gtimer-win32.c vasprintf.c +am__objects_6 = libeglib_la-gdate-unix.lo libeglib_la-gdir-unix.lo \ + libeglib_la-gfile-unix.lo libeglib_la-gmisc-unix.lo \ + libeglib_la-gmodule-unix.lo libeglib_la-gtimer-unix.lo +am__objects_7 = libeglib_la-gdate-win32.lo libeglib_la-gdir-win32.lo \ + libeglib_la-gfile-win32.lo libeglib_la-gmisc-win32.lo \ + libeglib_la-gmodule-win32.lo libeglib_la-gtimer-win32.lo +@HOST_WIN32_FALSE@am__objects_8 = $(am__objects_6) +@HOST_WIN32_TRUE@am__objects_8 = $(am__objects_7) +@NEED_VASPRINTF_TRUE@am__objects_9 = libeglib_la-vasprintf.lo +am_libeglib_la_OBJECTS = libeglib_la-garray.lo libeglib_la-gerror.lo \ + libeglib_la-ghashtable.lo libeglib_la-gmem.lo \ + libeglib_la-goutput.lo libeglib_la-gstr.lo \ + libeglib_la-gslist.lo libeglib_la-gstring.lo \ + libeglib_la-gptrarray.lo libeglib_la-glist.lo \ + libeglib_la-gqueue.lo libeglib_la-gpath.lo \ + libeglib_la-gshell.lo libeglib_la-gspawn.lo \ + libeglib_la-gfile.lo libeglib_la-gfile-posix.lo \ + libeglib_la-gpattern.lo libeglib_la-gmarkup.lo \ + libeglib_la-gutf8.lo libeglib_la-gunicode.lo $(am__objects_8) \ + $(am__objects_9) +libeglib_la_OBJECTS = $(am_libeglib_la_OBJECTS) +libeglib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libeglib_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libeglib_static_la_SOURCES) $(libeglib_la_SOURCES) +DIST_SOURCES = $(am__libeglib_static_la_SOURCES_DIST) \ + $(am__libeglib_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BREAKPOINT = @BREAKPOINT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GINT_TO_POINTER = @GINT_TO_POINTER@ +GNUC_NORETURN = @GNUC_NORETURN@ +GNUC_PRETTY = @GNUC_PRETTY@ +GNUC_UNUSED = @GNUC_UNUSED@ +GPOINTER_TO_INT = @GPOINTER_TO_INT@ +GPOINTER_TO_UINT = @GPOINTER_TO_UINT@ +GREP = @GREP@ +GSIZE = @GSIZE@ +GSIZE_FORMAT = @GSIZE_FORMAT@ +GUINT_TO_POINTER = @GUINT_TO_POINTER@ +G_GINT64_FORMAT = @G_GINT64_FORMAT@ +G_GUINT64_FORMAT = @G_GUINT64_FORMAT@ +G_HAVE_ISO_VARARGS = @G_HAVE_ISO_VARARGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORDER = @ORDER@ +OS = @OS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATHSEP = @PATHSEP@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SEARCHSEP = @SEARCHSEP@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libeglib.la libeglib-static.la +win_files = \ + gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \ + gmodule-win32.c gtimer-win32.c + +unix_files = \ + gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \ + gmodule-unix.c gtimer-unix.c + + +# some unices and windows do not have an implementation of vasprintf +# used by eglib, use provided implementation instead +@NEED_VASPRINTF_TRUE@vasprintf_files = vasprintf.c +@NEED_VASPRINTF_FALSE@vaprinttf_files = foo.c +@HOST_WIN32_FALSE@os_files = $(unix_files) +@HOST_WIN32_TRUE@os_files = $(win_files) +libeglib_la_SOURCES = \ + eglib-config.h \ + eglib-remap.h \ + sort.frag.h \ + glib.h \ + garray.c \ + gerror.c \ + ghashtable.c \ + gmem.c \ + gmodule.h \ + goutput.c \ + gstr.c \ + gslist.c \ + gstring.c \ + gptrarray.c \ + glist.c \ + gqueue.c \ + gpath.c \ + gshell.c \ + gspawn.c \ + gfile.c \ + gfile-posix.c \ + gpattern.c \ + gmarkup.c \ + gutf8.c \ + gunicode.c \ + unicode-data.h \ + $(os_files) \ + $(vasprintf_files) + +libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2 +libeglib_static_la_SOURCES = $(libeglib_la_SOURCES) +libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS) +INCLUDES = -I$(srcdir) +@HOST_WIN32_TRUE@libeglib_la_LIBADD = -lm -liconv -lpsapi +libeglib_static_la_LIBADD = $(libeglib_la_LIBADD) +libeglib_static_la_LDFLAGS = -static +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +eglib-config.h: $(top_builddir)/config.status $(srcdir)/eglib-config.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libeglib-static.la: $(libeglib_static_la_OBJECTS) $(libeglib_static_la_DEPENDENCIES) + $(libeglib_static_la_LINK) $(libeglib_static_la_OBJECTS) $(libeglib_static_la_LIBADD) $(LIBS) +libeglib.la: $(libeglib_la_OBJECTS) $(libeglib_la_DEPENDENCIES) + $(libeglib_la_LINK) $(libeglib_la_OBJECTS) $(libeglib_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-garray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gdate-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gdate-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gdir-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gdir-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gfile-posix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gfile-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gfile-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-ghashtable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-glist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmarkup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmisc-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmisc-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmodule-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gmodule-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-goutput.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gpath.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gpattern.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gptrarray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gqueue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gshell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gslist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gspawn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gstring.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gtimer-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gtimer-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gunicode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gutf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-vasprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-garray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gdate-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gdate-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gdir-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gdir-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gfile-posix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gfile-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gfile-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-ghashtable.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-glist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmarkup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmisc-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmisc-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmodule-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gmodule-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-goutput.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gpath.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gpattern.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gptrarray.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gqueue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gshell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gslist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gspawn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gstring.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gtimer-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gtimer-win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gunicode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-gutf8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_static_la-vasprintf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libeglib_static_la-garray.lo: garray.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-garray.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-garray.Tpo -c -o libeglib_static_la-garray.lo `test -f 'garray.c' || echo '$(srcdir)/'`garray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-garray.Tpo $(DEPDIR)/libeglib_static_la-garray.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='garray.c' object='libeglib_static_la-garray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-garray.lo `test -f 'garray.c' || echo '$(srcdir)/'`garray.c + +libeglib_static_la-gerror.lo: gerror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gerror.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gerror.Tpo -c -o libeglib_static_la-gerror.lo `test -f 'gerror.c' || echo '$(srcdir)/'`gerror.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gerror.Tpo $(DEPDIR)/libeglib_static_la-gerror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gerror.c' object='libeglib_static_la-gerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gerror.lo `test -f 'gerror.c' || echo '$(srcdir)/'`gerror.c + +libeglib_static_la-ghashtable.lo: ghashtable.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-ghashtable.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-ghashtable.Tpo -c -o libeglib_static_la-ghashtable.lo `test -f 'ghashtable.c' || echo '$(srcdir)/'`ghashtable.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-ghashtable.Tpo $(DEPDIR)/libeglib_static_la-ghashtable.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ghashtable.c' object='libeglib_static_la-ghashtable.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-ghashtable.lo `test -f 'ghashtable.c' || echo '$(srcdir)/'`ghashtable.c + +libeglib_static_la-gmem.lo: gmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmem.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmem.Tpo -c -o libeglib_static_la-gmem.lo `test -f 'gmem.c' || echo '$(srcdir)/'`gmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmem.Tpo $(DEPDIR)/libeglib_static_la-gmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmem.c' object='libeglib_static_la-gmem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmem.lo `test -f 'gmem.c' || echo '$(srcdir)/'`gmem.c + +libeglib_static_la-goutput.lo: goutput.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-goutput.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-goutput.Tpo -c -o libeglib_static_la-goutput.lo `test -f 'goutput.c' || echo '$(srcdir)/'`goutput.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-goutput.Tpo $(DEPDIR)/libeglib_static_la-goutput.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='goutput.c' object='libeglib_static_la-goutput.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-goutput.lo `test -f 'goutput.c' || echo '$(srcdir)/'`goutput.c + +libeglib_static_la-gstr.lo: gstr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gstr.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gstr.Tpo -c -o libeglib_static_la-gstr.lo `test -f 'gstr.c' || echo '$(srcdir)/'`gstr.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gstr.Tpo $(DEPDIR)/libeglib_static_la-gstr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gstr.c' object='libeglib_static_la-gstr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gstr.lo `test -f 'gstr.c' || echo '$(srcdir)/'`gstr.c + +libeglib_static_la-gslist.lo: gslist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gslist.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gslist.Tpo -c -o libeglib_static_la-gslist.lo `test -f 'gslist.c' || echo '$(srcdir)/'`gslist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gslist.Tpo $(DEPDIR)/libeglib_static_la-gslist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gslist.c' object='libeglib_static_la-gslist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gslist.lo `test -f 'gslist.c' || echo '$(srcdir)/'`gslist.c + +libeglib_static_la-gstring.lo: gstring.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gstring.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gstring.Tpo -c -o libeglib_static_la-gstring.lo `test -f 'gstring.c' || echo '$(srcdir)/'`gstring.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gstring.Tpo $(DEPDIR)/libeglib_static_la-gstring.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gstring.c' object='libeglib_static_la-gstring.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gstring.lo `test -f 'gstring.c' || echo '$(srcdir)/'`gstring.c + +libeglib_static_la-gptrarray.lo: gptrarray.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gptrarray.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gptrarray.Tpo -c -o libeglib_static_la-gptrarray.lo `test -f 'gptrarray.c' || echo '$(srcdir)/'`gptrarray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gptrarray.Tpo $(DEPDIR)/libeglib_static_la-gptrarray.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gptrarray.c' object='libeglib_static_la-gptrarray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gptrarray.lo `test -f 'gptrarray.c' || echo '$(srcdir)/'`gptrarray.c + +libeglib_static_la-glist.lo: glist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-glist.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-glist.Tpo -c -o libeglib_static_la-glist.lo `test -f 'glist.c' || echo '$(srcdir)/'`glist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-glist.Tpo $(DEPDIR)/libeglib_static_la-glist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glist.c' object='libeglib_static_la-glist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-glist.lo `test -f 'glist.c' || echo '$(srcdir)/'`glist.c + +libeglib_static_la-gqueue.lo: gqueue.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gqueue.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gqueue.Tpo -c -o libeglib_static_la-gqueue.lo `test -f 'gqueue.c' || echo '$(srcdir)/'`gqueue.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gqueue.Tpo $(DEPDIR)/libeglib_static_la-gqueue.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gqueue.c' object='libeglib_static_la-gqueue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gqueue.lo `test -f 'gqueue.c' || echo '$(srcdir)/'`gqueue.c + +libeglib_static_la-gpath.lo: gpath.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gpath.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gpath.Tpo -c -o libeglib_static_la-gpath.lo `test -f 'gpath.c' || echo '$(srcdir)/'`gpath.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gpath.Tpo $(DEPDIR)/libeglib_static_la-gpath.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpath.c' object='libeglib_static_la-gpath.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gpath.lo `test -f 'gpath.c' || echo '$(srcdir)/'`gpath.c + +libeglib_static_la-gshell.lo: gshell.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gshell.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gshell.Tpo -c -o libeglib_static_la-gshell.lo `test -f 'gshell.c' || echo '$(srcdir)/'`gshell.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gshell.Tpo $(DEPDIR)/libeglib_static_la-gshell.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gshell.c' object='libeglib_static_la-gshell.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gshell.lo `test -f 'gshell.c' || echo '$(srcdir)/'`gshell.c + +libeglib_static_la-gspawn.lo: gspawn.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gspawn.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gspawn.Tpo -c -o libeglib_static_la-gspawn.lo `test -f 'gspawn.c' || echo '$(srcdir)/'`gspawn.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gspawn.Tpo $(DEPDIR)/libeglib_static_la-gspawn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gspawn.c' object='libeglib_static_la-gspawn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gspawn.lo `test -f 'gspawn.c' || echo '$(srcdir)/'`gspawn.c + +libeglib_static_la-gfile.lo: gfile.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gfile.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gfile.Tpo -c -o libeglib_static_la-gfile.lo `test -f 'gfile.c' || echo '$(srcdir)/'`gfile.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gfile.Tpo $(DEPDIR)/libeglib_static_la-gfile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile.c' object='libeglib_static_la-gfile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gfile.lo `test -f 'gfile.c' || echo '$(srcdir)/'`gfile.c + +libeglib_static_la-gfile-posix.lo: gfile-posix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gfile-posix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gfile-posix.Tpo -c -o libeglib_static_la-gfile-posix.lo `test -f 'gfile-posix.c' || echo '$(srcdir)/'`gfile-posix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gfile-posix.Tpo $(DEPDIR)/libeglib_static_la-gfile-posix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-posix.c' object='libeglib_static_la-gfile-posix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gfile-posix.lo `test -f 'gfile-posix.c' || echo '$(srcdir)/'`gfile-posix.c + +libeglib_static_la-gpattern.lo: gpattern.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gpattern.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gpattern.Tpo -c -o libeglib_static_la-gpattern.lo `test -f 'gpattern.c' || echo '$(srcdir)/'`gpattern.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gpattern.Tpo $(DEPDIR)/libeglib_static_la-gpattern.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpattern.c' object='libeglib_static_la-gpattern.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gpattern.lo `test -f 'gpattern.c' || echo '$(srcdir)/'`gpattern.c + +libeglib_static_la-gmarkup.lo: gmarkup.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmarkup.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmarkup.Tpo -c -o libeglib_static_la-gmarkup.lo `test -f 'gmarkup.c' || echo '$(srcdir)/'`gmarkup.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmarkup.Tpo $(DEPDIR)/libeglib_static_la-gmarkup.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmarkup.c' object='libeglib_static_la-gmarkup.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmarkup.lo `test -f 'gmarkup.c' || echo '$(srcdir)/'`gmarkup.c + +libeglib_static_la-gutf8.lo: gutf8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gutf8.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gutf8.Tpo -c -o libeglib_static_la-gutf8.lo `test -f 'gutf8.c' || echo '$(srcdir)/'`gutf8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gutf8.Tpo $(DEPDIR)/libeglib_static_la-gutf8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gutf8.c' object='libeglib_static_la-gutf8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gutf8.lo `test -f 'gutf8.c' || echo '$(srcdir)/'`gutf8.c + +libeglib_static_la-gunicode.lo: gunicode.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gunicode.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gunicode.Tpo -c -o libeglib_static_la-gunicode.lo `test -f 'gunicode.c' || echo '$(srcdir)/'`gunicode.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gunicode.Tpo $(DEPDIR)/libeglib_static_la-gunicode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gunicode.c' object='libeglib_static_la-gunicode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gunicode.lo `test -f 'gunicode.c' || echo '$(srcdir)/'`gunicode.c + +libeglib_static_la-gdate-unix.lo: gdate-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gdate-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gdate-unix.Tpo -c -o libeglib_static_la-gdate-unix.lo `test -f 'gdate-unix.c' || echo '$(srcdir)/'`gdate-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gdate-unix.Tpo $(DEPDIR)/libeglib_static_la-gdate-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdate-unix.c' object='libeglib_static_la-gdate-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gdate-unix.lo `test -f 'gdate-unix.c' || echo '$(srcdir)/'`gdate-unix.c + +libeglib_static_la-gdir-unix.lo: gdir-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gdir-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gdir-unix.Tpo -c -o libeglib_static_la-gdir-unix.lo `test -f 'gdir-unix.c' || echo '$(srcdir)/'`gdir-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gdir-unix.Tpo $(DEPDIR)/libeglib_static_la-gdir-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdir-unix.c' object='libeglib_static_la-gdir-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gdir-unix.lo `test -f 'gdir-unix.c' || echo '$(srcdir)/'`gdir-unix.c + +libeglib_static_la-gfile-unix.lo: gfile-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gfile-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gfile-unix.Tpo -c -o libeglib_static_la-gfile-unix.lo `test -f 'gfile-unix.c' || echo '$(srcdir)/'`gfile-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gfile-unix.Tpo $(DEPDIR)/libeglib_static_la-gfile-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-unix.c' object='libeglib_static_la-gfile-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gfile-unix.lo `test -f 'gfile-unix.c' || echo '$(srcdir)/'`gfile-unix.c + +libeglib_static_la-gmisc-unix.lo: gmisc-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmisc-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmisc-unix.Tpo -c -o libeglib_static_la-gmisc-unix.lo `test -f 'gmisc-unix.c' || echo '$(srcdir)/'`gmisc-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmisc-unix.Tpo $(DEPDIR)/libeglib_static_la-gmisc-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmisc-unix.c' object='libeglib_static_la-gmisc-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmisc-unix.lo `test -f 'gmisc-unix.c' || echo '$(srcdir)/'`gmisc-unix.c + +libeglib_static_la-gmodule-unix.lo: gmodule-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmodule-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmodule-unix.Tpo -c -o libeglib_static_la-gmodule-unix.lo `test -f 'gmodule-unix.c' || echo '$(srcdir)/'`gmodule-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmodule-unix.Tpo $(DEPDIR)/libeglib_static_la-gmodule-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmodule-unix.c' object='libeglib_static_la-gmodule-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmodule-unix.lo `test -f 'gmodule-unix.c' || echo '$(srcdir)/'`gmodule-unix.c + +libeglib_static_la-gtimer-unix.lo: gtimer-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gtimer-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gtimer-unix.Tpo -c -o libeglib_static_la-gtimer-unix.lo `test -f 'gtimer-unix.c' || echo '$(srcdir)/'`gtimer-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gtimer-unix.Tpo $(DEPDIR)/libeglib_static_la-gtimer-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtimer-unix.c' object='libeglib_static_la-gtimer-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gtimer-unix.lo `test -f 'gtimer-unix.c' || echo '$(srcdir)/'`gtimer-unix.c + +libeglib_static_la-gdate-win32.lo: gdate-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gdate-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gdate-win32.Tpo -c -o libeglib_static_la-gdate-win32.lo `test -f 'gdate-win32.c' || echo '$(srcdir)/'`gdate-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gdate-win32.Tpo $(DEPDIR)/libeglib_static_la-gdate-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdate-win32.c' object='libeglib_static_la-gdate-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gdate-win32.lo `test -f 'gdate-win32.c' || echo '$(srcdir)/'`gdate-win32.c + +libeglib_static_la-gdir-win32.lo: gdir-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gdir-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gdir-win32.Tpo -c -o libeglib_static_la-gdir-win32.lo `test -f 'gdir-win32.c' || echo '$(srcdir)/'`gdir-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gdir-win32.Tpo $(DEPDIR)/libeglib_static_la-gdir-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdir-win32.c' object='libeglib_static_la-gdir-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gdir-win32.lo `test -f 'gdir-win32.c' || echo '$(srcdir)/'`gdir-win32.c + +libeglib_static_la-gfile-win32.lo: gfile-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gfile-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gfile-win32.Tpo -c -o libeglib_static_la-gfile-win32.lo `test -f 'gfile-win32.c' || echo '$(srcdir)/'`gfile-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gfile-win32.Tpo $(DEPDIR)/libeglib_static_la-gfile-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-win32.c' object='libeglib_static_la-gfile-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gfile-win32.lo `test -f 'gfile-win32.c' || echo '$(srcdir)/'`gfile-win32.c + +libeglib_static_la-gmisc-win32.lo: gmisc-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmisc-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmisc-win32.Tpo -c -o libeglib_static_la-gmisc-win32.lo `test -f 'gmisc-win32.c' || echo '$(srcdir)/'`gmisc-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmisc-win32.Tpo $(DEPDIR)/libeglib_static_la-gmisc-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmisc-win32.c' object='libeglib_static_la-gmisc-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmisc-win32.lo `test -f 'gmisc-win32.c' || echo '$(srcdir)/'`gmisc-win32.c + +libeglib_static_la-gmodule-win32.lo: gmodule-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gmodule-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gmodule-win32.Tpo -c -o libeglib_static_la-gmodule-win32.lo `test -f 'gmodule-win32.c' || echo '$(srcdir)/'`gmodule-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gmodule-win32.Tpo $(DEPDIR)/libeglib_static_la-gmodule-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmodule-win32.c' object='libeglib_static_la-gmodule-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gmodule-win32.lo `test -f 'gmodule-win32.c' || echo '$(srcdir)/'`gmodule-win32.c + +libeglib_static_la-gtimer-win32.lo: gtimer-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-gtimer-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-gtimer-win32.Tpo -c -o libeglib_static_la-gtimer-win32.lo `test -f 'gtimer-win32.c' || echo '$(srcdir)/'`gtimer-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-gtimer-win32.Tpo $(DEPDIR)/libeglib_static_la-gtimer-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtimer-win32.c' object='libeglib_static_la-gtimer-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-gtimer-win32.lo `test -f 'gtimer-win32.c' || echo '$(srcdir)/'`gtimer-win32.c + +libeglib_static_la-vasprintf.lo: vasprintf.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -MT libeglib_static_la-vasprintf.lo -MD -MP -MF $(DEPDIR)/libeglib_static_la-vasprintf.Tpo -c -o libeglib_static_la-vasprintf.lo `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_static_la-vasprintf.Tpo $(DEPDIR)/libeglib_static_la-vasprintf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vasprintf.c' object='libeglib_static_la-vasprintf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_static_la_CFLAGS) $(CFLAGS) -c -o libeglib_static_la-vasprintf.lo `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c + +libeglib_la-garray.lo: garray.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-garray.lo -MD -MP -MF $(DEPDIR)/libeglib_la-garray.Tpo -c -o libeglib_la-garray.lo `test -f 'garray.c' || echo '$(srcdir)/'`garray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-garray.Tpo $(DEPDIR)/libeglib_la-garray.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='garray.c' object='libeglib_la-garray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-garray.lo `test -f 'garray.c' || echo '$(srcdir)/'`garray.c + +libeglib_la-gerror.lo: gerror.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gerror.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gerror.Tpo -c -o libeglib_la-gerror.lo `test -f 'gerror.c' || echo '$(srcdir)/'`gerror.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gerror.Tpo $(DEPDIR)/libeglib_la-gerror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gerror.c' object='libeglib_la-gerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gerror.lo `test -f 'gerror.c' || echo '$(srcdir)/'`gerror.c + +libeglib_la-ghashtable.lo: ghashtable.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-ghashtable.lo -MD -MP -MF $(DEPDIR)/libeglib_la-ghashtable.Tpo -c -o libeglib_la-ghashtable.lo `test -f 'ghashtable.c' || echo '$(srcdir)/'`ghashtable.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-ghashtable.Tpo $(DEPDIR)/libeglib_la-ghashtable.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ghashtable.c' object='libeglib_la-ghashtable.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-ghashtable.lo `test -f 'ghashtable.c' || echo '$(srcdir)/'`ghashtable.c + +libeglib_la-gmem.lo: gmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmem.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmem.Tpo -c -o libeglib_la-gmem.lo `test -f 'gmem.c' || echo '$(srcdir)/'`gmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmem.Tpo $(DEPDIR)/libeglib_la-gmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmem.c' object='libeglib_la-gmem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmem.lo `test -f 'gmem.c' || echo '$(srcdir)/'`gmem.c + +libeglib_la-goutput.lo: goutput.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-goutput.lo -MD -MP -MF $(DEPDIR)/libeglib_la-goutput.Tpo -c -o libeglib_la-goutput.lo `test -f 'goutput.c' || echo '$(srcdir)/'`goutput.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-goutput.Tpo $(DEPDIR)/libeglib_la-goutput.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='goutput.c' object='libeglib_la-goutput.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-goutput.lo `test -f 'goutput.c' || echo '$(srcdir)/'`goutput.c + +libeglib_la-gstr.lo: gstr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gstr.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gstr.Tpo -c -o libeglib_la-gstr.lo `test -f 'gstr.c' || echo '$(srcdir)/'`gstr.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gstr.Tpo $(DEPDIR)/libeglib_la-gstr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gstr.c' object='libeglib_la-gstr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gstr.lo `test -f 'gstr.c' || echo '$(srcdir)/'`gstr.c + +libeglib_la-gslist.lo: gslist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gslist.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gslist.Tpo -c -o libeglib_la-gslist.lo `test -f 'gslist.c' || echo '$(srcdir)/'`gslist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gslist.Tpo $(DEPDIR)/libeglib_la-gslist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gslist.c' object='libeglib_la-gslist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gslist.lo `test -f 'gslist.c' || echo '$(srcdir)/'`gslist.c + +libeglib_la-gstring.lo: gstring.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gstring.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gstring.Tpo -c -o libeglib_la-gstring.lo `test -f 'gstring.c' || echo '$(srcdir)/'`gstring.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gstring.Tpo $(DEPDIR)/libeglib_la-gstring.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gstring.c' object='libeglib_la-gstring.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gstring.lo `test -f 'gstring.c' || echo '$(srcdir)/'`gstring.c + +libeglib_la-gptrarray.lo: gptrarray.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gptrarray.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gptrarray.Tpo -c -o libeglib_la-gptrarray.lo `test -f 'gptrarray.c' || echo '$(srcdir)/'`gptrarray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gptrarray.Tpo $(DEPDIR)/libeglib_la-gptrarray.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gptrarray.c' object='libeglib_la-gptrarray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gptrarray.lo `test -f 'gptrarray.c' || echo '$(srcdir)/'`gptrarray.c + +libeglib_la-glist.lo: glist.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-glist.lo -MD -MP -MF $(DEPDIR)/libeglib_la-glist.Tpo -c -o libeglib_la-glist.lo `test -f 'glist.c' || echo '$(srcdir)/'`glist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-glist.Tpo $(DEPDIR)/libeglib_la-glist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glist.c' object='libeglib_la-glist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-glist.lo `test -f 'glist.c' || echo '$(srcdir)/'`glist.c + +libeglib_la-gqueue.lo: gqueue.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gqueue.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gqueue.Tpo -c -o libeglib_la-gqueue.lo `test -f 'gqueue.c' || echo '$(srcdir)/'`gqueue.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gqueue.Tpo $(DEPDIR)/libeglib_la-gqueue.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gqueue.c' object='libeglib_la-gqueue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gqueue.lo `test -f 'gqueue.c' || echo '$(srcdir)/'`gqueue.c + +libeglib_la-gpath.lo: gpath.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gpath.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gpath.Tpo -c -o libeglib_la-gpath.lo `test -f 'gpath.c' || echo '$(srcdir)/'`gpath.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gpath.Tpo $(DEPDIR)/libeglib_la-gpath.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpath.c' object='libeglib_la-gpath.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gpath.lo `test -f 'gpath.c' || echo '$(srcdir)/'`gpath.c + +libeglib_la-gshell.lo: gshell.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gshell.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gshell.Tpo -c -o libeglib_la-gshell.lo `test -f 'gshell.c' || echo '$(srcdir)/'`gshell.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gshell.Tpo $(DEPDIR)/libeglib_la-gshell.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gshell.c' object='libeglib_la-gshell.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gshell.lo `test -f 'gshell.c' || echo '$(srcdir)/'`gshell.c + +libeglib_la-gspawn.lo: gspawn.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gspawn.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gspawn.Tpo -c -o libeglib_la-gspawn.lo `test -f 'gspawn.c' || echo '$(srcdir)/'`gspawn.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gspawn.Tpo $(DEPDIR)/libeglib_la-gspawn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gspawn.c' object='libeglib_la-gspawn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gspawn.lo `test -f 'gspawn.c' || echo '$(srcdir)/'`gspawn.c + +libeglib_la-gfile.lo: gfile.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gfile.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gfile.Tpo -c -o libeglib_la-gfile.lo `test -f 'gfile.c' || echo '$(srcdir)/'`gfile.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gfile.Tpo $(DEPDIR)/libeglib_la-gfile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile.c' object='libeglib_la-gfile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gfile.lo `test -f 'gfile.c' || echo '$(srcdir)/'`gfile.c + +libeglib_la-gfile-posix.lo: gfile-posix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gfile-posix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gfile-posix.Tpo -c -o libeglib_la-gfile-posix.lo `test -f 'gfile-posix.c' || echo '$(srcdir)/'`gfile-posix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gfile-posix.Tpo $(DEPDIR)/libeglib_la-gfile-posix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-posix.c' object='libeglib_la-gfile-posix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gfile-posix.lo `test -f 'gfile-posix.c' || echo '$(srcdir)/'`gfile-posix.c + +libeglib_la-gpattern.lo: gpattern.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gpattern.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gpattern.Tpo -c -o libeglib_la-gpattern.lo `test -f 'gpattern.c' || echo '$(srcdir)/'`gpattern.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gpattern.Tpo $(DEPDIR)/libeglib_la-gpattern.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpattern.c' object='libeglib_la-gpattern.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gpattern.lo `test -f 'gpattern.c' || echo '$(srcdir)/'`gpattern.c + +libeglib_la-gmarkup.lo: gmarkup.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmarkup.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmarkup.Tpo -c -o libeglib_la-gmarkup.lo `test -f 'gmarkup.c' || echo '$(srcdir)/'`gmarkup.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmarkup.Tpo $(DEPDIR)/libeglib_la-gmarkup.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmarkup.c' object='libeglib_la-gmarkup.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmarkup.lo `test -f 'gmarkup.c' || echo '$(srcdir)/'`gmarkup.c + +libeglib_la-gutf8.lo: gutf8.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gutf8.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gutf8.Tpo -c -o libeglib_la-gutf8.lo `test -f 'gutf8.c' || echo '$(srcdir)/'`gutf8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gutf8.Tpo $(DEPDIR)/libeglib_la-gutf8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gutf8.c' object='libeglib_la-gutf8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gutf8.lo `test -f 'gutf8.c' || echo '$(srcdir)/'`gutf8.c + +libeglib_la-gunicode.lo: gunicode.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gunicode.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gunicode.Tpo -c -o libeglib_la-gunicode.lo `test -f 'gunicode.c' || echo '$(srcdir)/'`gunicode.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gunicode.Tpo $(DEPDIR)/libeglib_la-gunicode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gunicode.c' object='libeglib_la-gunicode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gunicode.lo `test -f 'gunicode.c' || echo '$(srcdir)/'`gunicode.c + +libeglib_la-gdate-unix.lo: gdate-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gdate-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gdate-unix.Tpo -c -o libeglib_la-gdate-unix.lo `test -f 'gdate-unix.c' || echo '$(srcdir)/'`gdate-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gdate-unix.Tpo $(DEPDIR)/libeglib_la-gdate-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdate-unix.c' object='libeglib_la-gdate-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gdate-unix.lo `test -f 'gdate-unix.c' || echo '$(srcdir)/'`gdate-unix.c + +libeglib_la-gdir-unix.lo: gdir-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gdir-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gdir-unix.Tpo -c -o libeglib_la-gdir-unix.lo `test -f 'gdir-unix.c' || echo '$(srcdir)/'`gdir-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gdir-unix.Tpo $(DEPDIR)/libeglib_la-gdir-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdir-unix.c' object='libeglib_la-gdir-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gdir-unix.lo `test -f 'gdir-unix.c' || echo '$(srcdir)/'`gdir-unix.c + +libeglib_la-gfile-unix.lo: gfile-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gfile-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gfile-unix.Tpo -c -o libeglib_la-gfile-unix.lo `test -f 'gfile-unix.c' || echo '$(srcdir)/'`gfile-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gfile-unix.Tpo $(DEPDIR)/libeglib_la-gfile-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-unix.c' object='libeglib_la-gfile-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gfile-unix.lo `test -f 'gfile-unix.c' || echo '$(srcdir)/'`gfile-unix.c + +libeglib_la-gmisc-unix.lo: gmisc-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmisc-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmisc-unix.Tpo -c -o libeglib_la-gmisc-unix.lo `test -f 'gmisc-unix.c' || echo '$(srcdir)/'`gmisc-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmisc-unix.Tpo $(DEPDIR)/libeglib_la-gmisc-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmisc-unix.c' object='libeglib_la-gmisc-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmisc-unix.lo `test -f 'gmisc-unix.c' || echo '$(srcdir)/'`gmisc-unix.c + +libeglib_la-gmodule-unix.lo: gmodule-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmodule-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmodule-unix.Tpo -c -o libeglib_la-gmodule-unix.lo `test -f 'gmodule-unix.c' || echo '$(srcdir)/'`gmodule-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmodule-unix.Tpo $(DEPDIR)/libeglib_la-gmodule-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmodule-unix.c' object='libeglib_la-gmodule-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmodule-unix.lo `test -f 'gmodule-unix.c' || echo '$(srcdir)/'`gmodule-unix.c + +libeglib_la-gtimer-unix.lo: gtimer-unix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gtimer-unix.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gtimer-unix.Tpo -c -o libeglib_la-gtimer-unix.lo `test -f 'gtimer-unix.c' || echo '$(srcdir)/'`gtimer-unix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gtimer-unix.Tpo $(DEPDIR)/libeglib_la-gtimer-unix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtimer-unix.c' object='libeglib_la-gtimer-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gtimer-unix.lo `test -f 'gtimer-unix.c' || echo '$(srcdir)/'`gtimer-unix.c + +libeglib_la-gdate-win32.lo: gdate-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gdate-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gdate-win32.Tpo -c -o libeglib_la-gdate-win32.lo `test -f 'gdate-win32.c' || echo '$(srcdir)/'`gdate-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gdate-win32.Tpo $(DEPDIR)/libeglib_la-gdate-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdate-win32.c' object='libeglib_la-gdate-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gdate-win32.lo `test -f 'gdate-win32.c' || echo '$(srcdir)/'`gdate-win32.c + +libeglib_la-gdir-win32.lo: gdir-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gdir-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gdir-win32.Tpo -c -o libeglib_la-gdir-win32.lo `test -f 'gdir-win32.c' || echo '$(srcdir)/'`gdir-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gdir-win32.Tpo $(DEPDIR)/libeglib_la-gdir-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gdir-win32.c' object='libeglib_la-gdir-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gdir-win32.lo `test -f 'gdir-win32.c' || echo '$(srcdir)/'`gdir-win32.c + +libeglib_la-gfile-win32.lo: gfile-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gfile-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gfile-win32.Tpo -c -o libeglib_la-gfile-win32.lo `test -f 'gfile-win32.c' || echo '$(srcdir)/'`gfile-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gfile-win32.Tpo $(DEPDIR)/libeglib_la-gfile-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfile-win32.c' object='libeglib_la-gfile-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gfile-win32.lo `test -f 'gfile-win32.c' || echo '$(srcdir)/'`gfile-win32.c + +libeglib_la-gmisc-win32.lo: gmisc-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmisc-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmisc-win32.Tpo -c -o libeglib_la-gmisc-win32.lo `test -f 'gmisc-win32.c' || echo '$(srcdir)/'`gmisc-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmisc-win32.Tpo $(DEPDIR)/libeglib_la-gmisc-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmisc-win32.c' object='libeglib_la-gmisc-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmisc-win32.lo `test -f 'gmisc-win32.c' || echo '$(srcdir)/'`gmisc-win32.c + +libeglib_la-gmodule-win32.lo: gmodule-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gmodule-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gmodule-win32.Tpo -c -o libeglib_la-gmodule-win32.lo `test -f 'gmodule-win32.c' || echo '$(srcdir)/'`gmodule-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gmodule-win32.Tpo $(DEPDIR)/libeglib_la-gmodule-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gmodule-win32.c' object='libeglib_la-gmodule-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gmodule-win32.lo `test -f 'gmodule-win32.c' || echo '$(srcdir)/'`gmodule-win32.c + +libeglib_la-gtimer-win32.lo: gtimer-win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-gtimer-win32.lo -MD -MP -MF $(DEPDIR)/libeglib_la-gtimer-win32.Tpo -c -o libeglib_la-gtimer-win32.lo `test -f 'gtimer-win32.c' || echo '$(srcdir)/'`gtimer-win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-gtimer-win32.Tpo $(DEPDIR)/libeglib_la-gtimer-win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gtimer-win32.c' object='libeglib_la-gtimer-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-gtimer-win32.lo `test -f 'gtimer-win32.c' || echo '$(srcdir)/'`gtimer-win32.c + +libeglib_la-vasprintf.lo: vasprintf.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -MT libeglib_la-vasprintf.lo -MD -MP -MF $(DEPDIR)/libeglib_la-vasprintf.Tpo -c -o libeglib_la-vasprintf.lo `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libeglib_la-vasprintf.Tpo $(DEPDIR)/libeglib_la-vasprintf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vasprintf.c' object='libeglib_la-vasprintf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeglib_la_CFLAGS) $(CFLAGS) -c -o libeglib_la-vasprintf.lo `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/eglib/src/eglib-config.h b/eglib/src/eglib-config.h new file mode 100644 index 0000000000..9b7d9b0d71 --- /dev/null +++ b/eglib/src/eglib-config.h @@ -0,0 +1,41 @@ +#ifndef __EGLIB_CONFIG_H +#define __EGLIB_CONFIG_H + +/* + * System-dependent settings + */ +#define G_GNUC_PRETTY_FUNCTION +#define G_GNUC_UNUSED __attribute__((__unused__)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN +#define G_GNUC_NORETURN __attribute__((__noreturn__)) +#define G_SEARCHPATH_SEPARATOR_S ":" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_BREAKPOINT() G_STMT_START { raise (SIGTRAP); } G_STMT_END +#define G_OS_UNIX +#define GPOINTER_TO_INT(ptr) ((gint)(long) (ptr)) +#define GPOINTER_TO_UINT(ptr) ((guint)(long) (ptr)) +#define GINT_TO_POINTER(v) ((gpointer)(glong) (v)) +#define GUINT_TO_POINTER(v) ((gpointer)(gulong) (v)) + +typedef unsigned long gsize; +typedef signed long gssize; + +#define G_GSIZE_FORMAT "lu" +#define G_GUINT64_FORMAT "lu" +#define G_GINT64_FORMAT "ld" + +#if 1 == 1 +#define G_HAVE_ISO_VARARGS +#endif + +#if defined (__native_client__) +#define sem_trywait(x) sem_wait(x) +#define sem_timedwait(x,y) sem_wait(x) +#define getdtablesize() (32768) +#undef G_BREAKPOINT +#define G_BREAKPOINT() +#endif + +#endif diff --git a/eglib/src/eglib-config.h.in b/eglib/src/eglib-config.h.in new file mode 100644 index 0000000000..03ecbfd129 --- /dev/null +++ b/eglib/src/eglib-config.h.in @@ -0,0 +1,41 @@ +#ifndef __EGLIB_CONFIG_H +#define __EGLIB_CONFIG_H + +/* + * System-dependent settings + */ +#define G_GNUC_PRETTY_FUNCTION @GNUC_PRETTY@ +#define G_GNUC_UNUSED @GNUC_UNUSED@ +#define G_BYTE_ORDER @ORDER@ +#define G_GNUC_NORETURN @GNUC_NORETURN@ +#define G_SEARCHPATH_SEPARATOR_S "@SEARCHSEP@" +#define G_SEARCHPATH_SEPARATOR '@SEARCHSEP@' +#define G_DIR_SEPARATOR '@PATHSEP@' +#define G_DIR_SEPARATOR_S "@PATHSEP@" +#define G_BREAKPOINT() @BREAKPOINT@ +#define G_OS_@OS@ +#define GPOINTER_TO_INT(ptr) @GPOINTER_TO_INT@ +#define GPOINTER_TO_UINT(ptr) @GPOINTER_TO_UINT@ +#define GINT_TO_POINTER(v) @GINT_TO_POINTER@ +#define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@ + +typedef unsigned @GSIZE@ gsize; +typedef signed @GSIZE@ gssize; + +#define G_GSIZE_FORMAT @GSIZE_FORMAT@ +#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@ +#define G_GINT64_FORMAT @G_GINT64_FORMAT@ + +#if @G_HAVE_ISO_VARARGS@ == 1 +#define G_HAVE_ISO_VARARGS +#endif + +#if defined (__native_client__) +#define sem_trywait(x) sem_wait(x) +#define sem_timedwait(x,y) sem_wait(x) +#define getdtablesize() (32768) +#undef G_BREAKPOINT +#define G_BREAKPOINT() +#endif + +#endif diff --git a/eglib/src/eglib-remap.h b/eglib/src/eglib-remap.h new file mode 100644 index 0000000000..c10aa6feac --- /dev/null +++ b/eglib/src/eglib-remap.h @@ -0,0 +1,225 @@ +#define g_array_append_vals monoeg_g_array_append_vals +#define g_array_free monoeg_g_array_free +#define g_array_insert_vals monoeg_g_array_insert_vals +#define g_array_new monoeg_g_array_new +#define g_array_remove_index monoeg_g_array_remove_index +#define g_array_remove_index_fast monoeg_g_array_remove_index_fast +#define g_ascii_strdown monoeg_g_ascii_strdown +#define g_ascii_strncasecmp monoeg_g_ascii_strncasecmp +#define g_ascii_tolower monoeg_g_ascii_tolower +#define g_ascii_xdigit_value monoeg_g_ascii_xdigit_value +#define g_build_path monoeg_g_build_path +#define g_clear_error monoeg_g_clear_error +#define g_convert monoeg_g_convert +#define g_convert_error_quark monoeg_g_convert_error_quark +#define g_dir_close monoeg_g_dir_close +#define g_dir_open monoeg_g_dir_open +#define g_dir_read_name monoeg_g_dir_read_name +#define g_dir_rewind monoeg_g_dir_rewind +#define g_direct_equal monoeg_g_direct_equal +#define g_direct_hash monoeg_g_direct_hash +#define g_error_free monoeg_g_error_free +#define g_error_new monoeg_g_error_new +#define g_file_error_from_errno monoeg_g_file_error_from_errno +#define g_file_get_contents monoeg_g_file_get_contents +#define g_file_open_tmp monoeg_g_file_open_tmp +#define g_file_test monoeg_g_file_test +#define g_filename_from_uri monoeg_g_filename_from_uri +#define g_filename_from_utf8 monoeg_g_filename_from_utf8 +#define g_filename_to_uri monoeg_g_filename_to_uri +#define g_find_program_in_path monoeg_g_find_program_in_path +#define g_fprintf monoeg_g_fprintf +#define g_free monoeg_g_free +#define g_get_charset monoeg_g_get_charset +#define g_get_current_dir monoeg_g_get_current_dir +#define g_get_current_time monoeg_g_get_current_time +#define g_get_home_dir monoeg_g_get_home_dir +#define g_get_prgname monoeg_g_get_prgname +#define g_get_tmp_dir monoeg_g_get_tmp_dir +#define g_get_user_name monoeg_g_get_user_name +#define g_getenv monoeg_g_getenv +#define g_hash_table_destroy monoeg_g_hash_table_destroy +#define g_hash_table_find monoeg_g_hash_table_find +#define g_hash_table_foreach monoeg_g_hash_table_foreach +#define g_hash_table_foreach_remove monoeg_g_hash_table_foreach_remove +#define g_hash_table_foreach_steal monoeg_g_hash_table_foreach_steal +#define g_hash_table_insert_replace monoeg_g_hash_table_insert_replace +#define g_hash_table_lookup monoeg_g_hash_table_lookup +#define g_hash_table_lookup_extended monoeg_g_hash_table_lookup_extended +#define g_hash_table_new monoeg_g_hash_table_new +#define g_hash_table_new_full monoeg_g_hash_table_new_full +#define g_hash_table_remove monoeg_g_hash_table_remove +#define g_hash_table_size monoeg_g_hash_table_size +#define g_hash_table_print_stats monoeg_g_hash_table_print_stats +#define g_int_equal monoeg_g_int_equal +#define g_int_hash monoeg_g_int_hash +#define g_list_alloc monoeg_g_list_alloc +#define g_list_append monoeg_g_list_append +#define g_list_concat monoeg_g_list_concat +#define g_list_copy monoeg_g_list_copy +#define g_list_delete_link monoeg_g_list_delete_link +#define g_list_find monoeg_g_list_find +#define g_list_find_custom monoeg_g_list_find_custom +#define g_list_first monoeg_g_list_first +#define g_list_foreach monoeg_g_list_foreach +#define g_list_free monoeg_g_list_free +#define g_list_free_1 monoeg_g_list_free_1 +#define g_list_index monoeg_g_list_index +#define g_list_insert_before monoeg_g_list_insert_before +#define g_list_insert_sorted monoeg_g_list_insert_sorted +#define g_list_last monoeg_g_list_last +#define g_list_length monoeg_g_list_length +#define g_list_nth monoeg_g_list_nth +#define g_list_nth_data monoeg_g_list_nth_data +#define g_list_prepend monoeg_g_list_prepend +#define g_list_remove monoeg_g_list_remove +#define g_list_remove_link monoeg_g_list_remove_link +#define g_list_reverse monoeg_g_list_reverse +#define g_list_sort monoeg_g_list_sort +#define g_locale_from_utf8 monoeg_g_locale_from_utf8 +#define g_locale_to_utf8 monoeg_g_locale_to_utf8 +#define g_log monoeg_g_log +#define g_log_set_always_fatal monoeg_g_log_set_always_fatal +#define g_log_set_fatal_mask monoeg_g_log_set_fatal_mask +#define g_logv monoeg_g_logv +#define g_markup_parse_context_end_parse monoeg_g_markup_parse_context_end_parse +#define g_markup_parse_context_free monoeg_g_markup_parse_context_free +#define g_markup_parse_context_new monoeg_g_markup_parse_context_new +#define g_markup_parse_context_parse monoeg_g_markup_parse_context_parse +#define g_memdup monoeg_g_memdup +#define g_module_build_path monoeg_g_module_build_path +#define g_module_close monoeg_g_module_close +#define g_module_error monoeg_g_module_error +#define g_module_open monoeg_g_module_open +#define g_module_symbol monoeg_g_module_symbol +#define g_path_get_basename monoeg_g_path_get_basename +#define g_path_get_dirname monoeg_g_path_get_dirname +#define g_path_is_absolute monoeg_g_path_is_absolute +#define g_pattern_match_string monoeg_g_pattern_match_string +#define g_pattern_spec_free monoeg_g_pattern_spec_free +#define g_pattern_spec_new monoeg_g_pattern_spec_new +#define g_print monoeg_g_print +#define g_printf monoeg_g_printf +#define g_printerr monoeg_g_printerr +#define g_propagate_error monoeg_g_propagate_error +#define g_ptr_array_add monoeg_g_ptr_array_add +#define g_ptr_array_foreach monoeg_g_ptr_array_foreach +#define g_ptr_array_free monoeg_g_ptr_array_free +#define g_ptr_array_new monoeg_g_ptr_array_new +#define g_ptr_array_remove monoeg_g_ptr_array_remove +#define g_ptr_array_remove_fast monoeg_g_ptr_array_remove_fast +#define g_ptr_array_remove_index monoeg_g_ptr_array_remove_index +#define g_ptr_array_remove_index_fast monoeg_g_ptr_array_remove_index_fast +#define g_ptr_array_set_size monoeg_g_ptr_array_set_size +#define g_ptr_array_sized_new monoeg_g_ptr_array_sized_new +#define g_ptr_array_sort monoeg_g_ptr_array_sort +#define g_ptr_array_sort_with_data monoeg_g_ptr_array_sort_with_data +#define g_queue_free monoeg_g_queue_free +#define g_queue_is_empty monoeg_g_queue_is_empty +#define g_queue_new monoeg_g_queue_new +#define g_queue_pop_head monoeg_g_queue_pop_head +#define g_queue_push_head monoeg_g_queue_push_head +#define g_queue_push_tail monoeg_g_queue_push_tail +#define g_set_error monoeg_g_set_error +#define g_set_prgname monoeg_g_set_prgname +#define g_setenv monoeg_g_setenv +#define g_shell_parse_argv monoeg_g_shell_parse_argv +#define g_shell_quote monoeg_g_shell_quote +#define g_shell_unquote monoeg_g_shell_unquote +#define g_slist_alloc monoeg_g_slist_alloc +#define g_slist_append monoeg_g_slist_append +#define g_slist_concat monoeg_g_slist_concat +#define g_slist_copy monoeg_g_slist_copy +#define g_slist_delete_link monoeg_g_slist_delete_link +#define g_slist_find monoeg_g_slist_find +#define g_slist_find_custom monoeg_g_slist_find_custom +#define g_slist_foreach monoeg_g_slist_foreach +#define g_slist_free monoeg_g_slist_free +#define g_slist_free_1 monoeg_g_slist_free_1 +#define g_slist_index monoeg_g_slist_index +#define g_slist_insert_before monoeg_g_slist_insert_before +#define g_slist_insert_sorted monoeg_g_slist_insert_sorted +#define g_slist_last monoeg_g_slist_last +#define g_slist_length monoeg_g_slist_length +#define g_slist_nth monoeg_g_slist_nth +#define g_slist_nth_data monoeg_g_slist_nth_data +#define g_slist_prepend monoeg_g_slist_prepend +#define g_slist_remove monoeg_g_slist_remove +#define g_slist_remove_all monoeg_g_slist_remove_all +#define g_slist_remove_link monoeg_g_slist_remove_link +#define g_slist_reverse monoeg_g_slist_reverse +#define g_slist_sort monoeg_g_slist_sort +#define g_snprintf monoeg_g_snprintf +#define g_spaced_primes_closest monoeg_g_spaced_primes_closest +#define g_spawn_async_with_pipes monoeg_g_spawn_async_with_pipes +#define g_spawn_command_line_sync monoeg_g_spawn_command_line_sync +#define g_sprintf monoeg_g_sprintf +#define g_str_equal monoeg_g_str_equal +#define g_str_has_prefix monoeg_g_str_has_prefix +#define g_str_has_suffix monoeg_g_str_has_suffix +#define g_str_hash monoeg_g_str_hash +#define g_strchomp monoeg_g_strchomp +#define g_strchug monoeg_g_strchug +#define g_strconcat monoeg_g_strconcat +#define g_strdelimit monoeg_g_strdelimit +#define g_strdown monoeg_g_strdown +#define g_strdup_printf monoeg_g_strdup_printf +#define g_strdup_vprintf monoeg_g_strdup_vprintf +#define g_strerror monoeg_g_strerror +#define g_strescape monoeg_g_strescape +#define g_strfreev monoeg_g_strfreev +#define g_strdupv monoeg_g_strdupv +#define g_string_append monoeg_g_string_append +#define g_string_append_c monoeg_g_string_append_c +#define g_string_append_len monoeg_g_string_append_len +#define g_string_append_printf monoeg_g_string_append_printf +#define g_string_free monoeg_g_string_free +#define g_string_new monoeg_g_string_new +#define g_string_new_len monoeg_g_string_new_len +#define g_string_prepend monoeg_g_string_prepend +#define g_string_printf monoeg_g_string_printf +#define g_string_sized_new monoeg_g_string_sized_new +#define g_string_truncate monoeg_g_string_truncate +#define g_strjoin monoeg_g_strjoin +#define g_strjoinv monoeg_g_strjoinv +#define g_strlcpy monoeg_g_strlcpy +#define g_strndup monoeg_g_strndup +#define g_strnfill monoeg_g_strnfill +#define g_strreverse monoeg_g_strreverse +#define g_strsplit monoeg_g_strsplit +#define g_strsplit_set monoeg_g_strsplit_set +#define g_strv_length monoeg_g_strv_length +#define g_timer_destroy monoeg_g_timer_destroy +#define g_timer_elapsed monoeg_g_timer_elapsed +#define g_timer_new monoeg_g_timer_new +#define g_timer_start monoeg_g_timer_start +#define g_timer_stop monoeg_g_timer_stop +#define g_trailingBytesForUTF8 monoeg_g_trailingBytesForUTF8 +#define g_ucs4_to_utf16 monoeg_g_ucs4_to_utf16 +#define g_unichar_case monoeg_g_unichar_case +#define g_unichar_isxdigit monoeg_g_unichar_isxdigit +#define g_unichar_tolower monoeg_g_unichar_tolower +#define g_unichar_totitle monoeg_g_unichar_totitle +#define g_unichar_toupper monoeg_g_unichar_toupper +#define g_unichar_type monoeg_g_unichar_type +#define g_unichar_xdigit_value monoeg_g_unichar_xdigit_value +#define g_unsetenv monoeg_g_unsetenv +#define g_usleep monoeg_g_usleep +#define g_utf16_to_ucs4 monoeg_g_utf16_to_ucs4 +#define g_utf16_to_utf8 monoeg_g_utf16_to_utf8 +#define g_utf8_get_char monoeg_g_utf8_get_char +#define g_utf8_strdown monoeg_g_utf8_strdown +#define g_utf8_strlen monoeg_g_utf8_strlen +#define g_utf8_strup monoeg_g_utf8_strup +#define g_utf8_to_utf16 monoeg_g_utf8_to_utf16 +#define g_utf8_validate monoeg_g_utf8_validate +#define g_win32_getlocale monoeg_g_win32_getlocale +#define g_assertion_message monoeg_assertion_message +#define g_malloc monoeg_malloc +#define g_malloc0 monoeg_malloc0 +#define g_ptr_array_grow monoeg_ptr_array_grow +#define g_realloc monoeg_realloc +#define g_strdup monoeg_strdup +#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len +#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len + diff --git a/eglib/src/garray.c b/eglib/src/garray.c new file mode 100644 index 0000000000..dadb6caa18 --- /dev/null +++ b/eglib/src/garray.c @@ -0,0 +1,206 @@ +/* + * Arrays + * + * Author: + * Chris Toshok (toshok@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include <stdlib.h> +#include <glib.h> + +#define INITIAL_CAPACITY 16 + +#define element_offset(p,i) ((p)->array.data + (i) * (p)->element_size) +#define element_length(p,i) ((i) * (p)->element_size) + +typedef struct { + GArray array; + gboolean clear_; + gboolean element_size; + gboolean zero_terminated; + gint capacity; +} GArrayPriv; + +static void +ensure_capacity (GArrayPriv *priv, + int capacity) +{ + int new_capacity = MAX (priv->capacity, INITIAL_CAPACITY); + + if (capacity < priv->capacity) + return; + + while (new_capacity < capacity) { + new_capacity <<= 1; + } + capacity = new_capacity; + priv->array.data = (gchar*)g_realloc (priv->array.data, element_length (priv, capacity)); + + if (priv->clear_) { + memset (element_offset (priv, priv->capacity), + 0, + element_length (priv, capacity - priv->capacity)); + } + priv->capacity = capacity; +} + +GArray * +g_array_new (gboolean zero_terminated, + gboolean clear_, + guint element_size) +{ + GArrayPriv *rv = g_new0 (GArrayPriv, 1); + rv->zero_terminated = zero_terminated; + rv->clear_ = clear_; + rv->element_size = element_size; + + ensure_capacity (rv, INITIAL_CAPACITY); + + return (GArray*)rv; +} + +gchar* +g_array_free (GArray *array, + gboolean free_segment) +{ + gchar* rv = NULL; + + g_return_val_if_fail (array != NULL, NULL); + + if (free_segment) + g_free (array->data); + else + rv = array->data; + + g_free (array); + + return rv; +} + +GArray * +g_array_append_vals (GArray *array, + gconstpointer data, + guint len) +{ + GArrayPriv *priv = (GArrayPriv*)array; + + g_return_val_if_fail (array != NULL, NULL); + + ensure_capacity (priv, priv->array.len + len + (priv->zero_terminated ? 1 : 0)); + + memmove (element_offset (priv, priv->array.len), + data, + element_length (priv, len)); + + priv->array.len += len; + + if (priv->zero_terminated) { + memset (element_offset (priv, priv->array.len), + 0, + priv->element_size); + } + + return array; +} + +GArray* +g_array_insert_vals (GArray *array, + guint index_, + gconstpointer data, + guint len) +{ + GArrayPriv *priv = (GArrayPriv*)array; + guint extra = (priv->zero_terminated ? 1 : 0); + + g_return_val_if_fail (array != NULL, NULL); + + ensure_capacity (priv, array->len + len + extra); + + /* first move the existing elements out of the way */ + memmove (element_offset (priv, index_ + len), + element_offset (priv, index_), + element_length (priv, array->len - index_)); + + /* then copy the new elements into the array */ + memmove (element_offset (priv, index_), + data, + element_length (priv, len)); + + array->len += len; + + if (priv->zero_terminated) { + memset (element_offset (priv, priv->array.len), + 0, + priv->element_size); + } + + return array; +} + +GArray* +g_array_remove_index (GArray *array, + guint index_) +{ + GArrayPriv *priv = (GArrayPriv*)array; + + g_return_val_if_fail (array != NULL, NULL); + + memmove (element_offset (priv, index_), + element_offset (priv, index_ + 1), + element_length (priv, array->len - index_)); + + array->len --; + + if (priv->zero_terminated) { + memset (element_offset (priv, priv->array.len), + 0, + priv->element_size); + } + + return array; +} + +GArray* +g_array_remove_index_fast (GArray *array, + guint index_) +{ + GArrayPriv *priv = (GArrayPriv*)array; + + g_return_val_if_fail (array != NULL, NULL); + + memmove (element_offset (priv, index_), + element_offset (priv, array->len - 1), + element_length (priv, 1)); + + array->len --; + + if (priv->zero_terminated) { + memset (element_offset (priv, priv->array.len), + 0, + priv->element_size); + } + + return array; +} + diff --git a/eglib/src/gdate-unix.c b/eglib/src/gdate-unix.c new file mode 100644 index 0000000000..5573e0d357 --- /dev/null +++ b/eglib/src/gdate-unix.c @@ -0,0 +1,55 @@ +/* + * gdate-unix.c: Date and time utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <glib.h> +#include <time.h> +#include <errno.h> +#include <sys/time.h> + +void +g_get_current_time (GTimeVal *result) +{ + struct timeval tv; + + g_return_if_fail (result != NULL); + gettimeofday (&tv, NULL); + result->tv_sec = tv.tv_sec; + result->tv_usec = tv.tv_usec; +} + +void +g_usleep (gulong microseconds) +{ + struct timespec req, rem; + + req.tv_sec = microseconds / 1000000; + req.tv_nsec = (microseconds % 1000000) * 1000; + + while (nanosleep (&req, &rem) == -1 && errno == EINTR) + req = rem; +} diff --git a/eglib/src/gdate-win32.c b/eglib/src/gdate-win32.c new file mode 100644 index 0000000000..b00e9b7bd3 --- /dev/null +++ b/eglib/src/gdate-win32.c @@ -0,0 +1,49 @@ +/* + * gdate-win32.c: Date and time utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <glib.h> + +#include <winsock2.h> + +void +g_get_current_time (GTimeVal *result) +{ + long int l; + + g_return_if_fail (result != NULL); + l = GetTickCount(); + + result->tv_sec = l / 1000; + result->tv_usec = (l % 1000) * 1000; +} + +void +g_usleep (gulong microseconds) +{ + Sleep (microseconds/1000); +} diff --git a/eglib/src/gdir-unix.c b/eglib/src/gdir-unix.c new file mode 100644 index 0000000000..6fe64c8d43 --- /dev/null +++ b/eglib/src/gdir-unix.c @@ -0,0 +1,108 @@ +/* + * Directory utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <dirent.h> + +struct _GDir { + DIR *dir; +#ifndef HAVE_REWINDDIR + char *path; +#endif +}; + +GDir * +g_dir_open (const gchar *path, guint flags, GError **error) +{ + GDir *dir; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + (void) flags; /* this is not used */ + dir = g_new (GDir, 1); + dir->dir = opendir (path); + if (dir->dir == NULL) { + if (error) { + gint err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err)); + } + g_free (dir); + return NULL; + } +#ifndef HAVE_REWINDDIR + dir->path = g_strdup (path); +#endif + return dir; +} + +const gchar * +g_dir_read_name (GDir *dir) +{ + struct dirent *entry; + + g_return_val_if_fail (dir != NULL && dir->dir != NULL, NULL); + do { + entry = readdir (dir->dir); + if (entry == NULL) + return NULL; + } while ((strcmp (entry->d_name, ".") == 0) || (strcmp (entry->d_name, "..") == 0)); + + return entry->d_name; +} + +void +g_dir_rewind (GDir *dir) +{ + g_return_if_fail (dir != NULL && dir->dir != NULL); +#ifndef HAVE_REWINDDIR + closedir (dir->dir); + dir->dir = opendir (dir->path); +#else + rewinddir (dir->dir); +#endif +} + +void +g_dir_close (GDir *dir) +{ + g_return_if_fail (dir != NULL && dir->dir != 0); + closedir (dir->dir); +#ifndef HAVE_REWINDDIR + g_free (dir->path); +#endif + dir->dir = NULL; + g_free (dir); +} + + diff --git a/eglib/src/gdir-win32.c b/eglib/src/gdir-win32.c new file mode 100644 index 0000000000..839f0b131b --- /dev/null +++ b/eglib/src/gdir-win32.c @@ -0,0 +1,147 @@ +/* + * Directory utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <io.h> + +#include <winsock2.h> + +struct _GDir { + HANDLE handle; + gchar* current; + gchar* next; +}; + +GDir * +g_dir_open (const gchar *path, guint flags, GError **error) +{ + GDir *dir; + gunichar2* path_utf16; + gunichar2* path_utf16_search; + WIN32_FIND_DATA find_data; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + dir = g_new0 (GDir, 1); + + path_utf16 = u8to16 (path); + + dir->handle = FindFirstFile (path_utf16, &find_data); + if (dir->handle == INVALID_HANDLE_VALUE) { + if (error) { + gint err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err)); + } + g_free (dir); + g_free (path_utf16); + return NULL; + } + + /* now get files */ + FindClose (dir->handle); + path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2)); + wcscpy (path_utf16_search, path_utf16); + wcscat (path_utf16_search, L"\\*"); + + dir->handle = FindFirstFile (path_utf16_search, &find_data); + g_free (path_utf16_search); + + while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)) { + if (!FindNextFile (dir->handle, &find_data)) { + if (error) { + gint err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err)); + } + g_free (dir); + g_free (path_utf16); + return NULL; + } + } + + dir->current = NULL; + dir->next = u16to8 (find_data.cFileName); + + g_free (path_utf16); + return dir; +} + +const gchar * +g_dir_read_name (GDir *dir) +{ + WIN32_FIND_DATA find_data; + + g_return_val_if_fail (dir != NULL && dir->handle != 0, NULL); + + if (dir->current) + g_free (dir->current); + dir->current = NULL; + + dir->current = dir->next; + + if (!dir->current) + return NULL; + + dir->next = NULL; + + do { + if (!FindNextFile (dir->handle, &find_data)) { + dir->next = NULL; + return dir->current; + } + } while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)); + + dir->next = u16to8 (find_data.cFileName); + return dir->current; +} + +void +g_dir_rewind (GDir *dir) +{ +} + +void +g_dir_close (GDir *dir) +{ + g_return_if_fail (dir != NULL && dir->handle != 0); + + if (dir->current) + g_free (dir->current); + dir->current = NULL; + if (dir->next) + g_free (dir->next); + dir->next = NULL; + FindClose (dir->handle); + dir->handle = 0; + g_free (dir); +} + + diff --git a/eglib/src/gerror.c b/eglib/src/gerror.c new file mode 100644 index 0000000000..7db6645b50 --- /dev/null +++ b/eglib/src/gerror.c @@ -0,0 +1,89 @@ +/* + * gerror.c: Error support. + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <stdarg.h> +#include <string.h> +#include <glib.h> + +GError * +g_error_new (gpointer domain, gint code, const char *format, ...) +{ + va_list args; + GError *err = g_new (GError, 1); + + err->domain = domain; + err->code = code; + + va_start (args, format); + if (vasprintf (&err->message, format, args) == -1) + err->message = g_strdup_printf ("internal: invalid format string %s", format); + va_end (args); + + return err; +} + +void +g_clear_error (GError **error) +{ + if (error && *error) { + g_error_free (*error); + *error = NULL; + } +} + +void +g_error_free (GError *error) +{ + g_return_if_fail (error != NULL); + + free (error->message); + g_free (error); +} + +void +g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...) +{ + va_list args; + + if (err) { + va_start (args, format); + *err = g_error_new (domain, code, format, args); + va_end (args); + } +} + +void +g_propagate_error (GError **dest, GError *src) +{ + if (dest == NULL){ + if (src) + g_error_free (src); + } else { + *dest = src; + } +} diff --git a/eglib/src/gfile-posix.c b/eglib/src/gfile-posix.c new file mode 100644 index 0000000000..17005661d2 --- /dev/null +++ b/eglib/src/gfile-posix.c @@ -0,0 +1,171 @@ +/* + * File utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <fcntl.h> +#include <sys/stat.h> +#include <sys/types.h> + +#ifdef _MSC_VER +#include <direct.h> +int mkstemp (char *tmp_template); +#endif + +#ifndef O_LARGEFILE +#define OPEN_FLAGS (O_RDONLY) +#else +#define OPEN_FLAGS (O_RDONLY | O_LARGEFILE) +#endif +gboolean +g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error) +{ + gchar *str; + int fd; + struct stat st; + long offset; + int nread; + + g_return_val_if_fail (filename != NULL, FALSE); + g_return_val_if_fail (contents != NULL, FALSE); + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + *contents = NULL; + if (length) + *length = 0; + + fd = open (filename, OPEN_FLAGS); + if (fd == -1) { + if (error != NULL) { + int err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error opening file"); + } + return FALSE; + } + + if (fstat (fd, &st) != 0) { + if (error != NULL) { + int err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in fstat()"); + } + close (fd); + return FALSE; + } + + str = g_malloc (st.st_size + 1); + offset = 0; + do { + nread = read (fd, str + offset, st.st_size - offset); + if (nread > 0) { + offset += nread; + } + } while ((nread > 0 && offset < st.st_size) || (nread == -1 && errno == EINTR)); + + close (fd); + str [st.st_size] = '\0'; + if (length) { + *length = st.st_size; + } + *contents = str; + return TRUE; +} + +gint +g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error) +{ + const static gchar *default_tmpl = ".XXXXXX"; + gchar *t; + gint fd; + size_t len; + + g_return_val_if_fail (error == NULL || *error == NULL, -1); + + if (tmpl == NULL) + tmpl = default_tmpl; + + if (strchr (tmpl, G_DIR_SEPARATOR) != NULL) { + if (error) { + *error = g_error_new (G_LOG_DOMAIN, 24, "Template should not have any " G_DIR_SEPARATOR_S); + } + return -1; + } + + len = strlen (tmpl); + if (len < 6 || strcmp (tmpl + len - 6, "XXXXXX")) { + if (error) { + *error = g_error_new (G_LOG_DOMAIN, 24, "Template should end with XXXXXX"); + } + return -1; + } + + t = g_build_filename (g_get_tmp_dir (), tmpl, NULL); + + fd = mkstemp (t); + + if (fd == -1) { + if (error) { + int err = errno; + *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), "Error in mkstemp()"); + } + g_free (t); + return -1; + } + + if (name_used) { + *name_used = t; + } else { + g_free (t); + } + return fd; +} + +gchar * +g_get_current_dir (void) +{ + int s = 32; + char *buffer = NULL, *r; + gboolean fail; + + do { + buffer = g_realloc (buffer, s); + r = getcwd (buffer, s); + fail = (r == NULL && errno == ERANGE); + if (fail) { + s <<= 1; + } + } while (fail); + + /* On amd64 sometimes the bottom 32-bits of r == the bottom 32-bits of buffer + * but the top 32-bits of r have overflown to 0xffffffff (seriously wtf getcwd + * so we return the buffer here since it has a pointer to the valid string + */ + return buffer; +} + diff --git a/eglib/src/gfile-unix.c b/eglib/src/gfile-unix.c new file mode 100644 index 0000000000..52f139916f --- /dev/null +++ b/eglib/src/gfile-unix.c @@ -0,0 +1,84 @@ +/* + * File utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +gboolean +g_file_test (const gchar *filename, GFileTest test) +{ + struct stat st; + gboolean have_stat; + + if (filename == NULL || test == 0) + return FALSE; + + have_stat = FALSE; + + if ((test & G_FILE_TEST_EXISTS) != 0) { + if (access (filename, F_OK) == 0) + return TRUE; + } + + if ((test & G_FILE_TEST_IS_EXECUTABLE) != 0) { + if (access (filename, X_OK) == 0) + return TRUE; + } + if ((test & G_FILE_TEST_IS_SYMLINK) != 0) { + have_stat = (lstat (filename, &st) == 0); + if (have_stat && S_ISLNK (st.st_mode)) + return TRUE; + } + + if ((test & G_FILE_TEST_IS_REGULAR) != 0) { + if (!have_stat) + have_stat = (stat (filename, &st) == 0); + if (have_stat && S_ISREG (st.st_mode)) + return TRUE; + } + if ((test & G_FILE_TEST_IS_DIR) != 0) { + if (!have_stat) + have_stat = (stat (filename, &st) == 0); + if (have_stat && S_ISDIR (st.st_mode)) + return TRUE; + } + return FALSE; +} + + diff --git a/eglib/src/gfile-win32.c b/eglib/src/gfile-win32.c new file mode 100644 index 0000000000..40c13bb785 --- /dev/null +++ b/eglib/src/gfile-win32.c @@ -0,0 +1,115 @@ +/* + * File utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <windows.h> +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <sys/types.h> + +#ifdef G_OS_WIN32 +#include <io.h> +#define open _open +#define S_ISREG(x) ((x & _S_IFMT) == _S_IFREG) +#define S_ISDIR(x) ((x & _S_IFMT) == _S_IFDIR) +#endif + +int mkstemp (char *tmp_template) +{ + int fd; + gunichar2* utf16_template; + + utf16_template = u8to16 (tmp_template); + + fd = -1; + utf16_template = _wmktemp( utf16_template); + if (utf16_template && *utf16_template) { + /* FIXME: _O_TEMPORARY causes file to disappear on close causing a test to fail */ + fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE); + } + + sprintf (tmp_template + strlen (tmp_template) - 6, "%S", utf16_template + wcslen (utf16_template) - 6); + + g_free (utf16_template); + return fd; +} + +#ifdef _MSC_VER +#pragma warning(disable:4701) +#endif + +gboolean +g_file_test (const gchar *filename, GFileTest test) +{ + gunichar2* utf16_filename = NULL; + DWORD attr; + + if (filename == NULL || test == 0) + return FALSE; + + utf16_filename = u8to16 (filename); + attr = GetFileAttributesW (utf16_filename); + g_free (utf16_filename); + + if (attr == INVALID_FILE_ATTRIBUTES) + return FALSE; + + if ((test & G_FILE_TEST_EXISTS) != 0) { + return TRUE; + } + + if ((test & G_FILE_TEST_IS_EXECUTABLE) != 0) { + size_t len = strlen (filename); + if (len > 4 && strcmp (filename + len-3, "exe")) + return TRUE; + + return FALSE; + } + + if ((test & G_FILE_TEST_IS_REGULAR) != 0) { + if (attr & (FILE_ATTRIBUTE_DEVICE|FILE_ATTRIBUTE_DIRECTORY)) + return FALSE; + return TRUE; + } + + if ((test & G_FILE_TEST_IS_DIR) != 0) { + if (attr & FILE_ATTRIBUTE_DIRECTORY) + return TRUE; + } + + /* make this last in case it is OR'd with something else */ + if ((test & G_FILE_TEST_IS_SYMLINK) != 0) { + return FALSE; + } + + return FALSE; +} diff --git a/eglib/src/gfile.c b/eglib/src/gfile.c new file mode 100644 index 0000000000..c621a31681 --- /dev/null +++ b/eglib/src/gfile.c @@ -0,0 +1,94 @@ +/* + * File utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <glib.h> +#include <stdio.h> +#include <errno.h> + +GFileError +g_file_error_from_errno (gint err_no) +{ + switch (err_no) { + case EEXIST: + return G_FILE_ERROR_EXIST; + case EISDIR: + return G_FILE_ERROR_ISDIR; + case EACCES: + return G_FILE_ERROR_ACCES; + case ENAMETOOLONG: + return G_FILE_ERROR_NAMETOOLONG; + case ENOENT: + return G_FILE_ERROR_NOENT; + case ENOTDIR: + return G_FILE_ERROR_NOTDIR; + case ENXIO: + return G_FILE_ERROR_NXIO; + case ENODEV: + return G_FILE_ERROR_NODEV; + case EROFS: + return G_FILE_ERROR_ROFS; +#ifdef ETXTBSY + case ETXTBSY: + return G_FILE_ERROR_TXTBSY; +#endif + case EFAULT: + return G_FILE_ERROR_FAULT; +#ifdef ELOOP + case ELOOP: + return G_FILE_ERROR_LOOP; +#endif + case ENOSPC: + return G_FILE_ERROR_NOSPC; + case ENOMEM: + return G_FILE_ERROR_NOMEM; + case EMFILE: + return G_FILE_ERROR_MFILE; + case ENFILE: + return G_FILE_ERROR_NFILE; + case EBADF: + return G_FILE_ERROR_BADF; + case EINVAL: + return G_FILE_ERROR_INVAL; + case EPIPE: + return G_FILE_ERROR_PIPE; + case EAGAIN: + return G_FILE_ERROR_AGAIN; + case EINTR: + return G_FILE_ERROR_INTR; + case EIO: + return G_FILE_ERROR_IO; + case EPERM: + return G_FILE_ERROR_PERM; + case ENOSYS: + return G_FILE_ERROR_NOSYS; + default: + return G_FILE_ERROR_FAILED; + } +} + + diff --git a/eglib/src/ghashtable.c b/eglib/src/ghashtable.c new file mode 100644 index 0000000000..365752a539 --- /dev/null +++ b/eglib/src/ghashtable.c @@ -0,0 +1,543 @@ +/* + * ghashtable.c: Hashtable implementation + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <math.h> +#include <glib.h> + +typedef struct _Slot Slot; + +struct _Slot { + gpointer key; + gpointer value; + Slot *next; +}; + +static gpointer KEYMARKER_REMOVED = &KEYMARKER_REMOVED; + +struct _GHashTable { + GHashFunc hash_func; + GEqualFunc key_equal_func; + + Slot **table; + int table_size; + int in_use; + int threshold; + int last_rehash; + GDestroyNotify value_destroy_func, key_destroy_func; +}; + +static const guint prime_tbl[] = { + 11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237, + 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, + 47431, 71143, 106721, 160073, 240101, 360163, + 540217, 810343, 1215497, 1823231, 2734867, 4102283, + 6153409, 9230113, 13845163 +}; + +static gboolean +test_prime (int x) +{ + if ((x & 1) != 0) { + int n; + for (n = 3; n< (int)sqrt (x); n += 2) { + if ((x % n) == 0) + return FALSE; + } + return TRUE; + } + // There is only one even prime - 2. + return (x == 2); +} + +static int +calc_prime (int x) +{ + int i; + + for (i = (x & (~1))-1; i< G_MAXINT32; i += 2) { + if (test_prime (i)) + return i; + } + return x; +} + +guint +g_spaced_primes_closest (guint x) +{ + int i; + + for (i = 0; i < G_N_ELEMENTS (prime_tbl); i++) { + if (x <= prime_tbl [i]) + return prime_tbl [i]; + } + return calc_prime (x); +} + +GHashTable * +g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func) +{ + GHashTable *hash; + + if (hash_func == NULL) + hash_func = g_direct_hash; + if (key_equal_func == NULL) + key_equal_func = g_direct_equal; + hash = g_new0 (GHashTable, 1); + + hash->hash_func = hash_func; + hash->key_equal_func = key_equal_func; + + hash->table_size = g_spaced_primes_closest (1); + hash->table = g_new0 (Slot *, hash->table_size); + hash->last_rehash = hash->table_size; + + return hash; +} + +GHashTable * +g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) +{ + GHashTable *hash = g_hash_table_new (hash_func, key_equal_func); + if (hash == NULL) + return NULL; + + hash->key_destroy_func = key_destroy_func; + hash->value_destroy_func = value_destroy_func; + + return hash; +} + +#if 0 +static void +dump_hash_table (GHashTable *hash) +{ + int i; + + for (i = 0; i < hash->table_size; i++) { + Slot *s; + + for (s = hash->table [i]; s != NULL; s = s->next){ + guint hashcode = (*hash->hash_func) (s->key); + guint slot = (hashcode) % hash->table_size; + printf ("key %p hash %x on slot %d correct slot %d tb size %d\n", s->key, hashcode, i, slot, hash->table_size); + } + } +} +#endif + +#ifdef SANITY_CHECK +static void +sanity_check (GHashTable *hash) +{ + int i; + + for (i = 0; i < hash->table_size; i++) { + Slot *s; + + for (s = hash->table [i]; s != NULL; s = s->next){ + guint hashcode = (*hash->hash_func) (s->key); + guint slot = (hashcode) % hash->table_size; + if (slot != i) { + dump_hashcode_func = 1; + hashcode = (*hash->hash_func) (s->key); + dump_hashcode_func = 0; + g_error ("Key %p (bucket %d) on invalid bucket %d (hashcode %x) (tb size %d)", s->key, slot, i, hashcode, hash->table_size); + } + } + } +} +#else + +#define sanity_check(HASH) do {}while(0) + +#endif + +static void +do_rehash (GHashTable *hash) +{ + int current_size, i; + Slot **table; + + /* printf ("Resizing diff=%d slots=%d\n", hash->in_use - hash->last_rehash, hash->table_size); */ + hash->last_rehash = hash->table_size; + current_size = hash->table_size; + hash->table_size = g_spaced_primes_closest (hash->in_use); + /* printf ("New size: %d\n", hash->table_size); */ + table = hash->table; + hash->table = g_new0 (Slot *, hash->table_size); + + for (i = 0; i < current_size; i++){ + Slot *s, *next; + + for (s = table [i]; s != NULL; s = next){ + guint hashcode = ((*hash->hash_func) (s->key)) % hash->table_size; + next = s->next; + + s->next = hash->table [hashcode]; + hash->table [hashcode] = s; + } + } + g_free (table); +} + +static void +rehash (GHashTable *hash) +{ + int diff = ABS (hash->last_rehash - hash->in_use); + + /* These are the factors to play with to change the rehashing strategy */ + /* I played with them with a large range, and could not really get */ + /* something that was too good, maybe the tests are not that great */ + if (!(diff * 0.75 > hash->table_size * 2)) + return; + do_rehash (hash); + sanity_check (hash); +} + +void +g_hash_table_insert_replace (GHashTable *hash, gpointer key, gpointer value, gboolean replace) +{ + guint hashcode; + Slot *s; + GEqualFunc equal; + + g_return_if_fail (hash != NULL); + sanity_check (hash); + + equal = hash->key_equal_func; + if (hash->in_use >= hash->threshold) + rehash (hash); + + hashcode = ((*hash->hash_func) (key)) % hash->table_size; + for (s = hash->table [hashcode]; s != NULL; s = s->next){ + if ((*equal) (s->key, key)){ + if (replace){ + if (hash->key_destroy_func != NULL) + (*hash->key_destroy_func)(s->key); + s->key = key; + } + if (hash->value_destroy_func != NULL) + (*hash->value_destroy_func) (s->value); + s->value = value; + sanity_check (hash); + return; + } + } + s = g_new (Slot, 1); + s->key = key; + s->value = value; + s->next = hash->table [hashcode]; + hash->table [hashcode] = s; + hash->in_use++; + sanity_check (hash); +} + +guint +g_hash_table_size (GHashTable *hash) +{ + g_return_val_if_fail (hash != NULL, 0); + + return hash->in_use; +} + +gpointer +g_hash_table_lookup (GHashTable *hash, gconstpointer key) +{ + gpointer orig_key, value; + + if (g_hash_table_lookup_extended (hash, key, &orig_key, &value)) + return value; + else + return NULL; +} + +gboolean +g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value) +{ + GEqualFunc equal; + Slot *s; + guint hashcode; + + g_return_val_if_fail (hash != NULL, FALSE); + sanity_check (hash); + equal = hash->key_equal_func; + + hashcode = ((*hash->hash_func) (key)) % hash->table_size; + + for (s = hash->table [hashcode]; s != NULL; s = s->next){ + if ((*equal)(s->key, key)){ + *orig_key = s->key; + *value = s->value; + return TRUE; + } + } + return FALSE; +} + +void +g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data) +{ + int i; + + g_return_if_fail (hash != NULL); + g_return_if_fail (func != NULL); + + for (i = 0; i < hash->table_size; i++){ + Slot *s; + + for (s = hash->table [i]; s != NULL; s = s->next) + (*func)(s->key, s->value, user_data); + } +} + +gpointer +g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data) +{ + int i; + + g_return_val_if_fail (hash != NULL, NULL); + g_return_val_if_fail (predicate != NULL, NULL); + + for (i = 0; i < hash->table_size; i++){ + Slot *s; + + for (s = hash->table [i]; s != NULL; s = s->next) + if ((*predicate)(s->key, s->value, user_data)) + return s->value; + } + return NULL; +} + +gboolean +g_hash_table_remove (GHashTable *hash, gconstpointer key) +{ + GEqualFunc equal; + Slot *s, *last; + guint hashcode; + + g_return_val_if_fail (hash != NULL, FALSE); + sanity_check (hash); + equal = hash->key_equal_func; + + hashcode = ((*hash->hash_func)(key)) % hash->table_size; + last = NULL; + for (s = hash->table [hashcode]; s != NULL; s = s->next){ + if ((*equal)(s->key, key)){ + if (hash->key_destroy_func != NULL) + (*hash->key_destroy_func)(s->key); + if (hash->value_destroy_func != NULL) + (*hash->value_destroy_func)(s->value); + if (last == NULL) + hash->table [hashcode] = s->next; + else + last->next = s->next; + g_free (s); + hash->in_use--; + sanity_check (hash); + return TRUE; + } + last = s; + } + sanity_check (hash); + return FALSE; +} + +guint +g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data) +{ + int i; + int count = 0; + + g_return_val_if_fail (hash != NULL, 0); + g_return_val_if_fail (func != NULL, 0); + + sanity_check (hash); + for (i = 0; i < hash->table_size; i++){ + Slot *s, *last; + + last = NULL; + for (s = hash->table [i]; s != NULL; ){ + if ((*func)(s->key, s->value, user_data)){ + Slot *n; + + if (hash->key_destroy_func != NULL) + (*hash->key_destroy_func)(s->key); + if (hash->value_destroy_func != NULL) + (*hash->value_destroy_func)(s->value); + if (last == NULL){ + hash->table [i] = s->next; + n = s->next; + } else { + last->next = s->next; + n = last->next; + } + g_free (s); + hash->in_use--; + count++; + s = n; + } else { + last = s; + s = s->next; + } + } + } + sanity_check (hash); + if (count > 0) + rehash (hash); + return count; +} + +guint +g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data) +{ + int i; + int count = 0; + + g_return_val_if_fail (hash != NULL, 0); + g_return_val_if_fail (func != NULL, 0); + + sanity_check (hash); + for (i = 0; i < hash->table_size; i++){ + Slot *s, *last; + + last = NULL; + for (s = hash->table [i]; s != NULL; ){ + if ((*func)(s->key, s->value, user_data)){ + Slot *n; + + if (last == NULL){ + hash->table [i] = s->next; + n = s->next; + } else { + last->next = s->next; + n = last->next; + } + g_free (s); + hash->in_use--; + count++; + s = n; + } else { + last = s; + s = s->next; + } + } + } + sanity_check (hash); + if (count > 0) + rehash (hash); + return count; +} + +void +g_hash_table_destroy (GHashTable *hash) +{ + int i; + + g_return_if_fail (hash != NULL); + + for (i = 0; i < hash->table_size; i++){ + Slot *s, *next; + + for (s = hash->table [i]; s != NULL; s = next){ + next = s->next; + + if (hash->key_destroy_func != NULL) + (*hash->key_destroy_func)(s->key); + if (hash->value_destroy_func != NULL) + (*hash->value_destroy_func)(s->value); + g_free (s); + } + } + g_free (hash->table); + + g_free (hash); +} + +void +g_hash_table_print_stats (GHashTable *table) +{ + int i, max_chain_index, chain_size, max_chain_size; + Slot *node; + + max_chain_size = 0; + max_chain_index = -1; + for (i = 0; i < table->table_size; i++) { + chain_size = 0; + for (node = table->table [i]; node; node = node->next) + chain_size ++; + if (chain_size > max_chain_size) { + max_chain_size = chain_size; + max_chain_index = i; + } + } + + printf ("Size: %d Table Size: %d Max Chain Length: %d at %d\n", table->in_use, table->table_size, max_chain_size, max_chain_index); +} + +gboolean +g_direct_equal (gconstpointer v1, gconstpointer v2) +{ + return v1 == v2; +} + +guint +g_direct_hash (gconstpointer v1) +{ + return GPOINTER_TO_UINT (v1); +} + +gboolean +g_int_equal (gconstpointer v1, gconstpointer v2) +{ + return GPOINTER_TO_INT (v1) == GPOINTER_TO_INT (v2); +} + +guint +g_int_hash (gconstpointer v1) +{ + return GPOINTER_TO_UINT(v1); +} + +gboolean +g_str_equal (gconstpointer v1, gconstpointer v2) +{ + return strcmp (v1, v2) == 0; +} + +guint +g_str_hash (gconstpointer v1) +{ + guint hash = 0; + char *p = (char *) v1; + + while (*p++) + hash = (hash << 5) - (hash + *p); + + return hash; +} diff --git a/eglib/src/glib.h b/eglib/src/glib.h new file mode 100644 index 0000000000..78bba09590 --- /dev/null +++ b/eglib/src/glib.h @@ -0,0 +1,920 @@ +#ifndef __GLIB_H +#define __GLIB_H + +#include <stdarg.h> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <stddef.h> +#include <ctype.h> +#include <limits.h> + +#ifdef _MSC_VER +#pragma include_alias(<eglib-config.h>, <eglib-config.hw>) +#else +#include <stdint.h> +/* For pid_t */ +#ifndef WIN32 +#include <unistd.h> +#endif +#endif + +#include <eglib-config.h> +#ifndef EGLIB_NO_REMAP +#include <eglib-remap.h> +#endif + +#ifndef offsetof +# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name) +#endif + +#define __EGLIB_X11 1 + +#ifdef __cplusplus +#define G_BEGIN_DECLS extern "C" { +#define G_END_DECLS } +#else +#define G_BEGIN_DECLS +#define G_END_DECLS +#endif + +G_BEGIN_DECLS + +/* + * Basic data types + */ +typedef int gint; +typedef unsigned int guint; +typedef short gshort; +typedef unsigned short gushort; +typedef long glong; +typedef unsigned long gulong; +typedef void * gpointer; +typedef const void * gconstpointer; +typedef char gchar; +typedef unsigned char guchar; + +#if !G_TYPES_DEFINED +#ifdef _MSC_VER +typedef __int8 gint8; +typedef unsigned __int8 guint8; +typedef __int16 gint16; +typedef unsigned __int16 guint16; +typedef __int32 gint32; +typedef unsigned __int32 guint32; +typedef __int64 gint64; +typedef unsigned __int64 guint64; +typedef float gfloat; +typedef double gdouble; +typedef unsigned __int16 gunichar2; +typedef int gboolean; +#else +/* Types defined in terms of the stdint.h */ +typedef int8_t gint8; +typedef uint8_t guint8; +typedef int16_t gint16; +typedef uint16_t guint16; +typedef int32_t gint32; +typedef uint32_t guint32; +typedef int64_t gint64; +typedef uint64_t guint64; +typedef float gfloat; +typedef double gdouble; +typedef uint16_t gunichar2; +typedef int32_t gboolean; +#endif +#endif + + +/* + * Macros + */ +#define G_N_ELEMENTS(s) (sizeof(s) / sizeof ((s) [0])) + +#define FALSE 0 +#define TRUE 1 + +#define G_MAXINT INT_MAX +#define G_MININT INT_MIN +#define G_MAXINT32 INT32_MAX +#define G_MININT32 INT32_MIN +#define G_MININT64 INT64_MIN +#define G_MAXINT64 INT64_MAX +#define G_MAXUINT64 UINT64_MAX + +#define G_LITTLE_ENDIAN 1234 +#define G_BIG_ENDIAN 4321 +#define G_STMT_START do +#define G_STMT_END while (0) + +#define G_USEC_PER_SEC 1000000 + +#define ABS(a) ((a) > 0 ? (a) : -(a)) + +#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field) + +#define EGLIB_STRINGIFY(x) #x +#define EGLIB_TOSTRING(x) EGLIB_STRINGIFY(x) +#define G_STRLOC __FILE__ ":" EGLIB_TOSTRING(__LINE__) ":" + +#define G_CONST_RETURN const + +/* + * Allocation + */ +void g_free (void *ptr); +static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return realloc (obj, size);} +static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;} +static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;} +#define g_try_malloc(x) g_malloc(x) +#define g_try_realloc(obj,size) g_realloc((obj),(size)) + +#define g_new(type,size) ((type *) g_malloc (sizeof (type) * (size))) +#define g_new0(type,size) ((type *) g_malloc0 (sizeof (type)* (size))) +#define g_newa(type,size) ((type *) alloca (sizeof (type) * (size))) + +#define g_memmove(dest,src,len) memmove (dest, src, len) +#define g_renew(struct_type, mem, n_structs) g_realloc (mem, sizeof (struct_type) * n_structs) +#define g_alloca(size) alloca (size) + +gpointer g_memdup (gconstpointer mem, guint byte_size); +static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; } +gchar **g_strdupv (gchar **str_array); + +typedef struct { + gpointer (*malloc) (gsize n_bytes); + gpointer (*realloc) (gpointer mem, gsize n_bytes); + void (*free) (gpointer mem); + gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes); + gpointer (*try_malloc) (gsize n_bytes); + gpointer (*try_realloc) (gpointer mem, gsize n_bytes); +} GMemVTable; + +#define g_mem_set_vtable(x) + +struct _GMemChunk { + guint alloc_size; +}; + +typedef struct _GMemChunk GMemChunk; +/* + * Misc. + */ +#define g_atexit(func) ((void) atexit (func)) + +const gchar * g_getenv(const gchar *variable); +gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite); +void g_unsetenv(const gchar *variable); + +gchar* g_win32_getlocale(void); + +/* + * Precondition macros + */ +#define g_return_if_fail(x) G_STMT_START { if (!(x)) { g_critical ("%s:%d: assertion '%s' failed", __FILE__, __LINE__, #x); return; } } G_STMT_END +#define g_return_val_if_fail(x,e) G_STMT_START { if (!(x)) { g_critical ("%s:%d: assertion '%s' failed", __FILE__, __LINE__, #x); return (e); } } G_STMT_END + +/* + * Hashtables + */ +typedef struct _GHashTable GHashTable; +typedef void (*GFunc) (gpointer data, gpointer user_data); +typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data); +typedef void (*GHFunc) (gpointer key, gpointer value, gpointer user_data); +typedef gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data); +typedef void (*GDestroyNotify) (gpointer data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b); +typedef void (*GFreeFunc) (gpointer data); + +GHashTable *g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func); +GHashTable *g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func); +void g_hash_table_insert_replace (GHashTable *hash, gpointer key, gpointer value, gboolean replace); +guint g_hash_table_size (GHashTable *hash); +gpointer g_hash_table_lookup (GHashTable *hash, gconstpointer key); +gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value); +void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data); +gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data); +gboolean g_hash_table_remove (GHashTable *hash, gconstpointer key); +guint g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data); +guint g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data); +void g_hash_table_destroy (GHashTable *hash); +void g_hash_table_print_stats (GHashTable *table); + +guint g_spaced_primes_closest (guint x); + +#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE) +#define g_hash_table_replace(h,k,v) g_hash_table_insert_replace ((h),(k),(v),TRUE) + +gboolean g_direct_equal (gconstpointer v1, gconstpointer v2); +guint g_direct_hash (gconstpointer v1); +gboolean g_int_equal (gconstpointer v1, gconstpointer v2); +guint g_int_hash (gconstpointer v1); +gboolean g_str_equal (gconstpointer v1, gconstpointer v2); +guint g_str_hash (gconstpointer v1); + +#define g_assert(x) G_STMT_START { if (!(x)) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END +#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); } G_STMT_END + +/* + * Errors + */ +typedef struct { + /* In the real glib, this is a GQuark, but we dont use/need that */ + gpointer domain; + gint code; + gchar *message; +} GError; + +void g_clear_error (GError **error); +void g_error_free (GError *error); +GError *g_error_new (gpointer domain, gint code, const char *format, ...); +void g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...); +void g_propagate_error (GError **dest, GError *src); + +/* + * Strings utility + */ +gchar *g_strdup_printf (const gchar *format, ...); +gchar *g_strdup_vprintf (const gchar *format, va_list args); +gchar *g_strndup (const gchar *str, gsize n); +const gchar *g_strerror (gint errnum); +gchar *g_strndup (const gchar *str, gsize n); +void g_strfreev (gchar **str_array); +gchar *g_strconcat (const gchar *first, ...); +gchar **g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens); +gchar **g_strsplit_set (const gchar *string, const gchar *delimiter, gint max_tokens); +gchar *g_strreverse (gchar *str); +gboolean g_str_has_prefix (const gchar *str, const gchar *prefix); +gboolean g_str_has_suffix (const gchar *str, const gchar *suffix); +guint g_strv_length (gchar **str_array); +gchar *g_strjoin (const gchar *separator, ...); +gchar *g_strjoinv (const gchar *separator, gchar **str_array); +gchar *g_strchug (gchar *str); +gchar *g_strchomp (gchar *str); +void g_strdown (gchar *string); +gchar *g_strnfill (gsize length, gchar fill_char); + +gchar *g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter); +gchar *g_strescape (const gchar *source, const gchar *exceptions); + +gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error); +gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error); + +gint g_printf (gchar const *format, ...); +gint g_fprintf (FILE *file, gchar const *format, ...); +gint g_sprintf (gchar *string, gchar const *format, ...); +gint g_snprintf (gchar *string, gulong n, gchar const *format, ...); +#define g_vprintf vprintf +#define g_vfprintf vfprintf +#define g_vsprintf vsprintf +#define g_vsnprintf vsnprintf +#define g_vasprintf vasprintf + +gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size); + +gchar g_ascii_tolower (gchar c); +gchar *g_ascii_strdown (const gchar *str, gssize len); +gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n); +gint g_ascii_xdigit_value (gchar c); +#define g_ascii_isspace(c) (isspace (c) != 0) +#define g_ascii_isalpha(c) (isalpha (c) != 0) +#define g_ascii_isprint(c) (isprint (c) != 0) +#define g_ascii_isxdigit(c) (isxdigit (c) != 0) + +/* FIXME: g_strcasecmp supports utf8 unicode stuff */ +#ifdef _MSC_VER +#define g_strcasecmp stricmp +#define g_ascii_strcasecmp stricmp +#define g_strncasecmp strnicmp +#define g_strstrip(a) g_strchug (g_strchomp (a)) +#else +#define g_strcasecmp strcasecmp +#define g_ascii_strcasecmp strcasecmp +#define g_ascii_strtoull strtoull +#define g_strncasecmp strncasecmp +#define g_strstrip(a) g_strchug (g_strchomp (a)) +#endif + + +#define G_STR_DELIMITERS "_-|> <." + +/* + * String type + */ +typedef struct { + char *str; + gsize len; + gsize allocated_len; +} GString; + +GString *g_string_new (const gchar *init); +GString *g_string_new_len (const gchar *init, gssize len); +GString *g_string_sized_new (gsize default_size); +gchar *g_string_free (GString *string, gboolean free_segment); +GString *g_string_append (GString *string, const gchar *val); +void g_string_printf (GString *string, const gchar *format, ...); +void g_string_append_printf (GString *string, const gchar *format, ...); +GString *g_string_append_c (GString *string, gchar c); +GString *g_string_append (GString *string, const gchar *val); +GString *g_string_append_len (GString *string, const gchar *val, gssize len); +GString *g_string_truncate (GString *string, gsize len); +GString *g_string_prepend (GString *string, const gchar *val); + +#define g_string_sprintfa g_string_append_printf + +/* + * Lists + */ +typedef struct _GSList GSList; +struct _GSList { + gpointer data; + GSList *next; +}; + +GSList *g_slist_alloc (void); +GSList *g_slist_append (GSList *list, + gpointer data); +GSList *g_slist_prepend (GSList *list, + gpointer data); +void g_slist_free (GSList *list); +void g_slist_free_1 (GSList *list); +GSList *g_slist_copy (GSList *list); +GSList *g_slist_concat (GSList *list1, + GSList *list2); +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GSList *g_slist_last (GSList *list); +GSList *g_slist_find (GSList *list, + gconstpointer data); +GSList *g_slist_find_custom (GSList *list, + gconstpointer data, + GCompareFunc func); +GSList *g_slist_remove (GSList *list, + gconstpointer data); +GSList *g_slist_remove_all (GSList *list, + gconstpointer data); +GSList *g_slist_reverse (GSList *list); +guint g_slist_length (GSList *list); +GSList *g_slist_remove_link (GSList *list, + GSList *link); +GSList *g_slist_delete_link (GSList *list, + GSList *link); +GSList *g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func); +GSList *g_slist_insert_before (GSList *list, + GSList *sibling, + gpointer data); +GSList *g_slist_sort (GSList *list, + GCompareFunc func); +gint g_slist_index (GSList *list, + gconstpointer data); +GSList *g_slist_nth (GSList *list, + guint n); +gpointer g_slist_nth_data (GSList *list, + guint n); + +#define g_slist_next(slist) ((slist) ? (((GSList *) (slist))->next) : NULL) + + +typedef struct _GList GList; +struct _GList { + gpointer data; + GList *next; + GList *prev; +}; + +#define g_list_next(list) ((list) ? (((GList *) (list))->next) : NULL) +#define g_list_previous(list) ((list) ? (((GList *) (list))->prev) : NULL) + +GList *g_list_alloc (void); +GList *g_list_append (GList *list, + gpointer data); +GList *g_list_prepend (GList *list, + gpointer data); +void g_list_free (GList *list); +void g_list_free_1 (GList *list); +GList *g_list_copy (GList *list); +guint g_list_length (GList *list); +gint g_list_index (GList *list, + gconstpointer data); +GList *g_list_nth (GList *list, + guint n); +gpointer g_list_nth_data (GList *list, + guint n); +GList *g_list_last (GList *list); +GList *g_list_concat (GList *list1, + GList *list2); +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GList *g_list_first (GList *list); +GList *g_list_find (GList *list, + gconstpointer data); +GList *g_list_find_custom (GList *list, + gconstpointer data, + GCompareFunc func); +GList *g_list_remove (GList *list, + gconstpointer data); +GList *g_list_reverse (GList *list); +GList *g_list_remove_link (GList *list, + GList *link); +GList *g_list_delete_link (GList *list, + GList *link); +GList *g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func); +GList *g_list_insert_before (GList *list, + GList *sibling, + gpointer data); +GList *g_list_sort (GList *sort, + GCompareFunc func); + +/* + * Array + */ + +typedef struct _GArray GArray; +struct _GArray { + gchar *data; + gint len; +}; + +GArray *g_array_new (gboolean zero_terminated, gboolean clear_, guint element_size); +gchar* g_array_free (GArray *array, gboolean free_segment); +GArray *g_array_append_vals (GArray *array, gconstpointer data, guint len); +GArray* g_array_insert_vals (GArray *array, guint index_, gconstpointer data, guint len); +GArray* g_array_remove_index (GArray *array, guint index_); +GArray* g_array_remove_index_fast (GArray *array, guint index_); + +#define g_array_append_val(a,v) (g_array_append_vals((a),&(v),1)) +#define g_array_insert_val(a,i,v) (g_array_insert_vals((a),(i),&(v),1)) +#define g_array_index(a,t,i) *(t*)(((a)->data) + sizeof(t) * (i)) + +/* + * Pointer Array + */ + +typedef struct _GPtrArray GPtrArray; +struct _GPtrArray { + gpointer *pdata; + guint len; +}; + +GPtrArray *g_ptr_array_new (void); +GPtrArray *g_ptr_array_sized_new (guint reserved_size); +void g_ptr_array_add (GPtrArray *array, gpointer data); +gboolean g_ptr_array_remove (GPtrArray *array, gpointer data); +gpointer g_ptr_array_remove_index (GPtrArray *array, guint index); +gboolean g_ptr_array_remove_fast (GPtrArray *array, gpointer data); +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, guint index); +void g_ptr_array_sort (GPtrArray *array, GCompareFunc compare_func); +void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare_func, gpointer user_data); +void g_ptr_array_set_size (GPtrArray *array, gint length); +gpointer *g_ptr_array_free (GPtrArray *array, gboolean free_seg); +void g_ptr_array_foreach (GPtrArray *array, GFunc func, gpointer user_data); +#define g_ptr_array_index(array,index) (array)->pdata[(index)] + +/* + * Queues + */ +typedef struct { + GList *head; + GList *tail; + guint length; +} GQueue; + +gpointer g_queue_pop_head (GQueue *queue); +void g_queue_push_head (GQueue *queue, + gpointer data); +void g_queue_push_tail (GQueue *queue, + gpointer data); +gboolean g_queue_is_empty (GQueue *queue); +GQueue *g_queue_new (void); +void g_queue_free (GQueue *queue); + +/* + * Messages + */ +#ifndef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((gchar*) 0) +#endif + +typedef enum { + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + G_LOG_LEVEL_ERROR = 1 << 2, + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + +void g_print (const gchar *format, ...); +void g_printerr (const gchar *format, ...); +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask); +void g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args); +void g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, ...); +void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN; + +#ifdef HAVE_C99_SUPPORT +/* The for (;;) tells gc thats g_error () doesn't return, avoiding warnings */ +#define g_error(format, ...) do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, __VA_ARGS__); for (;;); } while (0) +#define g_critical(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, __VA_ARGS__) +#define g_warning(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, __VA_ARGS__) +#define g_message(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, __VA_ARGS__) +#define g_debug(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, __VA_ARGS__) +#else /* HAVE_C99_SUPPORT */ +#define g_error(...) do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, __VA_ARGS__); for (;;); } while (0) +#define g_critical(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, __VA_ARGS__) +#define g_warning(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, __VA_ARGS__) +#define g_message(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, __VA_ARGS__) +#define g_debug(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, __VA_ARGS__) +#endif /* ndef HAVE_C99_SUPPORT */ +#define g_log_set_handler(a,b,c,d) + +/* + * Conversions + */ + +gpointer g_convert_error_quark(void); + + +/* + * Unicode Manipulation: most of this is not used by Mono by default, it is + * only used if the old collation code is activated, so this is only the + * bare minimum to build. + */ +typedef guint32 gunichar; + +typedef enum { + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_COMBINING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; + +gunichar g_unichar_toupper (gunichar c); +gunichar g_unichar_tolower (gunichar c); +gunichar g_unichar_totitle (gunichar c); +GUnicodeType g_unichar_type (gunichar c); +gboolean g_unichar_isxdigit (gunichar c); +gint g_unichar_xdigit_value (gunichar c); + +#ifndef MAX +#define MAX(a,b) (((a)>(b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN(a,b) (((a)<(b)) ? (a) : (b)) +#endif + +#ifndef CLAMP +#define CLAMP(a,low,high) (((a) < (low)) ? (low) : (((a) > (high)) ? (high) : (a))) +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2) +#define G_LIKELY(expr) (__builtin_expect ((expr) != 0, 1)) +#define G_UNLIKELY(expr) (__builtin_expect ((expr) != 0, 0)) +#else +#define G_LIKELY(x) (x) +#define G_UNLIKELY(x) (x) +#endif + +/* + * Unicode conversion + */ + +#define G_CONVERT_ERROR g_convert_error_quark() + +typedef enum { + G_CONVERT_ERROR_NO_CONVERSION, + G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH +} GConvertError; + +gchar* g_utf8_strup (const gchar *str, gssize len); +gchar* g_utf8_strdown (const gchar *str, gssize len); +gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error); +gchar *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error); +gunichar2 *g_ucs4_to_utf16 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **error); +gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error); + +#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL) + +#ifdef G_OS_WIN32 +#define u16to8(str) g_utf16_to_utf8(str, (glong)wcslen(str), NULL, NULL, NULL) +#else +#define u16to8(str) g_utf16_to_utf8(str, (glong)strlen(str), NULL, NULL, NULL) +#endif + +/* + * Path + */ +gchar *g_build_path (const gchar *separator, const gchar *first_element, ...); +#define g_build_filename(x, ...) g_build_path(G_DIR_SEPARATOR_S, x, __VA_ARGS__) +gchar *g_path_get_dirname (const gchar *filename); +gchar *g_path_get_basename (const char *filename); +gchar *g_find_program_in_path (const gchar *program); +gchar *g_get_current_dir (void); +gboolean g_path_is_absolute (const char *filename); + +const gchar *g_get_home_dir (void); +const gchar *g_get_tmp_dir (void); +const gchar *g_get_user_name (void); +gchar *g_get_prgname (void); +void g_set_prgname (const gchar *prgname); + +/* + * Shell + */ + +gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error); +gchar *g_shell_unquote (const gchar *quoted_string, GError **error); +gchar *g_shell_quote (const gchar *unquoted_string); + +/* + * Spawn + */ +typedef enum { + G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1, + G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, + G_SPAWN_SEARCH_PATH = 1 << 2, + G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, + G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, + G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 +} GSpawnFlags; + +typedef pid_t GPid; + +typedef void (*GSpawnChildSetupFunc) (gpointer user_data); + +gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error); +gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, + gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error); + + +/* + * Timer + */ +typedef struct _GTimer GTimer; + +GTimer *g_timer_new (void); +void g_timer_destroy (GTimer *timer); +gdouble g_timer_elapsed (GTimer *timer, gulong *microseconds); +void g_timer_stop (GTimer *timer); +void g_timer_start (GTimer *timer); + +/* + * Date and time + */ +typedef struct { + glong tv_sec; + glong tv_usec; +} GTimeVal; + +void g_get_current_time (GTimeVal *result); +void g_usleep (gulong microseconds); + +/* + * File + */ + +typedef enum { + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_BADF, + G_FILE_ERROR_INVAL, + G_FILE_ERROR_PIPE, + G_FILE_ERROR_AGAIN, + G_FILE_ERROR_INTR, + G_FILE_ERROR_IO, + G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, + G_FILE_ERROR_FAILED +} GFileError; + +typedef enum { + G_FILE_TEST_IS_REGULAR = 1 << 0, + G_FILE_TEST_IS_SYMLINK = 1 << 1, + G_FILE_TEST_IS_DIR = 1 << 2, + G_FILE_TEST_IS_EXECUTABLE = 1 << 3, + G_FILE_TEST_EXISTS = 1 << 4 +} GFileTest; + + +gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error); +GFileError g_file_error_from_errno (gint err_no); +gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error); +gboolean g_file_test (const gchar *filename, GFileTest test); + +/* + * Pattern matching + */ +typedef struct _GPatternSpec GPatternSpec; +GPatternSpec * g_pattern_spec_new (const gchar *pattern); +void g_pattern_spec_free (GPatternSpec *pspec); +gboolean g_pattern_match_string (GPatternSpec *pspec, const gchar *string); + +/* + * Directory + */ +typedef struct _GDir GDir; +GDir *g_dir_open (const gchar *path, guint flags, GError **error); +const gchar *g_dir_read_name (GDir *dir); +void g_dir_rewind (GDir *dir); +void g_dir_close (GDir *dir); +#define g_mkdir mkdir + +/* + * GMarkup + */ +typedef struct _GMarkupParseContext GMarkupParseContext; + +typedef enum +{ + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, + G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1 +} GMarkupParseFlags; + +typedef struct { + void (*start_element) (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + + void (*end_element) (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + + void (*text) (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + + void (*passthrough) (GMarkupParseContext *context, + const gchar *passthrough_text, + gsize text_len, + gpointer user_data, + GError **error); + void (*error) (GMarkupParseContext *context, + GError *error, + gpointer user_data); +} GMarkupParser; + +GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify); +void g_markup_parse_context_free (GMarkupParseContext *context); +gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, gssize text_len, + GError **error); +gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, + GError **error); + +/* + * Character set conversion + */ +/* +* Index into the table below with the first byte of a UTF-8 sequence to +* get the number of trailing bytes that are supposed to follow it. +* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is +* left as-is for anyone who may want to do such conversion, which was +* allowed in earlier algorithms. +*/ +extern const gchar g_trailingBytesForUTF8[256]; + +gboolean g_get_charset (G_CONST_RETURN char **charset); +gchar *g_locale_to_utf8 (const gchar *opsysstring, gssize len, + gsize *bytes_read, gsize *bytes_written, + GError **error); +gchar *g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, + gsize *bytes_written, GError **error); +gchar *g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, + gsize *bytes_written, GError **error); +gchar *g_convert (const gchar *str, gssize len, + const gchar *to_codeset, const gchar *from_codeset, + gsize *bytes_read, gsize *bytes_written, GError **error); +gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **end); +gunichar g_utf8_get_char (const gchar *src); +glong g_utf8_strlen (const gchar *str, gssize max); +#define g_utf8_next_char(p) p + (g_trailingBytesForUTF8[(guchar)(*p)] + 1) + +/* + * Empty thread functions, not used by eglib + */ +#define g_thread_supported() TRUE +#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END + +#define G_LOCK_DEFINE(name) int name; +#define G_LOCK_DEFINE_STATIC(name) static int name; +#define G_LOCK_EXTERN(name) +#define G_LOCK(name) +#define G_TRYLOCK(name) +#define G_UNLOCK(name) + +#define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8))) + +#define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8)) +#define GUINT32_SWAP_LE_BE(x) ((guint32) \ + ( (((guint32) (x)) << 24)| \ + ((((guint32) (x)) & 0xff0000) >> 8) | \ + ((((guint32) (x)) & 0xff00) << 8) | \ + (((guint32) (x)) >> 24)) ) + +#define GUINT64_SWAP_LE_BE(x) ((guint64) (((guint64)(GUINT32_SWAP_LE_BE(((guint64)x) & 0xffffffff))) << 32) | \ + GUINT32_SWAP_LE_BE(((guint64)x) >> 32)) + + + +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +# define GUINT32_TO_LE(x) (x) +# define GUINT64_TO_LE(x) (x) +# define GUINT16_TO_LE(x) (x) +# define GUINT_TO_LE(x) (x) +# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x) +#else +# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x) +# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x) +# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT32_TO_BE(x) (x) +# define GUINT32_FROM_BE(x) (x) +#endif + +#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x)) +#define GUINT64_FROM_LE(x) (GUINT64_TO_LE (x)) +#define GUINT16_FROM_LE(x) (GUINT16_TO_LE (x)) +#define GUINT_FROM_LE(x) (GUINT_TO_LE (x)) + +#define _EGLIB_MAJOR 2 +#define _EGLIB_MIDDLE 4 +#define _EGLIB_MINOR 0 + +#define GLIB_CHECK_VERSION(a,b,c) ((a < _EGLIB_MAJOR) || (a == _EGLIB_MAJOR && (b < _EGLIB_MIDDLE || (b == _EGLIB_MIDDLE && c <= _EGLIB_MINOR)))) + +G_END_DECLS + +#endif + + + diff --git a/eglib/src/glist.c b/eglib/src/glist.c new file mode 100644 index 0000000000..0e5eb3ac4d --- /dev/null +++ b/eglib/src/glist.c @@ -0,0 +1,326 @@ +/* + * glist.c: Doubly-linked list implementation + * + * Authors: + * Duncan Mak (duncan@novell.com) + * Raja R Harinath (rharinath@novell.com) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * (C) 2006 Novell, Inc. + */ +#include <stdio.h> +#include <glib.h> + +GList* +g_list_alloc () +{ + return g_new0 (GList, 1); +} + +static inline GList* +new_node (GList *prev, gpointer data, GList *next) +{ + GList *node = g_list_alloc (); + node->data = data; + node->prev = prev; + node->next = next; + if (prev) + prev->next = node; + if (next) + next->prev = node; + return node; +} + +static inline GList* +disconnect_node (GList *node) +{ + if (node->next) + node->next->prev = node->prev; + if (node->prev) + node->prev->next = node->next; + return node; +} + +GList * +g_list_prepend (GList *list, gpointer data) +{ + return new_node (list ? list->prev : NULL, data, list); +} + +void +g_list_free_1 (GList *list) +{ + g_free (list); +} + +void +g_list_free (GList *list) +{ + while (list){ + GList *next = list->next; + g_list_free_1 (list); + list = next; + } +} + +GList* +g_list_append (GList *list, gpointer data) +{ + GList *node = new_node (g_list_last (list), data, NULL); + return list ? list : node; +} + +GList * +g_list_concat (GList *list1, GList *list2) +{ + if (list1 && list2) { + list2->prev = g_list_last (list1); + list2->prev->next = list2; + } + return list1 ? list1 : list2; +} + +guint +g_list_length (GList *list) +{ + guint length = 0; + + while (list) { + length ++; + list = list->next; + } + + return length; +} + +GList* +g_list_remove (GList *list, gconstpointer data) +{ + GList *current = g_list_find (list, data); + if (!current) + return list; + + if (current == list) + list = list->next; + g_list_free_1 (disconnect_node (current)); + + return list; +} + +GList* +g_list_remove_link (GList *list, GList *link) +{ + if (list == link) + list = list->next; + + disconnect_node (link); + link->next = NULL; + link->prev = NULL; + + return list; +} + +GList* +g_list_delete_link (GList *list, GList *link) +{ + list = g_list_remove_link (list, link); + g_list_free_1 (link); + + return list; +} + +GList* +g_list_find (GList *list, gconstpointer data) +{ + while (list){ + if (list->data == data) + return list; + + list = list->next; + } + + return NULL; +} + +GList* +g_list_find_custom (GList *list, gconstpointer data, GCompareFunc func) +{ + if (!func) + return NULL; + + while (list) { + if (func (list->data, data) == 0) + return list; + + list = list->next; + } + + return NULL; +} + +GList* +g_list_reverse (GList *list) +{ + GList *reverse = NULL; + + while (list) { + reverse = list; + list = reverse->next; + + reverse->next = reverse->prev; + reverse->prev = list; + } + + return reverse; +} + +GList* +g_list_first (GList *list) +{ + if (!list) + return NULL; + + while (list->prev) + list = list->prev; + + return list; +} + +GList* +g_list_last (GList *list) +{ + if (!list) + return NULL; + + while (list->next) + list = list->next; + + return list; +} + +GList* +g_list_insert_sorted (GList *list, gpointer data, GCompareFunc func) +{ + GList *prev = NULL; + GList *current; + GList *node; + + if (!func) + return list; + + /* Invariant: !prev || func (prev->data, data) <= 0) */ + for (current = list; current; current = current->next) { + if (func (current->data, data) > 0) + break; + prev = current; + } + + node = new_node (prev, data, current); + return list == current ? node : list; +} + +GList* +g_list_insert_before (GList *list, GList *sibling, gpointer data) +{ + if (sibling) { + GList *node = new_node (sibling->prev, data, sibling); + return list == sibling ? node : list; + } + return g_list_append (list, data); +} + +void +g_list_foreach (GList *list, GFunc func, gpointer user_data) +{ + while (list){ + (*func) (list->data, user_data); + list = list->next; + } +} + +gint +g_list_index (GList *list, gconstpointer data) +{ + gint index = 0; + + while (list){ + if (list->data == data) + return index; + + index ++; + list = list->next; + } + + return -1; +} + +GList* +g_list_nth (GList *list, guint n) +{ + for (; list; list = list->next) { + if (n == 0) + break; + n--; + } + return list; +} + +gpointer +g_list_nth_data (GList *list, guint n) +{ + GList *node = g_list_nth (list, n); + return node ? node->data : NULL; +} + +GList* +g_list_copy (GList *list) +{ + GList *copy = NULL; + + if (list) { + GList *tmp = new_node (NULL, list->data, NULL); + copy = tmp; + + for (list = list->next; list; list = list->next) + tmp = new_node (tmp, list->data, NULL); + } + + return copy; +} + +typedef GList list_node; +#include "sort.frag.h" + +GList* +g_list_sort (GList *list, GCompareFunc func) +{ + GList *current; + if (!list || !list->next) + return list; + list = do_sort (list, func); + + /* Fixup: do_sort doesn't update 'prev' pointers */ + list->prev = NULL; + for (current = list; current->next; current = current->next) + current->next->prev = current; + + return list; +} diff --git a/eglib/src/gmarkup.c b/eglib/src/gmarkup.c new file mode 100644 index 0000000000..ae7b4a24bf --- /dev/null +++ b/eglib/src/gmarkup.c @@ -0,0 +1,474 @@ +/* + * gmakrup.c: Minimal XML markup reader. + * + * Unlike the GLib one, this can not be restarted with more text + * as the Mono use does not require it. + * + * Actually, with further thought, I think that this could be made + * to restart very easily. The pos == end condition would mean + * "return to caller" and only at end parse this would be a fatal + * error. + * + * Not that it matters to Mono, but it is very simple to change, there + * is a tricky situation: there are a few places where we check p+n + * in the source, and that would have to change to be progressive, instead + * of depending on the string to be complete at that point, so we would + * have to introduce extra states to cope with that. + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <ctype.h> +#include <glib.h> + +#define set_error(msg, ...) do { if (error != NULL) *error = g_error_new (GINT_TO_POINTER (1), 1, msg, __VA_ARGS__); } while (0); + +typedef enum { + START, + START_ELEMENT, + TEXT, + FLUSH_TEXT, + CLOSING_ELEMENT, + COMMENT, + SKIP_XML_DECLARATION +} ParseState; + +struct _GMarkupParseContext { + GMarkupParser parser; + gpointer user_data; + GDestroyNotify user_data_dnotify; + ParseState state; + + /* Stores the name of the current element, so we can issue the end_element */ + GSList *level; + + GString *text; +}; + +GMarkupParseContext * +g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify) +{ + GMarkupParseContext *context = g_new0 (GMarkupParseContext, 1); + + context->parser = *parser; + context->user_data = user_data; + context->user_data_dnotify = user_data_dnotify; + + return context; +} + +void +g_markup_parse_context_free (GMarkupParseContext *context) +{ + GSList *l; + + g_return_if_fail (context != NULL); + + if (context->user_data_dnotify != NULL) + (context->user_data_dnotify) (context->user_data); + + if (context->text != NULL) + g_string_free (context->text, TRUE); + for (l = context->level; l; l = l->next) + g_free (l->data); + g_slist_free (context->level); + g_free (context); +} + +static gboolean +my_isspace (char c) +{ + if (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\v') + return TRUE; + return FALSE; +} + +static gboolean +my_isalnum (char c) +{ + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) + return TRUE; + if (c >= '0' && c <= '9') + return TRUE; + + return FALSE; +} + +static gboolean +my_isalpha (char c) +{ + if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) + return TRUE; + return FALSE; +} + +static const char * +skip_space (const char *p, const char *end) +{ + for (; p < end && my_isspace (*p); p++) + ; + return p; +} + +static const char * +parse_value (const char *p, const char *end, char **value, GError **error) +{ + const char *start; + int l; + + if (*p != '"'){ + set_error ("%s", "Expected the attribute value to start with a quote"); + return end; + } + start = ++p; + for (; p < end && *p != '"'; p++) + ; + if (p == end) + return end; + l = (int)(p - start); + p++; + *value = g_malloc (l + 1); + if (*value == NULL) + return end; + strncpy (*value, start, l); + (*value) [l] = 0; + return p; +} + +static const char * +parse_name (const char *p, const char *end, char **value) +{ + const char *start = p; + int l; + + for (; p < end && my_isalnum (*p); p++) + ; + if (p == end) + return end; + + l = (int)(p - start); + *value = g_malloc (l + 1); + if (*value == NULL) + return end; + strncpy (*value, start, l); + (*value) [l] = 0; + return p; +} + +static const char * +parse_attributes (const char *p, const char *end, char ***names, char ***values, GError **error, int *full_stop, int state) +{ + int nnames = 0; + + while (TRUE){ + p = skip_space (p, end); + if (p == end) + return end; + + if (*p == '>'){ + *full_stop = 0; + return p; + } + if (state == SKIP_XML_DECLARATION && *p == '?' && ((p+1) < end) && *(p+1) == '>'){ + *full_stop = 0; + return p+1; + } + + if (*p == '/' && ((p+1) < end && *(p+1) == '>')){ + *full_stop = 1; + return p+1; + } else { + char *name, *value; + + p = parse_name (p, end, &name); + if (p == end) + return p; + + p = skip_space (p, end); + if (p == end){ + g_free (name); + return p; + } + if (*p != '='){ + set_error ("Expected an = after the attribute name `%s'", name); + g_free (name); + return end; + } + p++; + p = skip_space (p, end); + if (p == end){ + g_free (name); + return end; + } + + p = parse_value (p, end, &value, error); + if (p == end){ + g_free (name); + return p; + } + + ++nnames; + *names = g_realloc (*names, sizeof (char **) * (nnames+1)); + *values = g_realloc (*values, sizeof (char **) * (nnames+1)); + (*names) [nnames-1] = name; + (*values) [nnames-1] = value; + (*names) [nnames] = NULL; + (*values) [nnames] = NULL; + } + } +} + +static void +destroy_parse_state (GMarkupParseContext *context) +{ + GSList *p; + + for (p = context->level; p != NULL; p = p->next) + g_free (p->data); + + g_slist_free (context->level); + if (context->text != NULL) + g_string_free (context->text, TRUE); + context->text = NULL; + context->level = NULL; +} + +gboolean +g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, gssize text_len, + GError **error) +{ + const char *p, *end; + + g_return_val_if_fail (context != NULL, FALSE); + g_return_val_if_fail (text != NULL, FALSE); + g_return_val_if_fail (text_len >= 0, FALSE); + + end = text + text_len; + + for (p = text; p < end; p++){ + char c = *p; + + switch (context->state){ + case START: + if (c == ' ' || c == '\t' || c == '\f' || c == '\n') + continue; + if (c == '<'){ + if (p+1 < end && p [1] == '?'){ + context->state = SKIP_XML_DECLARATION; + p++; + } else + context->state = START_ELEMENT; + continue; + } + set_error ("%s", "Expected < to start the document"); + goto fail; + + case SKIP_XML_DECLARATION: + case START_ELEMENT: { + const char *element_start = p, *element_end; + char *ename = NULL; + int full_stop = 0, l; + gchar **names = NULL, **values = NULL; + + for (; p < end && my_isspace (*p); p++) + ; + if (p == end){ + set_error ("%s", "Unfinished element"); + goto fail; + } + + if (*p == '!' && (p+2 < end) && (p [1] == '-') && (p [2] == '-')){ + context->state = COMMENT; + p += 2; + break; + } + + if (!my_isalpha (*p)){ + set_error ("%s", "Expected an element name"); + goto fail; + } + + for (++p; p < end && (my_isalnum (*p) || (*p == '.')); p++) + ; + if (p == end){ + set_error ("%s", "Expected an element"); + goto fail; + } + element_end = p; + + for (; p < end && my_isspace (*p); p++) + ; + if (p == end){ + set_error ("%s", "Unfinished element"); + goto fail; + } + p = parse_attributes (p, end, &names, &values, error, &full_stop, context->state); + if (p == end){ + if (names != NULL) { + g_strfreev (names); + g_strfreev (values); + } + /* Only set the error if parse_attributes did not */ + if (error != NULL && *error == NULL) + set_error ("%s", "Unfinished sequence"); + goto fail; + } + l = (int)(element_end - element_start); + ename = g_malloc (l + 1); + if (ename == NULL) + goto fail; + strncpy (ename, element_start, l); + ename [l] = 0; + + if (context->state == START_ELEMENT) + if (context->parser.start_element != NULL) + context->parser.start_element (context, ename, + (const gchar **) names, + (const gchar **) values, + context->user_data, error); + + if (names != NULL){ + g_strfreev (names); + g_strfreev (values); + } + + if (error != NULL && *error != NULL){ + g_free (ename); + goto fail; + } + + if (full_stop){ + if (context->parser.end_element != NULL && context->state == START_ELEMENT){ + context->parser.end_element (context, ename, context->user_data, error); + if (error != NULL && *error != NULL){ + free (ename); + goto fail; + } + } + g_free (ename); + } else { + context->level = g_slist_prepend (context->level, ename); + } + + context->state = TEXT; + break; + } /* case START_ELEMENT */ + + case TEXT: { + if (c == '<'){ + context->state = FLUSH_TEXT; + break; + } + if (context->parser.text != NULL){ + if (context->text == NULL) + context->text = g_string_new (""); + g_string_append_c (context->text, c); + } + break; + } + + case COMMENT: + if (*p != '-') + break; + if (p+2 < end && (p [1] == '-') && (p [2] == '>')){ + context->state = TEXT; + p += 2; + break; + } + break; + + case FLUSH_TEXT: + if (context->parser.text != NULL && context->text != NULL){ + context->parser.text (context, context->text->str, context->text->len, + context->user_data, error); + if (error != NULL && *error != NULL) + goto fail; + } + + if (c == '/') + context->state = CLOSING_ELEMENT; + else { + p--; + context->state = START_ELEMENT; + } + break; + + case CLOSING_ELEMENT: { + GSList *current = context->level; + char *text; + + if (context->level == NULL){ + set_error ("%s", "Too many closing tags, not enough open tags"); + goto fail; + } + + text = current->data; + if (context->parser.end_element != NULL){ + context->parser.end_element (context, text, context->user_data, error); + if (error != NULL && *error != NULL){ + g_free (text); + goto fail; + } + } + g_free (text); + + while (p < end && *p != '>') + p++; + + context->level = context->level->next; + g_slist_free_1 (current); + context->state = TEXT; + break; + } /* case CLOSING_ELEMENT */ + + } /* switch */ + } + + + return TRUE; + fail: + if (context->parser.error && error != NULL && *error) + context->parser.error (context, *error, context->user_data); + + destroy_parse_state (context); + return FALSE; +} + +gboolean +g_markup_parse_context_end_parse (GMarkupParseContext *context, GError **error) +{ + g_return_val_if_fail (context != NULL, FALSE); + + /* + * In our case, we always signal errors during parse, not at the end + * see the notes at the top of this file for details on how this + * could be moved here + */ + return TRUE; +} diff --git a/eglib/src/gmem.c b/eglib/src/gmem.c new file mode 100644 index 0000000000..beebd499e3 --- /dev/null +++ b/eglib/src/gmem.c @@ -0,0 +1,53 @@ +/* + * gmem.c: memory utility functions + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <string.h> +#include <glib.h> + +void +g_free (void *ptr) +{ + if (ptr != NULL) + free (ptr); +} + +gpointer +g_memdup (gconstpointer mem, guint byte_size) +{ + gpointer ptr; + + if (mem == NULL) + return NULL; + + ptr = g_malloc (byte_size); + if (ptr != NULL) + memcpy (ptr, mem, byte_size); + + return ptr; +} + diff --git a/eglib/src/gmisc-unix.c b/eglib/src/gmisc-unix.c new file mode 100644 index 0000000000..5d8cd2a739 --- /dev/null +++ b/eglib/src/gmisc-unix.c @@ -0,0 +1,134 @@ +/* + * gmisc.c: Misc functions with no place to go (right now) + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include <config.h> +#include <stdlib.h> +#include <glib.h> +#include <pthread.h> + +#ifdef HAVE_PWD_H +#include <pwd.h> +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + + +const gchar * +g_getenv(const gchar *variable) +{ + return getenv(variable); +} + +gboolean +g_setenv(const gchar *variable, const gchar *value, gboolean overwrite) +{ + return setenv(variable, value, overwrite) == 0; +} + +void +g_unsetenv(const gchar *variable) +{ + unsetenv(variable); +} + +gchar* +g_win32_getlocale(void) +{ + return NULL; +} + +gboolean +g_path_is_absolute (const char *filename) +{ + g_return_val_if_fail (filename != NULL, FALSE); + + return (*filename == '/'); +} + +static pthread_mutex_t home_lock = PTHREAD_MUTEX_INITIALIZER; +static const gchar *home_dir; + +/* Give preference to /etc/passwd than HOME */ +const gchar * +g_get_home_dir (void) +{ + if (home_dir == NULL){ + pthread_mutex_lock (&home_lock); + if (home_dir == NULL){ +#ifdef HAVE_GETPWUID_R + struct passwd pw; + struct passwd *result; + char buf [4096]; + + if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) + home_dir = g_strdup (pw.pw_dir); +#endif + if (home_dir == NULL) + home_dir = g_getenv ("HOME"); + } + pthread_mutex_unlock (&home_lock); + } + return home_dir; +} + +const char * +g_get_user_name (void) +{ + const char *retName = g_getenv ("USER"); + if (!retName) + retName = "somebody"; + return retName; +} + +static const char *tmp_dir; + +static pthread_mutex_t tmp_lock = PTHREAD_MUTEX_INITIALIZER; + +const gchar * +g_get_tmp_dir (void) +{ + if (tmp_dir == NULL){ + pthread_mutex_lock (&tmp_lock); + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TMPDIR"); + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TMP"); + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TEMP"); + if (tmp_dir == NULL) + tmp_dir = "/tmp"; + } + } + } + pthread_mutex_unlock (&tmp_lock); + } + return tmp_dir; +} + diff --git a/eglib/src/gmisc-win32.c b/eglib/src/gmisc-win32.c new file mode 100644 index 0000000000..8aa25a514b --- /dev/null +++ b/eglib/src/gmisc-win32.c @@ -0,0 +1,160 @@ +/* + * gmisc.c: Misc functions with no place to go (right now) + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include <stdlib.h> +#include <glib.h> + +#include <windows.h> +#include <direct.h> +#include <io.h> + +const gchar * +g_getenv(const gchar *variable) +{ + gunichar2 *var, *buffer; + gchar* val = NULL; + gint32 buffer_size = 1024; + gint32 retval; + var = u8to16(variable); + buffer = g_malloc(buffer_size*sizeof(gunichar2)); + retval = GetEnvironmentVariableW (var, buffer, buffer_size); + if (retval != 0) { + if (retval > buffer_size) { + g_free (buffer); + buffer_size = retval; + buffer = g_malloc(buffer_size*sizeof(gunichar2)); + retval = GetEnvironmentVariableW (var, buffer, buffer_size); + } + val = u16to8 (buffer); + } else { + if (GetLastError () != ERROR_ENVVAR_NOT_FOUND){ + val = g_malloc (1); + *val = 0; + } + } + g_free(var); + g_free(buffer); + return val; +} + +gboolean +g_setenv(const gchar *variable, const gchar *value, gboolean overwrite) +{ + gunichar2 *var, *val; + gboolean result; + var = u8to16(variable); + val = u8to16(value); + result = (SetEnvironmentVariableW(var, val) != 0) ? TRUE : FALSE; + g_free(var); + g_free(val); + return result; +} + +void +g_unsetenv(const gchar *variable) +{ + gunichar2 *var; + var = u8to16(variable); + SetEnvironmentVariableW(var, TEXT("")); + g_free(var); +} + +gchar* +g_win32_getlocale(void) +{ + /* FIXME: Use GetThreadLocale + * and convert LCID to standard + * string form, "en_US" */ + return strdup ("en_US"); +} + +gboolean +g_path_is_absolute (const char *filename) +{ + g_return_val_if_fail (filename != NULL, FALSE); + + if (filename[0] != '\0' && filename[1] != '\0') + if (filename[1] == ':' && filename[2] != '\0' && + (filename[2] == '\\' || filename[2] == '/')) + return TRUE; + /* UNC paths */ + else if (filename[0] == '\\' && filename[1] == '\\' && + filename[2] != '\0') + return TRUE; + + return FALSE; +} + +const gchar * +g_get_home_dir (void) +{ + /* FIXME */ + const gchar *drive = g_getenv ("HOMEDRIVE"); + const gchar *path = g_getenv ("HOMEPATH"); + gchar *home_dir = NULL; + + if (drive && path) { + home_dir = g_malloc(strlen(drive) + strlen(path) +1); + if (home_dir) { + sprintf(home_dir, "%s%s", drive, path); + } + } + + return home_dir; +} + +const char * +g_get_user_name (void) +{ + const char * retName = g_getenv ("USER"); + if (!retName) + retName = g_getenv ("USERNAME"); + return retName; +} + +static const char *tmp_dir; + +const gchar * +g_get_tmp_dir (void) +{ + if (tmp_dir == NULL){ + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TMPDIR"); + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TMP"); + if (tmp_dir == NULL){ + tmp_dir = g_getenv ("TEMP"); + if (tmp_dir == NULL) + tmp_dir = "C:\\temp"; + } + } + } + } + return tmp_dir; +} + diff --git a/eglib/src/gmodule-unix.c b/eglib/src/gmodule-unix.c new file mode 100644 index 0000000000..87eb27aef2 --- /dev/null +++ b/eglib/src/gmodule-unix.c @@ -0,0 +1,326 @@ +/* + * gmodule.c: dl* functions, glib style + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * Jonathan Chambers (joncham@gmail.com) + * Robert Jordan (robertj@gmx.net) + * + * (C) 2006 Novell, Inc. + * (C) 2006 Jonathan Chambers + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <gmodule.h> + +#if defined(__native_client__) +GModule * +g_module_open (const gchar *file, GModuleFlags flags) +{ + printf("dlopen() not supported on Native Client.\n"); + return NULL; +} + + +gboolean +g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol) +{ + return FALSE; +} + + +const gchar* +g_module_error(void) +{ + return "dlopen not supported on Native Client."; +} + +gboolean +g_module_close (GModule *module) +{ + return FALSE; +} + +gchar* +g_module_build_path (const gchar *directory, const gchar *module_name) +{ + return NULL; +} + +#else + +#ifdef G_OS_UNIX +#include <dlfcn.h> + +/* For Linux and Solaris, need to add others as we port this */ +#define LIBPREFIX "lib" +#define LIBSUFFIX ".so" + +struct _GModule { + void *handle; +}; + +GModule * +g_module_open (const gchar *file, GModuleFlags flags) +{ + int f = 0; + GModule *module; + void *handle; + + flags &= G_MODULE_BIND_MASK; + if ((flags & G_MODULE_BIND_LAZY) != 0) + f |= RTLD_LAZY; + if ((flags & G_MODULE_BIND_LOCAL) != 0) + f |= RTLD_LOCAL; + + handle = dlopen (file, f); + if (handle == NULL) + return NULL; + + module = g_new (GModule,1); + module->handle = handle; + + return module; +} + +gboolean +g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol) +{ + if (symbol_name == NULL || symbol == NULL) + return FALSE; + + if (module == NULL || module->handle == NULL) + return FALSE; + + *symbol = dlsym (module->handle, symbol_name); + return (*symbol != NULL); +} + +const gchar * +g_module_error (void) +{ + return dlerror (); +} + +gboolean +g_module_close (GModule *module) +{ + void *handle; + if (module == NULL || module->handle == NULL) + return FALSE; + + handle = module->handle; + module->handle = NULL; + g_free (module); + return (0 == dlclose (handle)); +} + +#elif defined (G_OS_WIN32) +#include <windows.h> +#include <psapi.h> + +#define LIBSUFFIX ".dll" +#define LIBPREFIX "" + +struct _GModule { + HMODULE handle; + int main_module; +}; + +GModule * +g_module_open (const gchar *file, GModuleFlags flags) +{ + GModule *module; + module = g_malloc (sizeof (GModule)); + if (module == NULL) + return NULL; + + if (file != NULL) { + gunichar2 *file16; + file16 = u8to16(file); + module->main_module = FALSE; + module->handle = LoadLibrary (file16); + g_free(file16); + if (!module->handle) { + g_free (module); + return NULL; + } + + } else { + module->main_module = TRUE; + module->handle = GetModuleHandle (NULL); + } + + return module; +} + +static gpointer +w32_find_symbol (const gchar *symbol_name) +{ + HMODULE *modules; + DWORD buffer_size = sizeof (HMODULE) * 1024; + DWORD needed, i; + + modules = (HMODULE *) g_malloc (buffer_size); + + if (modules == NULL) + return NULL; + + if (!EnumProcessModules (GetCurrentProcess (), modules, + buffer_size, &needed)) { + g_free (modules); + return NULL; + } + + /* check whether the supplied buffer was too small, realloc, retry */ + if (needed > buffer_size) { + g_free (modules); + + buffer_size = needed; + modules = (HMODULE *) g_malloc (buffer_size); + + if (modules == NULL) + return NULL; + + if (!EnumProcessModules (GetCurrentProcess (), modules, + buffer_size, &needed)) { + g_free (modules); + return NULL; + } + } + + for (i = 0; i < needed / sizeof (HANDLE); i++) { + gpointer proc = (gpointer)(intptr_t)GetProcAddress (modules [i], symbol_name); + if (proc != NULL) { + g_free (modules); + return proc; + } + } + + g_free (modules); + return NULL; +} + +gboolean +g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol) +{ + if (module == NULL || symbol_name == NULL || symbol == NULL) + return FALSE; + + if (module->main_module) { + *symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name); + if (*symbol != NULL) + return TRUE; + + *symbol = w32_find_symbol (symbol_name); + return *symbol != NULL; + } else { + *symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name); + return *symbol != NULL; + } +} + +const gchar * +g_module_error (void) +{ + gchar* ret = NULL; + TCHAR* buf = NULL; + DWORD code = GetLastError (); + + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, + code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL); + + ret = u16to8 (buf); + LocalFree(buf); + + return ret; +} + +gboolean +g_module_close (GModule *module) +{ + HMODULE handle; + int main_module; + + if (module == NULL || module->handle == NULL) + return FALSE; + + handle = module->handle; + main_module = module->main_module; + module->handle = NULL; + g_free (module); + return (main_module ? 1 : (0 == FreeLibrary (handle))); +} + +#else + +#define LIBSUFFIX "" +#define LIBPREFIX "" + +GModule * +g_module_open (const gchar *file, GModuleFlags flags) +{ + g_error ("%s", "g_module_open not implemented on this platform"); + return NULL; +} + +gboolean +g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol) +{ + g_error ("%s", "g_module_open not implemented on this platform"); + return FALSE; +} + +const gchar * +g_module_error (void) +{ + g_error ("%s", "g_module_open not implemented on this platform"); + return NULL; +} + +gboolean +g_module_close (GModule *module) +{ + g_error ("%s", "g_module_open not implemented on this platform"); + return FALSE; +} +#endif + +gchar * +g_module_build_path (const gchar *directory, const gchar *module_name) +{ + char *lib_prefix = ""; + + if (module_name == NULL) + return NULL; + + if (strncmp (module_name, "lib", 3) != 0) + lib_prefix = LIBPREFIX; + + if (directory && *directory){ + + return g_strdup_printf ("%s/%s%s" LIBSUFFIX, directory, lib_prefix, module_name); + } + return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name); +} + +#endif /* __native_client__ */ + diff --git a/eglib/src/gmodule-win32.c b/eglib/src/gmodule-win32.c new file mode 100644 index 0000000000..a51d50064e --- /dev/null +++ b/eglib/src/gmodule-win32.c @@ -0,0 +1,185 @@ +/* + * gmodule.c: dl* functions, glib style + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * Jonathan Chambers (joncham@gmail.com) + * Robert Jordan (robertj@gmx.net) + * + * (C) 2006 Novell, Inc. + * (C) 2006 Jonathan Chambers + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <gmodule.h> +#include <windows.h> +#include <psapi.h> + +#define LIBSUFFIX ".dll" +#define LIBPREFIX "" + +struct _GModule { + HMODULE handle; + int main_module; +}; + +GModule * +g_module_open (const gchar *file, GModuleFlags flags) +{ + GModule *module; + module = g_malloc (sizeof (GModule)); + if (module == NULL) + return NULL; + + if (file != NULL) { + gunichar2 *file16; + file16 = u8to16(file); + module->main_module = FALSE; + module->handle = LoadLibrary (file16); + g_free(file16); + if (!module->handle) { + g_free (module); + return NULL; + } + + } else { + module->main_module = TRUE; + module->handle = GetModuleHandle (NULL); + } + + return module; +} + +static gpointer +w32_find_symbol (const gchar *symbol_name) +{ + HMODULE *modules; + DWORD buffer_size = sizeof (HMODULE) * 1024; + DWORD needed, i; + + modules = (HMODULE *) g_malloc (buffer_size); + + if (modules == NULL) + return NULL; + + if (!EnumProcessModules (GetCurrentProcess (), modules, + buffer_size, &needed)) { + g_free (modules); + return NULL; + } + + /* check whether the supplied buffer was too small, realloc, retry */ + if (needed > buffer_size) { + g_free (modules); + + buffer_size = needed; + modules = (HMODULE *) g_malloc (buffer_size); + + if (modules == NULL) + return NULL; + + if (!EnumProcessModules (GetCurrentProcess (), modules, + buffer_size, &needed)) { + g_free (modules); + return NULL; + } + } + + for (i = 0; i < needed / sizeof (HANDLE); i++) { + gpointer proc = (gpointer)(intptr_t)GetProcAddress (modules [i], symbol_name); + if (proc != NULL) { + g_free (modules); + return proc; + } + } + + g_free (modules); + return NULL; +} + +gboolean +g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol) +{ + if (module == NULL || symbol_name == NULL || symbol == NULL) + return FALSE; + + if (module->main_module) { + *symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name); + if (*symbol != NULL) + return TRUE; + + *symbol = w32_find_symbol (symbol_name); + return *symbol != NULL; + } else { + *symbol = (gpointer)(intptr_t)GetProcAddress (module->handle, symbol_name); + return *symbol != NULL; + } +} + +const gchar * +g_module_error (void) +{ + gchar* ret = NULL; + TCHAR* buf = NULL; + DWORD code = GetLastError (); + + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, + code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL); + + ret = u16to8 (buf); + LocalFree(buf); + + return ret; +} + +gboolean +g_module_close (GModule *module) +{ + HMODULE handle; + int main_module; + + if (module == NULL || module->handle == NULL) + return FALSE; + + handle = module->handle; + main_module = module->main_module; + module->handle = NULL; + g_free (module); + return (main_module ? 1 : (0 == FreeLibrary (handle))); +} + +gchar * +g_module_build_path (const gchar *directory, const gchar *module_name) +{ + char *lib_prefix = ""; + + if (module_name == NULL) + return NULL; + + if (strncmp (module_name, "lib", 3) != 0) + lib_prefix = LIBPREFIX; + + if (directory && *directory){ + + return g_strdup_printf ("%s/%s%s" LIBSUFFIX, directory, lib_prefix, module_name); + } + return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name); +} diff --git a/eglib/src/gmodule.h b/eglib/src/gmodule.h new file mode 100644 index 0000000000..ee89683f51 --- /dev/null +++ b/eglib/src/gmodule.h @@ -0,0 +1,37 @@ +#ifndef __GLIB_GMODULE_H +#define __GLIB_GMODULE_H + +#include <glib.h> + +#define G_MODULE_IMPORT extern +#ifdef G_OS_WIN32 +#define G_MODULE_EXPORT __declspec(dllexport) +#else +#define G_MODULE_EXPORT +#endif + +G_BEGIN_DECLS + +/* + * Modules + */ +typedef enum { + G_MODULE_BIND_LAZY = 0x01, + G_MODULE_BIND_LOCAL = 0x02, + G_MODULE_BIND_MASK = 0x03 +} GModuleFlags; +typedef struct _GModule GModule; + +GModule *g_module_open (const gchar *file, GModuleFlags flags); +gboolean g_module_symbol (GModule *module, const gchar *symbol_name, + gpointer *symbol); +const gchar *g_module_error (void); +gboolean g_module_close (GModule *module); +gchar * g_module_build_path (const gchar *directory, const gchar *module_name); + +extern char *gmodule_libprefix; +extern char *gmodule_libsuffix; + +G_END_DECLS + +#endif diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c new file mode 100644 index 0000000000..2272c97ff9 --- /dev/null +++ b/eglib/src/goutput.c @@ -0,0 +1,158 @@ +/* + * Output and debugging functions + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <stdlib.h> +#include <glib.h> + +/* The current fatal levels, error is always fatal */ +static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR; + +#if PLATFORM_ANDROID +#include <android/log.h> + +static android_LogPriority +to_android_priority (GLogLevelFlags log_level) +{ + switch (log_level & G_LOG_LEVEL_MASK) + { + case G_LOG_LEVEL_ERROR: return ANDROID_LOG_FATAL; + case G_LOG_LEVEL_CRITICAL: return ANDROID_LOG_ERROR; + case G_LOG_LEVEL_WARNING: return ANDROID_LOG_WARN; + case G_LOG_LEVEL_MESSAGE: return ANDROID_LOG_INFO; + case G_LOG_LEVEL_INFO: return ANDROID_LOG_DEBUG; + case G_LOG_LEVEL_DEBUG: return ANDROID_LOG_VERBOSE; + } + return ANDROID_LOG_UNKNOWN; +} + +static void +out_vfprintf (FILE *ignore, const gchar *format, va_list args) +{ + /* TODO: provide a proper app name */ + __android_log_vprint (ANDROID_LOG_ERROR, "mono", format, args); +} +#else +static void +out_vfprintf (FILE *file, const gchar *format, va_list args) +{ + vfprintf (file, format, args); +} +#endif + +void +g_print (const gchar *format, ...) +{ + va_list args; + + va_start (args, format); + + out_vfprintf (stdout, format, args); + + va_end (args); +} + +void +g_printerr (const gchar *format, ...) +{ + va_list args; + + va_start (args, format); + + out_vfprintf (stderr, format, args); + + va_end (args); +} + +GLogLevelFlags +g_log_set_always_fatal (GLogLevelFlags fatal_mask) +{ + GLogLevelFlags old_fatal = fatal; + + fatal |= fatal_mask; + + return old_fatal; +} + +GLogLevelFlags +g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask) +{ + /* + * Mono does not use a G_LOG_DOMAIN currently, so we just assume things are fatal + * if we decide to set G_LOG_DOMAIN (we probably should) we should implement + * this. + */ + return fatal_mask; +} + +void +g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args) +{ + char *msg; + + vasprintf (&msg, format, args); +#if PLATFORM_ANDROID + __android_log_print (to_android_priority (log_level), + /* TODO: provide a proper app name */ + "mono", "%s%s%s", + log_domain != NULL ? log_domain : "", + log_domain != NULL ? ": " : "", + msg); +#else + printf ("%s%s%s\n", + log_domain != NULL ? log_domain : "", + log_domain != NULL ? ": " : "", + msg); +#endif + free (msg); + if (log_level & fatal){ + fflush (stdout); + fflush (stderr); + abort (); + } +} + +void +g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, ...) +{ + va_list args; + + va_start (args, format); + g_logv (log_domain, log_level, format, args); + va_end (args); +} + +void +g_assertion_message (const gchar *format, ...) +{ + va_list args; + + va_start (args, format); + g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args); + va_end (args); + g_assert_not_reached (); +} + diff --git a/eglib/src/gpath.c b/eglib/src/gpath.c new file mode 100644 index 0000000000..39c6aa150b --- /dev/null +++ b/eglib/src/gpath.c @@ -0,0 +1,270 @@ +/* + * Portable Utility Functions + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <stdio.h> +#include <glib.h> +#include <errno.h> + +#ifdef G_OS_WIN32 +#include <direct.h> +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +gchar * +g_build_path (const gchar *separator, const gchar *first_element, ...) +{ + GString *result; + const char *s, *p, *next; + size_t slen; + va_list args; + + g_return_val_if_fail (separator != NULL, NULL); + + if (first_element == NULL) + return g_strdup (""); + + result = g_string_sized_new (48); + + slen = strlen (separator); + + va_start (args, first_element); + for (s = first_element; s != NULL; s = next){ + next = va_arg (args, char *); + p = (s + strlen (s)); + + if (next && p - slen > s){ + for (; strncmp (p-slen, separator, slen) == 0; ){ + p -= slen; + } + } + g_string_append_len (result, s, p - s); + + if (next && *next){ + if (strncmp (separator, result->str + strlen (result->str) - slen, slen)) + g_string_append (result, separator); + + for (; strncmp (next, separator, slen) == 0; ) + next += slen; + } + } + g_string_append_c (result, 0); + va_end (args); + + return g_string_free (result, FALSE); +} + +gchar * +g_path_get_dirname (const gchar *filename) +{ + char *p, *r; + size_t count; + g_return_val_if_fail (filename != NULL, NULL); + + p = strrchr (filename, G_DIR_SEPARATOR); + if (p == NULL) + return g_strdup ("."); + if (p == filename) + return g_strdup ("/"); + count = p - filename; + r = g_malloc (count + 1); + strncpy (r, filename, count); + r [count] = 0; + + return r; +} + +gchar * +g_path_get_basename (const char *filename) +{ + char *r; + g_return_val_if_fail (filename != NULL, NULL); + + /* Empty filename -> . */ + if (!*filename) + return g_strdup ("."); + + /* No separator -> filename */ + r = strrchr (filename, G_DIR_SEPARATOR); + if (r == NULL) + return g_strdup (filename); + + /* Trailing slash, remove component */ + if (r [1] == 0){ + char *copy = g_strdup (filename); + copy [r-filename] = 0; + r = strrchr (copy, G_DIR_SEPARATOR); + + if (r == NULL){ + g_free (copy); + return g_strdup ("/"); + } + r = g_strdup (&r[1]); + g_free (copy); + return r; + } + + return g_strdup (&r[1]); +} + +#ifndef HAVE_STRTOK_R +// This is from BSD's strtok_r + +char * +strtok_r(char *s, const char *delim, char **last) +{ + char *spanp; + int c, sc; + char *tok; + + if (s == NULL && (s = *last) == NULL) + return NULL; + + /* + * Skip (span) leading delimiters (s += strspn(s, delim), sort of). + */ +cont: + c = *s++; + for (spanp = (char *)delim; (sc = *spanp++) != 0; ){ + if (c == sc) + goto cont; + } + + if (c == 0){ /* no non-delimiter characters */ + *last = NULL; + return NULL; + } + tok = s - 1; + + /* + * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). + * Note that delim must have one NUL; we stop if we see that, too. + */ + for (;;){ + c = *s++; + spanp = (char *)delim; + do { + if ((sc = *spanp++) == c) { + if (c == 0) + s = NULL; + else { + char *w = s - 1; + *w = '\0'; + } + *last = s; + return tok; + } + } + while (sc != 0); + } + /* NOTREACHED */ +} +#endif + +gchar * +g_find_program_in_path (const gchar *program) +{ + char *p = g_strdup (g_getenv ("PATH")); + char *x = p, *l; + gchar *curdir = NULL; + char *save; +#ifdef G_OS_WIN32 + char *program_exe; + char *suffix_list[5] = {".exe",".cmd",".bat",".com",NULL}; + int listx; + gboolean hasSuffix; +#endif + + g_return_val_if_fail (program != NULL, NULL); + + if (x == NULL || *x == '\0') { + curdir = g_get_current_dir (); + x = curdir; + } + +#ifdef G_OS_WIN32 + /* see if program already has a suffix */ + listx = 0; + hasSuffix = FALSE; + while (!hasSuffix && suffix_list[listx]) { + hasSuffix = g_str_has_suffix(program,suffix_list[listx++]); + } +#endif + + while ((l = strtok_r (x, G_SEARCHPATH_SEPARATOR_S, &save)) != NULL){ + char *probe_path; + + x = NULL; + probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program, NULL); + if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */ + g_free (curdir); + g_free (p); + return probe_path; + } + g_free (probe_path); + +#ifdef G_OS_WIN32 + /* check for program with a suffix attached */ + if (!hasSuffix) { + listx = 0; + while (suffix_list[listx]) { + program_exe = g_strjoin(NULL,program,suffix_list[listx],NULL); + probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program_exe, NULL); + if (access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */ + g_free (curdir); + g_free (p); + g_free (program_exe); + return probe_path; + } + listx++; + g_free (probe_path); + g_free (program_exe); + } + } +#endif + } + g_free (curdir); + g_free (p); + return NULL; +} + +static char *name; + +void +g_set_prgname (const gchar *prgname) +{ + name = g_strdup (prgname); +} + +gchar * +g_get_prgname (void) +{ + return name; +} diff --git a/eglib/src/gpattern.c b/eglib/src/gpattern.c new file mode 100644 index 0000000000..84861412e8 --- /dev/null +++ b/eglib/src/gpattern.c @@ -0,0 +1,213 @@ +/* + * Simple pattern matching + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#ifndef _MSC_VER +#include <unistd.h> +#endif + +typedef enum { + MATCH_LITERAL, + MATCH_ANYCHAR, + MATCH_ANYTHING, + MATCH_ANYTHING_END, + MATCH_INVALID = -1 +} MatchType; + +typedef struct { + MatchType type; + gchar *str; +} PData; + +struct _GPatternSpec { + GSList *pattern; +}; + +static GSList * +compile_pattern (const gchar *pattern) +{ + GSList *list; + size_t i, len; + PData *data; + gchar c; + MatchType last = MATCH_INVALID; + GString *str; + gboolean free_str; + + if (pattern == NULL) + return NULL; + + data = NULL; + list = NULL; + free_str = TRUE; + str = g_string_new (""); + for (i = 0, len = strlen (pattern); i < len; i++) { + c = pattern [i]; + if (c == '*' || c == '?') { + if (str->len > 0) { + data = g_new0 (PData, 1); + data->type = MATCH_LITERAL; + data->str = g_string_free (str, FALSE); + list = g_slist_append (list, data); + str = g_string_new (""); + } + + if (last == MATCH_ANYTHING && c == '*') + continue; + + data = g_new0 (PData, 1); + data->type = (c == '*') ? MATCH_ANYTHING : MATCH_ANYCHAR; + list = g_slist_append (list, data); + last = data->type; + } else { + g_string_append_c (str, c); + last = MATCH_LITERAL; + } + } + + if (last == MATCH_ANYTHING && str->len == 0) { + data->type = MATCH_ANYTHING_END; + free_str = TRUE; + } else if (str->len > 0) { + data = g_new0 (PData, 1); + data->type = MATCH_LITERAL; + data->str = str->str; + free_str = FALSE; + list = g_slist_append (list, data); + } + g_string_free (str, free_str); + return list; +} + +#ifdef DEBUG_PATTERN +static void +print_pattern (gpointer data, gpointer user_data) +{ + PData *d = (PData *) data; + + printf ("Type: %s", d->type == MATCH_LITERAL ? "literal" : d->type == MATCH_ANYCHAR ? "any char" : "anything"); + if (d->type == MATCH_LITERAL) + printf (" String: %s", d->str); + printf ("\n"); +} +#endif + +GPatternSpec * +g_pattern_spec_new (const gchar *pattern) +{ + GPatternSpec *spec; + + g_return_val_if_fail (pattern != NULL, NULL); + spec = g_new0 (GPatternSpec, 1); + if (pattern) { + spec->pattern = compile_pattern (pattern); +#ifdef DEBUG_PATTERN + g_slist_foreach (spec->pattern, print_pattern, NULL); + printf ("\n"); +#endif + } + return spec; +} + +static void +free_pdata (gpointer data, gpointer user_data) +{ + PData *d = (PData *) data; + + if (d->str) + g_free (d->str); + g_free (d); +} + +void +g_pattern_spec_free (GPatternSpec *pspec) +{ + if (pspec) { + g_slist_foreach (pspec->pattern, free_pdata, NULL); + g_slist_free (pspec->pattern); + pspec->pattern = NULL; + } + g_free (pspec); +} + +static gboolean +match_string (GSList *list, const gchar *str, size_t idx, size_t max) +{ + size_t len; + + while (list && idx < max) { + PData *data = (PData *) list->data; + + if (data->type == MATCH_ANYTHING_END) + return TRUE; + + if (data->type == MATCH_LITERAL) { + len = strlen (data->str); + if (strncmp (&str [idx], data->str, len) != 0) + return FALSE; + idx += len; + list = list->next; + if (list) { + /* + * When recursing, we need this to avoid returning FALSE + * because 'list' will not be NULL + */ + data = (PData *) list->data; + if (data->type == MATCH_ANYTHING_END) + return TRUE; + } + } else if (data->type == MATCH_ANYCHAR) { + idx++; + list = list->next; + } else if (data->type == MATCH_ANYTHING) { + while (idx < max) { + if (match_string (list->next, str, idx++, max)) + return TRUE; + } + return FALSE; + } else { + g_assert_not_reached (); + } + } + + return (list == NULL && idx >= max); +} +gboolean +g_pattern_match_string (GPatternSpec *pspec, const gchar *string) +{ + g_return_val_if_fail (pspec != NULL, FALSE); + g_return_val_if_fail (string != NULL, FALSE); + + if (pspec->pattern == NULL) + return FALSE; + return match_string (pspec->pattern, string, 0, strlen (string)); +} + + diff --git a/eglib/src/gptrarray.c b/eglib/src/gptrarray.c new file mode 100644 index 0000000000..bfde715225 --- /dev/null +++ b/eglib/src/gptrarray.c @@ -0,0 +1,225 @@ +/* + * Pointer Array + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include <stdlib.h> +#include <glib.h> + +typedef struct _GPtrArrayPriv { + gpointer *pdata; + guint len; + guint size; +} GPtrArrayPriv; + +static void +g_ptr_array_grow(GPtrArrayPriv *array, guint length) +{ + guint new_length = array->len + length; + + g_return_if_fail(array != NULL); + + if(new_length <= array->size) { + return; + } + + array->size = 1; + + while(array->size < new_length) { + array->size <<= 1; + } + + array->size = MAX(array->size, 16); + array->pdata = g_realloc(array->pdata, array->size * sizeof(gpointer)); +} + +GPtrArray * +g_ptr_array_new() +{ + return g_ptr_array_sized_new(0); +} + +GPtrArray * +g_ptr_array_sized_new(guint reserved_size) +{ + GPtrArrayPriv *array = g_new0(GPtrArrayPriv, 1); + + array->pdata = NULL; + array->len = 0; + array->size = 0; + + if(reserved_size > 0) { + g_ptr_array_grow(array, reserved_size); + } + + return (GPtrArray *)array; +} + +gpointer * +g_ptr_array_free(GPtrArray *array, gboolean free_seg) +{ + gpointer *data = NULL; + + g_return_val_if_fail(array != NULL, NULL); + + if(free_seg) { + g_free(array->pdata); + } else { + data = array->pdata; + } + + g_free(array); + + return data; +} + +void +g_ptr_array_set_size(GPtrArray *array, gint length) +{ + g_return_if_fail(array != NULL); + + if((size_t)length > array->len) { + g_ptr_array_grow((GPtrArrayPriv *)array, length); + memset(array->pdata + array->len, 0, (length - array->len) + * sizeof(gpointer)); + } + + array->len = length; +} + +void +g_ptr_array_add(GPtrArray *array, gpointer data) +{ + g_return_if_fail(array != NULL); + g_ptr_array_grow((GPtrArrayPriv *)array, 1); + array->pdata[array->len++] = data; +} + +gpointer +g_ptr_array_remove_index(GPtrArray *array, guint index) +{ + gpointer removed_node; + + g_return_val_if_fail(array != NULL, NULL); + g_return_val_if_fail(index >= 0 || index < array->len, NULL); + + removed_node = array->pdata[index]; + + if(index != array->len - 1) { + g_memmove(array->pdata + index, array->pdata + index + 1, + (array->len - index - 1) * sizeof(gpointer)); + } + + array->len--; + array->pdata[array->len] = NULL; + + return removed_node; +} + +gpointer +g_ptr_array_remove_index_fast(GPtrArray *array, guint index) +{ + gpointer removed_node; + + g_return_val_if_fail(array != NULL, NULL); + g_return_val_if_fail(index >= 0 || index < array->len, NULL); + + removed_node = array->pdata[index]; + + if(index != array->len - 1) { + g_memmove(array->pdata + index, array->pdata + array->len - 1, + sizeof(gpointer)); + } + + array->len--; + array->pdata[array->len] = NULL; + + return removed_node; +} + +gboolean +g_ptr_array_remove(GPtrArray *array, gpointer data) +{ + guint i; + + g_return_val_if_fail(array != NULL, FALSE); + + for(i = 0; i < array->len; i++) { + if(array->pdata[i] == data) { + g_ptr_array_remove_index(array, i); + return TRUE; + } + } + + return FALSE; +} + +gboolean +g_ptr_array_remove_fast(GPtrArray *array, gpointer data) +{ + guint i; + + g_return_val_if_fail(array != NULL, FALSE); + + for(i = 0; i < array->len; i++) { + if(array->pdata[i] == data) { + array->len--; + if (array->len > 0) + array->pdata [i] = array->pdata [array->len]; + else + array->pdata [i] = NULL; + return TRUE; + } + } + + return FALSE; +} + +void +g_ptr_array_foreach(GPtrArray *array, GFunc func, gpointer user_data) +{ + guint i; + + for(i = 0; i < array->len; i++) { + func(g_ptr_array_index(array, i), user_data); + } +} + +void +g_ptr_array_sort(GPtrArray *array, GCompareFunc compare_func) +{ + g_return_if_fail(array != NULL); + qsort(array->pdata, array->len, sizeof(gpointer), compare_func); +} + +void +g_ptr_array_sort_with_data(GPtrArray *array, GCompareDataFunc compare_func, + gpointer user_data) +{ +} + + + diff --git a/eglib/src/gqueue.c b/eglib/src/gqueue.c new file mode 100644 index 0000000000..2eedbf6f9f --- /dev/null +++ b/eglib/src/gqueue.c @@ -0,0 +1,107 @@ +/* + * gqueue.c: Queue + * + * Author: + * Duncan Mak (duncan@novell.com) + * Gonzalo Paniagua Javier (gonzalo@novell.com) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Copyright (c) 2006-2009 Novell, Inc. + * + */ + +#include <stdio.h> +#include <glib.h> + +gpointer +g_queue_pop_head (GQueue *queue) +{ + gpointer result; + GList *old_head; + + if (!queue || queue->length == 0) + return NULL; + + result = queue->head->data; + old_head = queue->head; + queue->head = old_head->next; + g_list_free_1 (old_head); + + if (--queue->length) + queue->head->prev = NULL; + else + queue->tail = NULL; + + return result; +} + +gboolean +g_queue_is_empty (GQueue *queue) +{ + if (!queue) + return TRUE; + + return queue->length == 0; +} + +void +g_queue_push_head (GQueue *queue, gpointer head) +{ + if (!queue) + return; + + queue->head = g_list_prepend (queue->head, head); + + if (!queue->tail) + queue->tail = queue->head; + + queue->length ++; +} + +void +g_queue_push_tail (GQueue *queue, gpointer data) +{ + if (!queue) + return; + + queue->tail = g_list_append (queue->tail, data); + if (queue->head == NULL) + queue->head = queue->tail; + else + queue->tail = queue->tail->next; + queue->length++; +} + +GQueue * +g_queue_new (void) +{ + return g_new0 (GQueue, 1); +} + +void +g_queue_free (GQueue *queue) +{ + if (!queue) + return; + + g_list_free (queue->head); + g_free (queue); +} diff --git a/eglib/src/gshell.c b/eglib/src/gshell.c new file mode 100644 index 0000000000..b322ff5dd5 --- /dev/null +++ b/eglib/src/gshell.c @@ -0,0 +1,288 @@ +/* + * Shell utility functions. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <glib.h> + +static int +split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error) +{ + gchar *ptr; + gchar c; + gboolean escaped = FALSE; + gchar quote_char = '\0'; + GString *str; + + str = g_string_new (""); + ptr = (gchar *) cmdline; + while ((c = *ptr++) != '\0') { + if (escaped) { + /* + * \CHAR is only special inside a double quote if CHAR is + * one of: $`"\ and newline + */ + if (quote_char == '\"'){ + if (!(c == '$' || c == '`' || c == '"' || c == '\\')) + g_string_append_c (str, '\\'); + g_string_append_c (str, c); + } else { + if (!g_ascii_isspace (c)) + g_string_append_c (str, c); + } + escaped = FALSE; + } else if (quote_char) { + if (c == quote_char) { + quote_char = '\0'; + g_ptr_array_add (array, g_string_free (str, FALSE)); + str = g_string_new (""); + } else if (c == '\\'){ + escaped = TRUE; + } else + g_string_append_c (str, c); + } else if (g_ascii_isspace (c)) { + if (str->len > 0) { + g_ptr_array_add (array, g_string_free (str, FALSE)); + str = g_string_new (""); + } + } else if (c == '\\') { + escaped = TRUE; + } else if (c == '\'' || c == '"') { + quote_char = c; + } else { + g_string_append_c (str, c); + } + } + + if (escaped) { + if (error) + *error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished escape."); + g_string_free (str, TRUE); + return -1; + } + + if (quote_char) { + if (error) + *error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote."); + g_string_free (str, TRUE); + return -1; + } + + if (str->len > 0) { + g_ptr_array_add (array, g_string_free (str, FALSE)); + } else { + g_string_free (str, TRUE); + } + g_ptr_array_add (array, NULL); + return 0; +} + +gboolean +g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error) +{ + GPtrArray *array; + gint argc; + gchar **argv; + + g_return_val_if_fail (command_line, FALSE); + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + array = g_ptr_array_new(); + if (split_cmdline (command_line, array, error)) { + g_ptr_array_add (array, NULL); + g_strfreev ((gchar **) array->pdata); + g_ptr_array_free (array, FALSE); + return FALSE; + } + + argc = array->len; + argv = (gchar **) array->pdata; + + if (argc == 1) { + g_strfreev (argv); + g_ptr_array_free (array, FALSE); + return FALSE; + } + + if (argcp) { + *argcp = array->len - 1; + } + + if (argvp) { + *argvp = argv; + } else { + g_strfreev (argv); + } + + g_ptr_array_free (array, FALSE); + return TRUE; +} + +gchar * +g_shell_quote (const gchar *unquoted_string) +{ + GString *result = g_string_new ("'"); + const gchar *p; + + for (p = unquoted_string; *p; p++){ + if (*p == '\'') + g_string_append (result, "'\\'"); + g_string_append_c (result, *p); + } + g_string_append_c (result, '\''); + return g_string_free (result, FALSE); +} + +gchar * +g_shell_unquote (const gchar *quoted_string, GError **error) +{ + GString *result; + const char *p; + int do_unquote = 0; + + if (quoted_string == NULL) + return NULL; + + /* Quickly try to determine if we need to unquote or not */ + for (p = quoted_string; *p; p++){ + if (*p == '\'' || *p == '"' || *p == '\\'){ + do_unquote = 1; + break; + } + } + + if (!do_unquote) + return g_strdup (quoted_string); + + /* We do need to unquote */ + result = g_string_new (""); + for (p = quoted_string; *p; p++){ + + if (*p == '\''){ + /* Process single quote, not even \ is processed by glib's version */ + for (p++; *p; p++){ + if (*p == '\'') + break; + g_string_append_c (result, *p); + } + if (!*p){ + g_set_error (error, 0, 0, "Open quote"); + return NULL; + } + } else if (*p == '"'){ + /* Process double quote, allows some escaping */ + for (p++; *p; p++){ + if (*p == '"') + break; + if (*p == '\\'){ + p++; + if (*p == 0){ + g_set_error (error, 0, 0, "Open quote"); + return NULL; + } + switch (*p){ + case '$': + case '"': + case '\\': + case '`': + break; + default: + g_string_append_c (result, '\\'); + break; + } + } + g_string_append_c (result, *p); + } + if (!*p){ + g_set_error (error, 0, 0, "Open quote"); + return NULL; + } + } else if (*p == '\\'){ + char c = *(++p); + if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == 0)) + g_string_append_c (result, '\\'); + if (c == 0) + break; + else + g_string_append_c (result, c); + } else + g_string_append_c (result, *p); + } + return g_string_free (result, FALSE); +} + +#if JOINT_TEST +/* + * This test is designed to be built with the 2 glib/eglib to compare + */ + +char *args [] = { + "\\", + "\"Foo'bar\"", + "'foo'", + "'fo\'b'", + "'foo\"bar'", + "'foo' dingus bar", + "'foo' 'bar' 'baz'", + "\"foo\" 'bar' \"baz\"", + "\"f\\$\\\'", + "\"\\", + "\\\\", + "'\\\\'", + "\"f\\$\"\\\"\\\\", // /\\\"\\\\" + "'f\\$'\\\"\\\\", + "'f\\$\\\\'", + NULL +}; + + +int +main () +{ + char **s = args; + int i; + + while (*s){ + char *r1 = g_shell_unquote (*s, NULL); + char *r2 = g2_shell_unquote (*s, NULL); + char *ok = r1 == r2 ? "ok" : (r1 != NULL && r2 != NULL && strcmp (r1, r2) == 0) ? "ok" : "fail"; + + printf ("%s [%s] -> [%s] - [%s]\n", ok, *s, r1, r2); + s++; + } + return; + char buffer [10]; + buffer [0] = '\"'; + buffer [1] = '\\'; + buffer [3] = '\"'; + buffer [4] = 0; + + for (i = 32; i < 255; i++){ + buffer [2] = i; + printf ("%d [%s] -> [%s]\n", i, buffer, g_shell_unquote (buffer, NULL)); + } +} +#endif diff --git a/eglib/src/gslist.c b/eglib/src/gslist.c new file mode 100644 index 0000000000..5baa297f73 --- /dev/null +++ b/eglib/src/gslist.c @@ -0,0 +1,362 @@ +/* + * gslist.c: Singly-linked list implementation + * + * Authors: + * Duncan Mak (duncan@novell.com) + * Raja R Harinath (rharinath@novell.com) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * (C) 2006 Novell, Inc. + */ + +#include <stdio.h> +#include <glib.h> + +GSList* +g_slist_alloc (void) +{ + return g_new0 (GSList, 1); +} + +void +g_slist_free_1 (GSList *list) +{ + g_free (list); +} + +GSList* +g_slist_append (GSList *list, gpointer data) +{ + return g_slist_concat (list, g_slist_prepend (NULL, data)); +} + +/* This is also a list node constructor. */ +GSList* +g_slist_prepend (GSList *list, gpointer data) +{ + GSList *head = g_slist_alloc (); + head->data = data; + head->next = list; + + return head; +} + +/* + * Insert the given data in a new node after the current node. + * Return new node. + */ +static inline GSList * +insert_after (GSList *list, gpointer data) +{ + list->next = g_slist_prepend (list->next, data); + return list->next; +} + +/* + * Return the node prior to the node containing 'data'. + * If the list is empty, or the first node contains 'data', return NULL. + * If no node contains 'data', return the last node. + */ +static inline GSList* +find_prev (GSList *list, gconstpointer data) +{ + GSList *prev = NULL; + while (list) { + if (list->data == data) + break; + prev = list; + list = list->next; + } + return prev; +} + +/* like 'find_prev', but searches for node 'link' */ +static inline GSList* +find_prev_link (GSList *list, GSList *link) +{ + GSList *prev = NULL; + while (list) { + if (list == link) + break; + prev = list; + list = list->next; + } + return prev; +} + +GSList* +g_slist_insert_before (GSList *list, GSList *sibling, gpointer data) +{ + GSList *prev = find_prev_link (list, sibling); + + if (!prev) + return g_slist_prepend (list, data); + + insert_after (prev, data); + return list; +} + +void +g_slist_free (GSList *list) +{ + while (list) { + GSList *next = list->next; + g_slist_free_1 (list); + list = next; + } +} + +GSList* +g_slist_copy (GSList *list) +{ + GSList *copy, *tmp; + + if (!list) + return NULL; + + copy = g_slist_prepend (NULL, list->data); + tmp = copy; + + for (list = list->next; list; list = list->next) + tmp = insert_after (tmp, list->data); + + return copy; +} + +GSList* +g_slist_concat (GSList *list1, GSList *list2) +{ + if (!list1) + return list2; + + g_slist_last (list1)->next = list2; + return list1; +} + +void +g_slist_foreach (GSList *list, GFunc func, gpointer user_data) +{ + while (list) { + (*func) (list->data, user_data); + list = list->next; + } +} + +GSList* +g_slist_last (GSList *list) +{ + if (!list) + return NULL; + + while (list->next) + list = list->next; + + return list; +} + +GSList* +g_slist_find (GSList *list, gconstpointer data) +{ + for (; list; list = list->next) + if (list->data == data) + break; + return list; +} + +GSList * +g_slist_find_custom (GSList *list, gconstpointer data, GCompareFunc func) +{ + if (!func) + return NULL; + + while (list) { + if (func (list->data, data) == 0) + return list; + + list = list->next; + } + + return NULL; +} + +guint +g_slist_length (GSList *list) +{ + guint length = 0; + + while (list) { + length ++; + list = list->next; + } + + return length; +} + +GSList* +g_slist_remove (GSList *list, gconstpointer data) +{ + GSList *prev = find_prev (list, data); + GSList *current = prev ? prev->next : list; + + if (current) { + if (prev) + prev->next = current->next; + else + list = current->next; + g_slist_free_1 (current); + } + + return list; +} + +GSList* +g_slist_remove_all (GSList *list, gconstpointer data) +{ + GSList *next = list; + GSList *prev = NULL; + GSList *current; + + while (next) { + GSList *tmp_prev = find_prev (next, data); + if (tmp_prev) + prev = tmp_prev; + current = prev ? prev->next : list; + + if (!current) + break; + + next = current->next; + + if (prev) + prev->next = next; + else + list = next; + g_slist_free_1 (current); + } + + return list; +} + +GSList* +g_slist_remove_link (GSList *list, GSList *link) +{ + GSList *prev = find_prev_link (list, link); + GSList *current = prev ? prev->next : list; + + if (current) { + if (prev) + prev->next = current->next; + else + list = current->next; + current->next = NULL; + } + + return list; +} + +GSList* +g_slist_delete_link (GSList *list, GSList *link) +{ + list = g_slist_remove_link (list, link); + g_slist_free_1 (link); + + return list; +} + +GSList* +g_slist_reverse (GSList *list) +{ + GSList *prev = NULL; + while (list){ + GSList *next = list->next; + list->next = prev; + prev = list; + list = next; + } + + return prev; +} + +GSList* +g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func) +{ + GSList *prev = NULL; + + if (!func) + return list; + + if (!list || func (list->data, data) > 0) + return g_slist_prepend (list, data); + + /* Invariant: func (prev->data, data) <= 0) */ + for (prev = list; prev->next; prev = prev->next) + if (func (prev->next->data, data) > 0) + break; + + /* ... && (prev->next == 0 || func (prev->next->data, data) > 0)) */ + insert_after (prev, data); + return list; +} + +gint +g_slist_index (GSList *list, gconstpointer data) +{ + gint index = 0; + + while (list) { + if (list->data == data) + return index; + + index++; + list = list->next; + } + + return -1; +} + +GSList* +g_slist_nth (GSList *list, guint n) +{ + for (; list; list = list->next) { + if (n == 0) + break; + n--; + } + return list; +} + +gpointer +g_slist_nth_data (GSList *list, guint n) +{ + GSList *node = g_slist_nth (list, n); + return node ? node->data : NULL; +} + +typedef GSList list_node; +#include "sort.frag.h" + +GSList* +g_slist_sort (GSList *list, GCompareFunc func) +{ + if (!list || !list->next) + return list; + return do_sort (list, func); +} diff --git a/eglib/src/gspawn.c b/eglib/src/gspawn.c new file mode 100644 index 0000000000..f55d504212 --- /dev/null +++ b/eglib/src/gspawn.c @@ -0,0 +1,465 @@ +/* + * Spawning processes. + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <stdio.h> +#include <stdlib.h> +#include <errno.h> +#include <fcntl.h> +#include <sys/types.h> + +#include <glib.h> + +#ifdef HAVE_UNISTD_H +#ifndef __USE_GNU +#define __USE_GNU +#endif +#include <unistd.h> +#endif + +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + +#ifdef HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif + +#ifdef G_OS_WIN32 +#include <io.h> +#include <winsock2.h> +#define open _open +#define close _close +#define read _read +#define write _write +/* windows pipe api details: http://msdn2.microsoft.com/en-us/library/edze9h7e(VS.80).aspx */ +#define pipe(x) _pipe(x, 256, 0) +#endif + +#define set_error(msg, ...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0) +#define set_error_cond(cond,msg, ...) do { if ((cond) && error != NULL) *error = g_error_new (G_LOG_DOMAIN, 1, msg, __VA_ARGS__); } while (0) +#define set_error_status(status,msg, ...) do { if (error != NULL) *error = g_error_new (G_LOG_DOMAIN, status, msg, __VA_ARGS__); } while (0) +#define NO_INTR(var,cmd) do { (var) = (cmd); } while ((var) == -1 && errno == EINTR) +#define CLOSE_PIPE(p) do { close (p [0]); close (p [1]); } while (0) + +#if defined(__APPLE__) && !defined (__arm__) +/* Apple defines this in crt_externs.h but doesn't provide that header for + * arm-apple-darwin9. We'll manually define the symbol on Apple as it does + * in fact exist on all implementations (so far) + */ +gchar ***_NSGetEnviron(); +#define environ (*_NSGetEnviron()) +#elif defined(_MSC_VER) +/* MS defines this in stdlib.h */ +#else +extern char **environ; +#endif + +static int +safe_read (int fd, gchar *buffer, gint count, GError **error) +{ + int res; + + NO_INTR (res, read (fd, buffer, count)); + set_error_cond (res == -1, "%s", "Error reading from pipe."); + return res; +} + +static int +read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **error) +{ + fd_set rfds; + int res; + gboolean out_closed; + gboolean err_closed; + GString *out = NULL; + GString *err = NULL; + gchar *buffer = NULL; + gint nread; + + out_closed = (outfd < 0); + err_closed = (errfd < 0); + if (out_str) { + *out_str = NULL; + out = g_string_new (""); + } + + if (err_str) { + *err_str = NULL; + err = g_string_new (""); + } + + do { + if (out_closed && err_closed) + break; + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4389) +#endif + + FD_ZERO (&rfds); + if (!out_closed && outfd >= 0) + FD_SET (outfd, &rfds); + if (!err_closed && errfd >= 0) + FD_SET (errfd, &rfds); + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + + res = select (MAX (outfd, errfd) + 1, &rfds, NULL, NULL, NULL); + if (res > 0) { + if (buffer == NULL) + buffer = g_malloc (1024); + if (!out_closed && FD_ISSET (outfd, &rfds)) { + nread = safe_read (outfd, buffer, 1024, error); + if (nread < 0) { + close (errfd); + close (outfd); + return -1; + } + g_string_append_len (out, buffer, nread); + if (nread <= 0) { + out_closed = TRUE; + close (outfd); + } + } + + if (!err_closed && FD_ISSET (errfd, &rfds)) { + nread = safe_read (errfd, buffer, 1024, error); + if (nread < 0) { + close (errfd); + close (outfd); + return -1; + } + g_string_append_len (err, buffer, nread); + if (nread <= 0) { + err_closed = TRUE; + close (errfd); + } + } + } + } while (res > 0 || (res == -1 && errno == EINTR)); + + g_free (buffer); + if (out_str) + *out_str = g_string_free (out, FALSE); + + if (err_str) + *err_str = g_string_free (err, FALSE); + + return 0; +} + +static gboolean +create_pipe (int *fds, GError **error) +{ + if (pipe (fds) == -1) { + set_error ("%s", "Error creating pipe."); + return FALSE; + } + return TRUE; +} + +gboolean +g_spawn_command_line_sync (const gchar *command_line, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, + GError **error) +{ +#ifdef G_OS_WIN32 +#else + pid_t pid; + gchar **argv; + gint argc; + int stdout_pipe [2] = { -1, -1 }; + int stderr_pipe [2] = { -1, -1 }; + int status; + int res; + + if (!g_shell_parse_argv (command_line, &argc, &argv, error)) + return FALSE; + + if (standard_output && !create_pipe (stdout_pipe, error)) + return FALSE; + + if (standard_error && !create_pipe (stderr_pipe, error)) { + if (standard_output) { + CLOSE_PIPE (stdout_pipe); + } + return FALSE; + } + + pid = fork (); + if (pid == 0) { + gint i; + + if (standard_output) { + close (stdout_pipe [0]); + dup2 (stdout_pipe [1], STDOUT_FILENO); + } + + if (standard_error) { + close (stderr_pipe [0]); + dup2 (stderr_pipe [1], STDERR_FILENO); + } + for (i = getdtablesize () - 1; i >= 3; i--) + close (i); + + /* G_SPAWN_SEARCH_PATH is always enabled for g_spawn_command_line_sync */ + if (!g_path_is_absolute (argv [0])) { + gchar *arg0; + + arg0 = g_find_program_in_path (argv [0]); + if (arg0 == NULL) { + exit (1); + } + //g_free (argv [0]); + argv [0] = arg0; + } + execv (argv [0], argv); + exit (1); /* TODO: What now? */ + } + + g_strfreev (argv); + if (standard_output) + close (stdout_pipe [1]); + + if (standard_error) + close (stderr_pipe [1]); + + if (standard_output || standard_error) { + res = read_pipes (stdout_pipe [0], standard_output, stderr_pipe [0], standard_error, error); + if (res) { + waitpid (pid, &status, WNOHANG); /* avoid zombie */ + return FALSE; + } + } + + NO_INTR (res, waitpid (pid, &status, 0)); + + /* TODO: What if error? */ + if (WIFEXITED (status) && exit_status) { + *exit_status = WEXITSTATUS (status); + } +#endif + return TRUE; +} + +/* + * This is the only use we have in mono/metadata +!g_spawn_async_with_pipes (NULL, (char**)addr_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &child_pid, &ch_in, &ch_out, NULL, NULL) +*/ +gboolean +g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint *standard_input, + gint *standard_output, + gint *standard_error, + GError **error) +{ +#ifdef G_OS_WIN32 +#else + pid_t pid; + int info_pipe [2]; + int in_pipe [2] = { -1, -1 }; + int out_pipe [2] = { -1, -1 }; + int err_pipe [2] = { -1, -1 }; + int status; + + g_return_val_if_fail (argv != NULL, FALSE); /* Only mandatory arg */ + + if (!create_pipe (info_pipe, error)) + return FALSE; + + if (standard_output && !create_pipe (out_pipe, error)) { + CLOSE_PIPE (info_pipe); + return FALSE; + } + + if (standard_error && !create_pipe (err_pipe, error)) { + CLOSE_PIPE (info_pipe); + CLOSE_PIPE (out_pipe); + return FALSE; + } + + if (standard_input && !create_pipe (in_pipe, error)) { + CLOSE_PIPE (info_pipe); + CLOSE_PIPE (out_pipe); + CLOSE_PIPE (err_pipe); + return FALSE; + } + + pid = fork (); + if (pid == -1) { + CLOSE_PIPE (info_pipe); + CLOSE_PIPE (out_pipe); + CLOSE_PIPE (err_pipe); + CLOSE_PIPE (in_pipe); + set_error ("%s", "Error in fork ()"); + return FALSE; + } + + if (pid == 0) { + /* No zombie left behind */ + if ((flags & G_SPAWN_DO_NOT_REAP_CHILD) == 0) { + pid = fork (); + } + + if (pid != 0) { + exit (pid == -1 ? 1 : 0); + } else { + gint i; + int fd; + gchar *arg0; + gchar **actual_args; + gint unused; + + close (info_pipe [0]); + close (in_pipe [1]); + close (out_pipe [0]); + close (err_pipe [0]); + + /* when exec* succeeds, we want to close this fd, which will return + * a 0 read on the parent. We're not supposed to keep it open forever. + * If exec fails, we still can write the error to it before closing. + */ + fcntl (info_pipe [1], F_SETFD, FD_CLOEXEC); + + if ((flags & G_SPAWN_DO_NOT_REAP_CHILD) == 0) { + pid = getpid (); + NO_INTR (unused, write (info_pipe [1], &pid, sizeof (pid_t))); + } + + if (working_directory && chdir (working_directory) == -1) { + int err = errno; + NO_INTR (unused, write (info_pipe [1], &err, sizeof (int))); + exit (0); + } + + if (standard_output) { + dup2 (out_pipe [1], STDOUT_FILENO); + } else if ((flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0) { + fd = open ("/dev/null", O_WRONLY); + dup2 (fd, STDOUT_FILENO); + } + + if (standard_error) { + dup2 (err_pipe [1], STDERR_FILENO); + } else if ((flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0) { + fd = open ("/dev/null", O_WRONLY); + dup2 (fd, STDERR_FILENO); + } + + if (standard_input) { + dup2 (in_pipe [0], STDIN_FILENO); + } else if ((flags & G_SPAWN_CHILD_INHERITS_STDIN) == 0) { + fd = open ("/dev/null", O_RDONLY); + dup2 (fd, STDIN_FILENO); + } + + if ((flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN) != 0) { + for (i = getdtablesize () - 1; i >= 3; i--) + close (i); + } + + actual_args = ((flags & G_SPAWN_FILE_AND_ARGV_ZERO) == 0) ? argv : argv + 1; + if (envp == NULL) + envp = environ; + + if (child_setup) + child_setup (user_data); + + arg0 = argv [0]; + if (!g_path_is_absolute (arg0) || (flags & G_SPAWN_SEARCH_PATH) != 0) { + arg0 = g_find_program_in_path (argv [0]); + if (arg0 == NULL) { + int err = ENOENT; + write (info_pipe [1], &err, sizeof (int)); + exit (0); + } + } + + execve (arg0, actual_args, envp); + write (info_pipe [1], &errno, sizeof (int)); + exit (0); + } + } else if ((flags & G_SPAWN_DO_NOT_REAP_CHILD) == 0) { + int w; + /* Wait for the first child if two are created */ + NO_INTR (w, waitpid (pid, &status, 0)); + if (status == 1 || w == -1) { + CLOSE_PIPE (info_pipe); + CLOSE_PIPE (out_pipe); + CLOSE_PIPE (err_pipe); + CLOSE_PIPE (in_pipe); + set_error ("Error in fork (): %d", status); + return FALSE; + } + } + close (info_pipe [1]); + close (in_pipe [0]); + close (out_pipe [1]); + close (err_pipe [1]); + + if ((flags & G_SPAWN_DO_NOT_REAP_CHILD) == 0) { + int x; + NO_INTR (x, read (info_pipe [0], &pid, sizeof (pid_t))); /* if we read < sizeof (pid_t)... */ + } + + if (child_pid) { + *child_pid = pid; + } + + if (read (info_pipe [0], &status, sizeof (int)) != 0) { + close (info_pipe [0]); + close (in_pipe [0]); + close (out_pipe [1]); + close (err_pipe [1]); + set_error_status (status, "Error in exec (%d -> %s)", status, strerror (status)); + return FALSE; + } + + close (info_pipe [0]); + if (standard_input) + *standard_input = in_pipe [1]; + if (standard_output) + *standard_output = out_pipe [0]; + if (standard_error) + *standard_error = err_pipe [0]; +#endif + return TRUE; +} + + diff --git a/eglib/src/gstr.c b/eglib/src/gstr.c new file mode 100644 index 0000000000..424abf8d11 --- /dev/null +++ b/eglib/src/gstr.c @@ -0,0 +1,852 @@ +/* + * gstr.c: String Utility Functions. + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <config.h> +#include <stdio.h> +#include <string.h> +#include <ctype.h> +#include <glib.h> + +/* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */ +gchar * +g_strndup (const gchar *str, gsize n) +{ +#ifdef HAVE_STRNDUP + return strndup (str, n); +#else + if (str) { + char *retval = g_malloc(n+1); + if (retval) { + strncpy(retval, str, n)[n] = 0; + } + return retval; + } + return NULL; +#endif +} + +void +g_strfreev (gchar **str_array) +{ + gchar **orig = str_array; + if (str_array == NULL) + return; + while (*str_array != NULL){ + g_free (*str_array); + str_array++; + } + g_free (orig); +} + +gchar ** +g_strdupv (gchar **str_array) +{ + guint length; + gchar **ret; + guint i; + length = g_strv_length(str_array); + ret = g_new0(gchar *, length + 1); + for (i = 0; str_array[i]; i++) { + ret[i] = g_strdup(str_array[i]); + } + ret[length] = NULL; + return ret; +} + +guint +g_strv_length(gchar **str_array) +{ + gint length = 0; + g_return_val_if_fail(str_array != NULL, 0); + for(length = 0; str_array[length] != NULL; length++); + return length; +} + +gboolean +g_str_has_suffix(const gchar *str, const gchar *suffix) +{ + size_t str_length; + size_t suffix_length; + + g_return_val_if_fail(str != NULL, FALSE); + g_return_val_if_fail(suffix != NULL, FALSE); + + str_length = strlen(str); + suffix_length = strlen(suffix); + + return suffix_length <= str_length ? + strncmp(str + str_length - suffix_length, suffix, suffix_length) == 0 : + FALSE; +} + +gboolean +g_str_has_prefix(const gchar *str, const gchar *prefix) +{ + size_t str_length; + size_t prefix_length; + + g_return_val_if_fail(str != NULL, FALSE); + g_return_val_if_fail(prefix != NULL, FALSE); + + str_length = strlen(str); + prefix_length = strlen(prefix); + + return prefix_length <= str_length ? + strncmp(str, prefix, prefix_length) == 0 : + FALSE; +} + +gchar * +g_strdup_vprintf (const gchar *format, va_list args) +{ + int n; + char *ret; + + n = vasprintf (&ret, format, args); + if (n == -1) + return NULL; + + return ret; +} + +gchar * +g_strdup_printf (const gchar *format, ...) +{ + gchar *ret; + va_list args; + int n; + + va_start (args, format); + n = vasprintf (&ret, format, args); + va_end (args); + if (n == -1) + return NULL; + + return ret; +} + +const gchar * +g_strerror (gint errnum) +{ + return strerror (errnum); +} + +gchar * +g_strconcat (const gchar *first, ...) +{ + va_list args; + size_t total = 0; + char *s, *ret; + g_return_val_if_fail (first != NULL, NULL); + + total += strlen (first); + va_start (args, first); + for (s = va_arg (args, char *); s != NULL; s = va_arg(args, char *)){ + total += strlen (s); + } + va_end (args); + + ret = g_malloc (total + 1); + if (ret == NULL) + return NULL; + + ret [total] = 0; + strcpy (ret, first); + va_start (args, first); + for (s = va_arg (args, char *); s != NULL; s = va_arg(args, char *)){ + strcat (ret, s); + } + va_end (args); + + return ret; +} + +static void +add_to_vector (gchar ***vector, int size, gchar *token) +{ + *vector = *vector == NULL ? + (gchar **)g_malloc(2 * sizeof(*vector)) : + (gchar **)g_realloc(*vector, (size + 1) * sizeof(*vector)); + + (*vector)[size - 1] = token; +} + +gchar ** +g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens) +{ + const gchar *c; + gchar *token, **vector; + gint size = 1; + + g_return_val_if_fail (string != NULL, NULL); + g_return_val_if_fail (delimiter != NULL, NULL); + g_return_val_if_fail (delimiter[0] != 0, NULL); + + if (strncmp (string, delimiter, strlen (delimiter)) == 0) { + vector = (gchar **)g_malloc (2 * sizeof(vector)); + vector[0] = g_strdup (""); + size++; + string += strlen (delimiter); + } else { + vector = NULL; + } + + while (*string && !(max_tokens > 0 && size >= max_tokens)) { + c = string; + if (strncmp (string, delimiter, strlen (delimiter)) == 0) { + token = g_strdup (""); + string += strlen (delimiter); + } else { + while (*string && strncmp (string, delimiter, strlen (delimiter)) != 0) { + string++; + } + + if (*string) { + gsize toklen = (string - c); + token = g_strndup (c, toklen); + + /* Need to leave a trailing empty + * token if the delimiter is the last + * part of the string + */ + if (strcmp (string, delimiter) != 0) { + string += strlen (delimiter); + } + } else { + token = g_strdup (c); + } + } + + add_to_vector (&vector, size, token); + size++; + } + + if (*string) { + /* Add the rest of the string as the last element */ + add_to_vector (&vector, size, g_strdup (string)); + size++; + } + + if (vector == NULL) { + vector = (gchar **) g_malloc (2 * sizeof (vector)); + vector [0] = NULL; + } else if (size > 0) { + vector[size - 1] = NULL; + } + + return vector; +} + +static gboolean +charcmp (gchar testchar, const gchar *compare) +{ + while(*compare) { + if (*compare == testchar) { + return TRUE; + } + compare++; + } + + return FALSE; +} + +gchar ** +g_strsplit_set (const gchar *string, const gchar *delimiter, gint max_tokens) +{ + const gchar *c; + gchar *token, **vector; + gint size = 1; + + g_return_val_if_fail (string != NULL, NULL); + g_return_val_if_fail (delimiter != NULL, NULL); + g_return_val_if_fail (delimiter[0] != 0, NULL); + + if (charcmp (*string, delimiter)) { + vector = (gchar **)g_malloc (2 * sizeof(vector)); + vector[0] = g_strdup (""); + size++; + string++; + } else { + vector = NULL; + } + + c = string; + while (*string && !(max_tokens > 0 && size >= max_tokens)) { + if (charcmp (*string, delimiter)) { + gsize toklen = (string - c); + if (toklen == 0) { + token = g_strdup (""); + } else { + token = g_strndup (c, toklen); + } + + c = string + 1; + + add_to_vector (&vector, size, token); + size++; + } + + string++; + } + + if (max_tokens > 0 && size >= max_tokens) { + if (*string) { + /* Add the rest of the string as the last element */ + add_to_vector (&vector, size, g_strdup (string)); + size++; + } + } else { + if (*c) { + /* Fill in the trailing last token */ + add_to_vector (&vector, size, g_strdup (c)); + size++; + } else { + /* Need to leave a trailing empty token if the + * delimiter is the last part of the string + */ + add_to_vector (&vector, size, g_strdup ("")); + size++; + } + } + + if (vector == NULL) { + vector = (gchar **) g_malloc (2 * sizeof (vector)); + vector [0] = NULL; + } else if (size > 0) { + vector[size - 1] = NULL; + } + + return vector; +} + +gchar * +g_strreverse (gchar *str) +{ + size_t len, half; + size_t i; + gchar c; + + if (str == NULL) + return NULL; + + len = strlen (str); + half = len / 2; + len--; + for (i = 0; i < half; i++, len--) { + c = str [i]; + str [i] = str [len]; + str [len] = c; + } + return str; +} + +gchar * +g_strjoin (const gchar *separator, ...) +{ + va_list args; + char *res, *s; + size_t len, slen; + + if (separator != NULL) + slen = strlen (separator); + else + slen = 0; + len = 0; + va_start (args, separator); + for (s = va_arg (args, char *); s != NULL; s = va_arg (args, char *)){ + len += strlen (s); + len += slen; + } + va_end (args); + if (len == 0) + return g_strdup (""); + + /* Remove the last separator */ + if (slen > 0 && len > 0) + len -= slen; + len++; + res = g_malloc (len); + va_start (args, separator); + s = va_arg (args, char *); + strcpy (res, s); + for (s = va_arg (args, char *); s != NULL; s = va_arg (args, char *)){ + if (separator != NULL) + strcat (res, separator); + strcat (res, s); + } + va_end (args); + + return res; +} + +gchar * +g_strjoinv (const gchar *separator, gchar **str_array) +{ + char *res; + size_t slen, len, i; + + if (separator != NULL) + slen = strlen (separator); + else + slen = 0; + + len = 0; + for (i = 0; str_array [i] != NULL; i++){ + len += strlen (str_array [i]); + len += slen; + } + if (len == 0) + return g_strdup (""); + if (slen > 0 && len > 0) + len -= slen; + len++; + res = g_malloc (len); + strcpy (res, str_array [0]); + for (i = 1; str_array [i] != NULL; i++){ + if (separator != NULL) + strcat (res, separator); + strcat (res, str_array [i]); + } + return res; +} + +gchar * +g_strchug (gchar *str) +{ + size_t len; + gchar *tmp; + + if (str == NULL) + return NULL; + + tmp = str; + while (*tmp && isspace (*tmp)) tmp++; + if (str != tmp) { + len = strlen (str) - (tmp - str - 1); + memmove (str, tmp, len); + } + return str; +} + +gchar * +g_strchomp (gchar *str) +{ + gchar *tmp; + + if (str == NULL) + return NULL; + + tmp = str + strlen (str) - 1; + while (*tmp && isspace (*tmp)) tmp--; + *(tmp + 1) = '\0'; + return str; +} + +gint +g_printf(gchar const *format, ...) +{ + va_list args; + gint ret; + + va_start(args, format); + ret = vprintf(format, args); + va_end(args); + + return ret; +} + +gint +g_fprintf(FILE *file, gchar const *format, ...) +{ + va_list args; + gint ret; + + va_start(args, format); + ret = vfprintf(file, format, args); + va_end(args); + + return ret; +} + +gint +g_sprintf(gchar *string, gchar const *format, ...) +{ + va_list args; + gint ret; + + va_start(args, format); + ret = vsprintf(string, format, args); + va_end(args); + + return ret; +} + +gint +g_snprintf(gchar *string, gulong n, gchar const *format, ...) +{ + va_list args; + gint ret; + + va_start(args, format); + ret = vsnprintf(string, n, format, args); + va_end(args); + + return ret; +} + +static const char hx [] = { '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + +static gboolean +char_needs_encoding (char c) +{ + if (((unsigned char)c) >= 0x80) + return TRUE; + + if ((c >= '@' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '&' && c < 0x3b) || + (c == '!') || (c == '$') || (c == '_') || (c == '=') || (c == '~')) + return FALSE; + return TRUE; +} + +gchar * +g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error) +{ + size_t n; + char *ret, *rp; + const char *p; +#ifdef G_OS_WIN32 + const char *uriPrefix = "file:///"; +#else + const char *uriPrefix = "file://"; +#endif + + g_return_val_if_fail (filename != NULL, NULL); + + if (hostname != NULL) + g_warning ("%s", "eglib: g_filename_to_uri: hostname not handled"); + + if (!g_path_is_absolute (filename)){ + if (error != NULL) + *error = g_error_new (NULL, 2, "Not an absolute filename"); + + return NULL; + } + + n = strlen (uriPrefix) + 1; + for (p = filename; *p; p++){ +#ifdef G_OS_WIN32 + if (*p == '\\') { + n++; + continue; + } +#endif + if (char_needs_encoding (*p)) + n += 3; + else + n++; + } + ret = g_malloc (n); + strcpy (ret, uriPrefix); + for (p = filename, rp = ret + strlen (ret); *p; p++){ +#ifdef G_OS_WIN32 + if (*p == '\\') { + *rp++ = '/'; + continue; + } +#endif + if (char_needs_encoding (*p)){ + *rp++ = '%'; + *rp++ = hx [((unsigned char)(*p)) >> 4]; + *rp++ = hx [((unsigned char)(*p)) & 0xf]; + } else + *rp++ = *p; + } + *rp = 0; + return ret; +} + +static int +decode (char p) +{ + if (p >= '0' && p <= '9') + return p - '0'; + if (p >= 'A' && p <= 'F') + return p - 'A'; + if (p >= 'a' && p <= 'f') + return p - 'a'; + g_assert_not_reached (); + return 0; +} + +gchar * +g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error) +{ + const char *p; + char *r, *result; + int flen = 0; + + g_return_val_if_fail (uri != NULL, NULL); + + if (hostname != NULL) + g_warning ("%s", "eglib: g_filename_from_uri: hostname not handled"); + + if (strncmp (uri, "file:///", 8) != 0){ + if (error != NULL) + *error = g_error_new (NULL, 2, "URI does not start with the file: scheme"); + return NULL; + } + + for (p = uri + 8; *p; p++){ + if (*p == '%'){ + if (p [1] && p [2] && isxdigit (p [1]) && isxdigit (p [2])){ + p += 2; + } else { + if (error != NULL) + *error = g_error_new (NULL, 2, "URI contains an invalid escape sequence"); + return NULL; + } + } + flen++; + } +#ifndef G_OS_WIN32 + flen++; +#endif + + result = g_malloc (flen + 1); + result [flen] = 0; + +#ifndef G_OS_WIN32 + *result = '/'; + r = result + 1; +#else + r = result; +#endif + + for (p = uri + 8; *p; p++){ + if (*p == '%'){ + *r++ = (char)((decode (p [1]) << 4) | decode (p [2])); + p += 2; + } else + *r++ = *p; + flen++; + } + return result; +} + +void +g_strdown (gchar *string) +{ + g_return_if_fail (string != NULL); + + while (*string){ + *string = (gchar)tolower (*string); + string++; + } +} + +gchar +g_ascii_tolower (gchar c) +{ + return c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c; +} + +gchar * +g_ascii_strdown (const gchar *str, gssize len) +{ + char *ret; + int i; + + g_return_val_if_fail (str != NULL, NULL); + + if (len == -1) + len = strlen (str); + + ret = g_malloc (len + 1); + for (i = 0; i < len; i++) + ret [i] = (guchar) g_ascii_tolower (str [i]); + ret [i] = 0; + + return ret; +} + +gint +g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n) +{ + gsize i; + + g_return_val_if_fail (s1 != NULL, 0); + g_return_val_if_fail (s2 != NULL, 0); + + for (i = 0; i < n; i++){ + gchar c1 = g_ascii_tolower (*s1++); + gchar c2 = g_ascii_tolower (*s2++); + + if (c1 == c2) + continue; + + if (c1 == 0) + return -1; + if (c2 == 0) + return 1; + return c1-c2; + } + return 0; +} + +gchar * +g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter) +{ + gchar *ptr; + + g_return_val_if_fail (string != NULL, NULL); + + if (delimiters == NULL) + delimiters = G_STR_DELIMITERS; + + for (ptr = string; *ptr; ptr++) { + if (strchr (delimiters, *ptr)) + *ptr = new_delimiter; + } + + return string; +} + +gsize +g_strlcpy (gchar *dest, const gchar *src, gsize dest_size) +{ +#ifdef HAVE_STRLCPY + return strlcpy (dest, src, dest_size); +#else + gchar *d; + const gchar *s; + gchar c; + gsize len; + + g_return_val_if_fail (src != NULL, 0); + g_return_val_if_fail (dest != NULL, 0); + + len = dest_size; + if (len == 0) + return 0; + + s = src; + d = dest; + while (--len) { + c = *s++; + *d++ = c; + if (c == '\0') + return (dest_size - len - 1); + } + + /* len is 0 i we get here */ + *d = '\0'; + /* we need to return the length of src here */ + while (*s++) ; /* instead of a plain strlen, we use 's' */ + return s - src - 1; +#endif +} + +static const gchar escaped_dflt [256] = { + 1, 1, 1, 1, 1, 1, 1, 1, 'b', 't', 'n', 1, 'f', 'r', 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + +gchar * +g_strescape (const gchar *source, const gchar *exceptions) +{ + gchar escaped [256]; + const gchar *ptr; + gchar c; + gchar op; + gchar *result; + gchar *res_ptr; + + g_return_val_if_fail (source != NULL, NULL); + + memcpy (escaped, escaped_dflt, 256); + if (exceptions != NULL) { + for (ptr = exceptions; *ptr; ptr++) + escaped [(int) *ptr] = 0; + } + result = g_malloc (strlen (source) * 4 + 1); /* Worst case: everything octal. */ + res_ptr = result; + for (ptr = source; *ptr; ptr++) { + c = *ptr; + op = escaped [(int) c]; + if (op == 0) { + *res_ptr++ = c; + } else { + *res_ptr++ = '\\'; + if (op != 1) { + *res_ptr++ = op; + } else { + *res_ptr++ = '0' + ((c >> 6) & 3); + *res_ptr++ = '0' + ((c >> 3) & 7); + *res_ptr++ = '0' + (c & 7); + } + } + } + *res_ptr = '\0'; + return result; +} + +gint +g_ascii_xdigit_value (gchar c) +{ + return ((isxdigit (c) == 0) ? -1 : + ((c >= '0' && c <= '9') ? (c - '0') : + ((c >= 'a' && c <= 'f') ? (c - 'a' + 10) : + (c - 'A' + 10)))); +} + +gchar * +g_strnfill (gsize length, gchar fill_char) +{ + gchar *ret = g_new (gchar, length + 1); + + memset (ret, fill_char, length); + ret [length] = 0; + return ret; +} diff --git a/eglib/src/gstring.c b/eglib/src/gstring.c new file mode 100644 index 0000000000..cc2975d4d8 --- /dev/null +++ b/eglib/src/gstring.c @@ -0,0 +1,201 @@ +/* + * String functions + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <stdio.h> +#include <glib.h> + +#define GROW_IF_NECESSARY(s,l) { \ + if(s->len + l >= s->allocated_len) { \ + s->allocated_len = (s->allocated_len + l + 16) * 2; \ + s->str = g_realloc(s->str, s->allocated_len); \ + } \ +} + +GString * +g_string_new_len (const gchar *init, gssize len) +{ + GString *ret = g_new (GString, 1); + + if (init == NULL) + ret->len = 0; + else + ret->len = len < 0 ? strlen(init) : len; + ret->allocated_len = MAX(ret->len + 1, 16); + ret->str = g_malloc(ret->allocated_len); + if (init) + memcpy(ret->str, init, ret->len); + ret->str[ret->len] = 0; + + return ret; +} + +GString * +g_string_new (const gchar *init) +{ + return g_string_new_len(init, -1); +} + +GString * +g_string_sized_new (gsize default_size) +{ + GString *ret = g_new (GString, 1); + + ret->str = g_malloc (default_size); + ret->str [0] = 0; + ret->len = 0; + ret->allocated_len = default_size; + + return ret; +} + +gchar * +g_string_free (GString *string, gboolean free_segment) +{ + gchar *data; + + g_return_val_if_fail (string != NULL, NULL); + + data = string->str; + g_free(string); + + if(!free_segment) { + return data; + } + + g_free(data); + return NULL; +} + +GString * +g_string_append_len (GString *string, const gchar *val, gssize len) +{ + g_return_val_if_fail(string != NULL, NULL); + g_return_val_if_fail(val != NULL, string); + + if(len < 0) { + len = strlen(val); + } + + GROW_IF_NECESSARY(string, len); + memcpy(string->str + string->len, val, len); + string->len += len; + string->str[string->len] = 0; + + return string; +} + +GString * +g_string_append (GString *string, const gchar *val) +{ + g_return_val_if_fail(string != NULL, NULL); + g_return_val_if_fail(val != NULL, string); + + return g_string_append_len(string, val, -1); +} + +GString * +g_string_append_c (GString *string, gchar c) +{ + g_return_val_if_fail(string != NULL, NULL); + + GROW_IF_NECESSARY(string, 1); + + string->str[string->len] = c; + string->str[string->len + 1] = 0; + string->len++; + + return string; +} + +GString * +g_string_prepend (GString *string, const gchar *val) +{ + gssize len; + + g_return_val_if_fail (string != NULL, string); + g_return_val_if_fail (val != NULL, string); + + len = strlen (val); + + GROW_IF_NECESSARY(string, len); + memmove(string->str + len, string->str, string->len + 1); + memcpy(string->str, val, len); + + return string; +} + +void +g_string_append_printf (GString *string, const gchar *format, ...) +{ + char *ret; + va_list args; + + g_return_if_fail (string != NULL); + g_return_if_fail (format != NULL); + + va_start (args, format); + ret = g_strdup_vprintf (format, args); + va_end (args); + g_string_append (string, ret); + + g_free (ret); +} + +void +g_string_printf (GString *string, const gchar *format, ...) +{ + va_list args; + + g_return_if_fail (string != NULL); + g_return_if_fail (format != NULL); + + g_free (string->str); + + va_start (args, format); + string->str = g_strdup_vprintf (format, args); + va_end (args); + + string->len = strlen (string->str); + string->allocated_len = string->len+1; +} + +GString * +g_string_truncate (GString *string, gsize len) +{ + g_return_val_if_fail (string != NULL, string); + + /* Silent return */ + if (len < 0 || len >= string->len) { + return string; + } + + string->len = len; + string->str[len] = 0; + return string; +} + diff --git a/eglib/src/gtimer-unix.c b/eglib/src/gtimer-unix.c new file mode 100644 index 0000000000..085e2c17c8 --- /dev/null +++ b/eglib/src/gtimer-unix.c @@ -0,0 +1,96 @@ +/* + * Timer + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <sys/time.h> + +struct _GTimer { + struct timeval start; + struct timeval stop; +}; + +GTimer *g_timer_new (void) +{ + GTimer *timer; + + timer = g_new0 (GTimer, 1); + g_timer_start (timer); + return timer; +} + +void +g_timer_destroy (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + g_free (timer); +} + +void +g_timer_start (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + gettimeofday (&timer->start, NULL); + memset (&timer->stop, 0, sizeof (struct timeval)); +} + +void +g_timer_stop (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + gettimeofday (&timer->stop, NULL); +} + +gdouble +g_timer_elapsed (GTimer *timer, gulong *microseconds) +{ + struct timeval tv; + gulong seconds; + long usec; + gdouble result; + + g_return_val_if_fail (timer != NULL, 0.0); + + if (timer->stop.tv_sec == 0 && timer->stop.tv_usec == 0) { + gettimeofday (&tv, NULL); + } else { + tv = timer->stop; + } + + usec = (tv.tv_usec) - (timer->start.tv_usec); + seconds = tv.tv_sec - timer->start.tv_sec; + if (microseconds) { + if (usec < 0) { + usec += 1000000; + seconds--; + } + *microseconds = usec; + } + result = seconds * 1000000 + usec; + return (result / 1000000); +} + + diff --git a/eglib/src/gtimer-win32.c b/eglib/src/gtimer-win32.c new file mode 100644 index 0000000000..07e802bda1 --- /dev/null +++ b/eglib/src/gtimer-win32.c @@ -0,0 +1,94 @@ +/* + * Timer + * + * Author: + * Gonzalo Paniagua Javier (gonzalo@novell.com + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include <glib.h> +#include <windows.h> + +struct _GTimer { + guint64 start; + guint64 stop; +}; + +GTimer *g_timer_new (void) +{ + GTimer *timer; + + timer = g_new0 (GTimer, 1); + g_timer_start (timer); + return timer; +} + +void +g_timer_destroy (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + g_free (timer); +} + +void +g_timer_start (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + + QueryPerformanceCounter ((LARGE_INTEGER*)&timer->start); +} + +void +g_timer_stop (GTimer *timer) +{ + g_return_if_fail (timer != NULL); + + QueryPerformanceCounter ((LARGE_INTEGER*)&timer->stop); +} + +gdouble +g_timer_elapsed (GTimer *timer, gulong *microseconds) +{ + static guint64 freq = 0; + guint64 delta, stop; + + if (freq == 0) { + if (!QueryPerformanceFrequency ((LARGE_INTEGER *)&freq)) + freq = 1; + } + + if (timer->stop == 0) { + QueryPerformanceCounter ((LARGE_INTEGER*)&stop); + } + else { + stop = timer->stop; + } + + delta = stop - timer->start; + + if (microseconds) + *microseconds = (gulong) (delta * (1000000.0 / freq)); + + return (gdouble) delta / (gdouble) freq; +} + + diff --git a/eglib/src/gunicode.c b/eglib/src/gunicode.c new file mode 100644 index 0000000000..af11774446 --- /dev/null +++ b/eglib/src/gunicode.c @@ -0,0 +1,451 @@ +/* + * gunicode.c: Some Unicode routines + * + * Author: + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2006 Novell, Inc. + * + * utf8 validation code came from: + * libxml2-2.6.26 licensed under the MIT X11 license + * + * Authors credit in libxml's string.c: + * William Brack <wbrack@mmm.com.hk> + * daniel@veillard.com + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ +#include <config.h> +#include <stdio.h> +#include <glib.h> +#include <unicode-data.h> +#include <errno.h> + +#if defined(_MSC_VER) || defined(G_OS_WIN32) +/* FIXME */ +# define CODESET 1 +# include <windows.h> +# ifdef _MSC_VER + typedef int iconv_t; +# endif +#else +# ifdef HAVE_LANGINFO_H +# include <langinfo.h> +# endif +# ifdef HAVE_ICONV_H +# include <iconv.h> +# endif +#endif + +static char *my_charset; +static gboolean is_utf8; + +/* + * Character set conversion + */ +/* +* Index into the table below with the first byte of a UTF-8 sequence to +* get the number of trailing bytes that are supposed to follow it. +* Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is +* left as-is for anyone who may want to do such conversion, which was +* allowed in earlier algorithms. +*/ +const gchar g_trailingBytesForUTF8 [256] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,0,0 +}; + +/* +* Magic values subtracted from a buffer value during UTF8 conversion. +* This table contains as many values as there might be trailing bytes +* in a UTF-8 sequence. +*/ +static const gulong offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, +0x03C82080UL, 0xFA082080UL, 0x82082080UL }; + +GUnicodeType +g_unichar_type (gunichar c) +{ +int i; + + guint16 cp = (guint16) c; + for (i = 0; i < unicode_category_ranges_count; i++) { + if (cp < unicode_category_ranges [i].start) + continue; + if (unicode_category_ranges [i].end <= cp) + continue; + return unicode_category [i] [cp - unicode_category_ranges [i].start]; + } + + /* + // 3400-4DB5: OtherLetter + // 4E00-9FC3: OtherLetter + // AC00-D7A3: OtherLetter + // D800-DFFF: OtherSurrogate + // E000-F8FF: OtherPrivateUse + // 20000-2A6D6 OtherLetter + // F0000-FFFFD OtherPrivateUse + // 100000-10FFFD OtherPrivateUse + */ + if (0x3400 <= cp && cp < 0x4DB5) + return G_UNICODE_OTHER_LETTER; + if (0x4E00 <= cp && cp < 0x9FC3) + return G_UNICODE_OTHER_LETTER; + if (0xAC00<= cp && cp < 0xD7A3) + return G_UNICODE_OTHER_LETTER; + if (0xD800 <= cp && cp < 0xDFFF) + return G_UNICODE_SURROGATE; + if (0xE000 <= cp && cp < 0xF8FF) + return G_UNICODE_PRIVATE_USE; + /* since the argument is UTF-16, we cannot check beyond FFFF */ + + /* It should match any of above */ + return 0; +} + +gunichar +g_unichar_case (gunichar c, gboolean upper) +{ + gint8 i, i2; + guint32 cp = (guint32) c, v; + + for (i = 0; i < simple_case_map_ranges_count; i++) { + if (cp < simple_case_map_ranges [i].start) + return c; + if (simple_case_map_ranges [i].end <= cp) + continue; + if (c < 0x10000) { + const guint16 *tab = upper ? simple_upper_case_mapping_lowarea [i] : simple_lower_case_mapping_lowarea [i]; + v = tab [cp - simple_case_map_ranges [i].start]; + } else { + const guint32 *tab; + i2 = (gint8)(i - (upper ? simple_upper_case_mapping_lowarea_table_count : simple_lower_case_mapping_lowarea_table_count)); + tab = upper ? simple_upper_case_mapping_higharea [i2] : simple_lower_case_mapping_higharea [i2]; + v = tab [cp - simple_case_map_ranges [i].start]; + } + return v != 0 ? (gunichar) v : c; + } + return c; +} + +gunichar +g_unichar_toupper (gunichar c) +{ + return g_unichar_case (c, TRUE); +} + +gunichar +g_unichar_tolower (gunichar c) +{ + return g_unichar_case (c, FALSE); +} + +gunichar +g_unichar_totitle (gunichar c) +{ + guint8 i; + guint32 cp; + + cp = (guint32) c; + for (i = 0; i < simple_titlecase_mapping_count; i++) { + if (simple_titlecase_mapping [i].codepoint == cp) + return simple_titlecase_mapping [i].title; + if (simple_titlecase_mapping [i].codepoint > cp) + /* it is ordered, hence no more match */ + break; + } + return g_unichar_toupper (c); +} + +gboolean +g_unichar_isxdigit (gunichar c) +{ + return (g_unichar_xdigit_value (c) != -1); + +} + +gint +g_unichar_xdigit_value (gunichar c) +{ + if (c >= 0x30 && c <= 0x39) /*0-9*/ + return (c - 0x30); + if (c >= 0x41 && c <= 0x46) /*A-F*/ + return (c - 0x37); + if (c >= 0x61 && c <= 0x66) /*a-f*/ + return (c - 0x57); + return -1; +} + +gchar * +g_convert (const gchar *str, gssize len, + const gchar *to_codeset, const gchar *from_codeset, + gsize *bytes_read, gsize *bytes_written, GError **error) +{ + char *result = NULL; +#ifdef G_OS_WIN32 +#elif HAVE_ICONV_H + iconv_t convertor; + char *buffer, *output; + const char *strptr = (const char *) str; + size_t str_len = len == -1 ? strlen (str) : len; + size_t buffer_size; + size_t left, out_left; + + convertor = iconv_open (to_codeset, from_codeset); + if (convertor == (iconv_t) -1){ + *bytes_written = 0; + *bytes_read = 0; + return NULL; + } + + buffer_size = str_len + 1 + 8; + buffer = g_malloc (buffer_size); + out_left = str_len; + output = buffer; + left = str_len; + while (left > 0){ + int res = iconv (convertor, (char **) &strptr, &left, &output, &out_left); + if (res == (size_t) -1){ + if (errno == E2BIG){ + char *n; + size_t extra_space = 8 + left; + size_t output_used = output - buffer; + + buffer_size += extra_space; + + n = g_realloc (buffer, buffer_size); + + if (n == NULL){ + if (error != NULL) + *error = g_error_new (NULL, G_CONVERT_ERROR_FAILED, "No memory left"); + g_free (buffer); + result = NULL; + goto leave; + } + buffer = n; + out_left += extra_space; + output = buffer + output_used; + } else if (errno == EILSEQ){ + if (error != NULL) + *error = g_error_new (NULL, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "Invalid multi-byte sequence on input"); + result = NULL; + g_free (buffer); + goto leave; + } else if (errno == EINVAL){ + if (error != NULL) + *error = g_error_new (NULL, G_CONVERT_ERROR_PARTIAL_INPUT, "Partial character sequence"); + result = NULL; + g_free (buffer); + goto leave; + } + } + } + if (bytes_read != NULL) + *bytes_read = strptr - str; + if (bytes_written != NULL) + *bytes_written = output - buffer; + *output = 0; + result = buffer; + leave: + iconv_close (convertor); +#endif + return result; +} + +/* + * This is broken, and assumes an UTF8 system, but will do for eglib's first user + */ +gchar * +g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) +{ + char *res; + + if (len == -1) + len = strlen (utf8string); + + res = g_malloc (len + 1); + g_strlcpy (res, utf8string, len + 1); + return res; +} + +gboolean +g_get_charset (G_CONST_RETURN char **charset) +{ +#ifdef G_OS_WIN32 + static char buf[14]; + sprintf (buf, "CP%u", GetACP ()); + *charset = buf; + is_utf8 = FALSE; +#else + if (my_charset == NULL){ + /* These shouldn't be heap allocated */ +#if HAVE_LANGINFO_H + my_charset = nl_langinfo (CODESET); +#else + my_charset = "UTF-8"; +#endif + is_utf8 = strcmp (my_charset, "UTF-8") == 0; + } + + if (charset != NULL) + *charset = my_charset; + +#endif + return is_utf8; +} + +gchar * +g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) +{ + g_get_charset (NULL); + + return g_convert (opsysstring, len, "UTF-8", my_charset, bytes_read, bytes_written, error); +} + +gchar * +g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) +{ + g_get_charset (NULL); + + return g_convert (utf8string, len, my_charset, "UTF-8", bytes_read, bytes_written, error); +} +/** + * g_utf8_validate + * @utf: Pointer to putative UTF-8 encoded string. + * + * Checks @utf for being valid UTF-8. @utf is assumed to be + * null-terminated. This function is not super-strict, as it will + * allow longer UTF-8 sequences than necessary. Note that Java is + * capable of producing these sequences if provoked. Also note, this + * routine checks for the 4-byte maximum size, but does not check for + * 0x10ffff maximum value. + * + * Return value: true if @utf is valid. + **/ +gboolean +g_utf8_validate (const gchar *str, gssize max_len, const gchar **end) +{ + gssize byteCount = 0; + gboolean retVal = TRUE; + gboolean lastRet = TRUE; + guchar* ptr = (guchar*) str; + guint length; + guchar a; + guchar* srcPtr; + if (max_len == 0) + return 0; + else if (max_len < 0) + byteCount = max_len; + while (*ptr != 0 && byteCount <= max_len) { + length = g_trailingBytesForUTF8 [*ptr] + 1; + srcPtr = (guchar*) ptr + length; + switch (length) { + default: retVal = FALSE; + /* Everything else falls through when "TRUE"... */ + case 4: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE; + if ((a == (guchar) 0xBF || a == (guchar) 0xBE) && *(srcPtr-1) == (guchar) 0xBF) { + if (*(srcPtr-2) == (guchar) 0x8F || *(srcPtr-2) == (guchar) 0x9F || + *(srcPtr-2) == (guchar) 0xAF || *(srcPtr-2) == (guchar) 0xBF) + retVal = FALSE; + } + case 3: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE; + case 2: if ((a = (*--srcPtr)) < (guchar) 0x80 || a > (guchar) 0xBF) retVal = FALSE; + + switch (*ptr) { + /* no fall-through in this inner switch */ + case 0xE0: if (a < (guchar) 0xA0) retVal = FALSE; break; + case 0xED: if (a > (guchar) 0x9F) retVal = FALSE; break; + case 0xEF: if (a == (guchar)0xB7 && (*(srcPtr+1) > (guchar) 0x8F && *(srcPtr+1) < 0xB0)) retVal = FALSE; + if (a == (guchar)0xBF && (*(srcPtr+1) == (guchar) 0xBE || *(srcPtr+1) == 0xBF)) retVal = FALSE; break; + case 0xF0: if (a < (guchar) 0x90) retVal = FALSE; break; + case 0xF4: if (a > (guchar) 0x8F) retVal = FALSE; break; + default: if (a < (guchar) 0x80) retVal = FALSE; + } + + case 1: if (*ptr >= (guchar ) 0x80 && *ptr < (guchar) 0xC2) retVal = FALSE; + } + if (*ptr > (guchar) 0xF4) + retVal = FALSE; + //If the string is invalid, set the end to the invalid byte. + if (!retVal && lastRet) { + if (end != NULL) + *end = (gchar*) ptr; + lastRet = FALSE; + } + ptr += length; + if(max_len > 0) + byteCount += length; + } + if (retVal && end != NULL) + *end = (gchar*) ptr; + return retVal; +} +/** + * g_utf8_get_char + * @src: Pointer to UTF-8 encoded character. + * + * Return value: UTF-16 value of @src + **/ +gunichar +g_utf8_get_char (const gchar *src) +{ + gunichar ch = 0; + guchar* ptr = (guchar*) src; + gushort extraBytesToRead = g_trailingBytesForUTF8 [*ptr]; + + switch (extraBytesToRead) { + case 5: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8 + case 4: ch += *ptr++; ch <<= 6; // remember, illegal UTF-8 + case 3: ch += *ptr++; ch <<= 6; + case 2: ch += *ptr++; ch <<= 6; + case 1: ch += *ptr++; ch <<= 6; + case 0: ch += *ptr; + } + ch -= offsetsFromUTF8 [extraBytesToRead]; + return ch; +} +glong +g_utf8_strlen (const gchar *str, gssize max) +{ + gssize byteCount = 0; + guchar* ptr = (guchar*) str; + glong length = 0; + if (max == 0) + return 0; + else if (max < 0) + byteCount = max; + while (*ptr != 0 && byteCount <= max) { + gssize cLen = g_trailingBytesForUTF8 [*ptr] + 1; + if (max > 0 && (byteCount + cLen) > max) + return length; + ptr += cLen; + length++; + if (max > 0) + byteCount += cLen; + } + return length; +} diff --git a/eglib/src/gutf8.c b/eglib/src/gutf8.c new file mode 100644 index 0000000000..3f1fab4729 --- /dev/null +++ b/eglib/src/gutf8.c @@ -0,0 +1,610 @@ +/* + * gutf8.c: UTF-8 conversion + * + * Author: + * Atsushi Enomoto <atsushi@ximian.com> + * + * (C) 2006 Novell, Inc. + */ + +#include <stdio.h> +#include <glib.h> + +gpointer error_quark = "ERROR"; + +static glong utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **error); +static glong utf16_to_utf8_len (const gunichar2 *str, glong len, glong *items_read, GError **error); + +gpointer +g_convert_error_quark () +{ + return error_quark; +} + +static gunichar* +utf8_case_conv (const gchar *str, gssize len, gboolean upper) +{ + glong i, u16len, u32len; + gunichar2 *u16str; + gunichar *u32str; + gchar *u8str; + GError **err = NULL; + + u16str = g_utf8_to_utf16 (str, (glong)len, NULL, &u16len, err); + u32str = g_utf16_to_ucs4 (u16str, u16len, NULL, &u32len, err); + for (i = 0; i < u32len; i++) { + u32str [i] = upper ? g_unichar_toupper (u32str [i]) : g_unichar_tolower (u32str [i]); + } + g_free (u16str); + u16str = g_ucs4_to_utf16 (u32str, u32len, NULL, &u16len, err); + u8str = g_utf16_to_utf8 (u16str, u16len, NULL, NULL, err); + g_free (u32str); + g_free (u16str); + return (gunichar*)u8str; +} + +gchar* +g_utf8_strup (const gchar *str, gssize len) +{ + return (gchar*)utf8_case_conv (str, len, TRUE); +} + +gchar* +g_utf8_strdown (const gchar *str, gssize len) +{ + return (gchar*)utf8_case_conv (str, len, FALSE); +} + +static glong +utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **error) +{ + /* It is almost identical to UTF8Encoding.GetCharCount() */ + guchar ch, mb_size, mb_remain; + gboolean overlong; + guint32 codepoint; + glong in_pos, ret; + + if (len < 0) + len = strlen (str); + + in_pos = 0; + ret = 0; + + /* Common case */ + for (in_pos = 0; in_pos < len && str [in_pos] < 0x80; in_pos++) + ret ++; + + if (in_pos == len) + return ret; + + mb_size = 0; + mb_remain = 0; + overlong = 0; + + for (; in_pos < len; in_pos++) { + ch = str [in_pos]; + if (mb_size == 0) { + if (ch < 0x80) + ret++; + else if ((ch & 0xE0) == 0xC0) { + codepoint = ch & 0x1F; + mb_size = 2; + } else if ((ch & 0xF0) == 0xE0) { + codepoint = ch & 0x0F; + mb_size = 3; + } else if ((ch & 0xF8) == 0xF0) { + codepoint = ch & 7; + mb_size = 4; + } else if ((ch & 0xFC) == 0xF8) { + codepoint = ch & 3; + mb_size = 5; + } else if ((ch & 0xFE) == 0xFC) { + codepoint = ch & 3; + mb_size = 6; + } else { + /* invalid utf-8 sequence */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-8 sequence at %d (illegal first byte)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } else { + codepoint = 0; + mb_remain = mb_size = 0; + } + } + if (mb_size > 1) + mb_remain = mb_size - 1; + } else { + if ((ch & 0xC0) == 0x80) { + codepoint = (codepoint << 6) | (ch & 0x3F); + if (--mb_remain == 0) { + /* multi byte character is fully consumed now. */ + if (codepoint < 0x10000) { + switch (mb_size) { + case 2: + overlong = codepoint < 0x7F; + break; + case 3: + overlong = codepoint < 0x7FF; + break; + case 4: + overlong = codepoint < 0xFFFF; + break; + case 5: + overlong = codepoint < 0x1FFFFF; + break; + case 6: + overlong = codepoint < 0x03FFFFFF; + break; + } + if (overlong) { + /* invalid utf-8 sequence (overlong) */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-8 sequence at %d (overlong)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } else { + codepoint = 0; + mb_remain = 0; + overlong = FALSE; + } + } + else + ret++; + } else if (codepoint < 0x110000) { + /* surrogate pair */ + ret += 2; + } else { + /* invalid utf-8 sequence (excess) */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-8 sequence at %d (codepoint range excess)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } else { + codepoint = 0; + mb_remain = 0; + } + } + mb_size = 0; + } + } else { + /* invalid utf-8 sequence */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-8 sequence at %d (illegal following bytes)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } else { + codepoint = 0; + mb_remain = mb_size = 0; + } + } + } + } + + if (items_read) + *items_read = in_pos; + return ret; +} + +gunichar2* +g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error) +{ + /* The conversion logic is almost identical to UTF8Encoding.GetChars(), + but error check is always done at utf8_to_utf16_len() so that + the conversion core below simply resets erroreous bits */ + glong utf16_len; + gunichar2 *ret; + guchar ch, mb_size, mb_remain; + guint32 codepoint; + glong in_pos, out_pos; + + utf16_len = 0; + mb_size = 0; + mb_remain = 0; + in_pos = 0; + out_pos = 0; + + if (error) + *error = NULL; + + if (len < 0) + len = strlen (str); + + if (items_written) + *items_written = 0; + utf16_len = utf8_to_utf16_len (str, len, items_read, error); + if (error) + if (*error) + return NULL; + if (utf16_len < 0) + return NULL; + + ret = g_malloc ((1 + utf16_len) * sizeof (gunichar2)); + + /* Common case */ + for (in_pos = 0; in_pos < len; in_pos++) { + ch = (guchar) str [in_pos]; + + if (ch >= 0x80) + break; + ret [out_pos++] = ch; + } + + for (; in_pos < len; in_pos++) { + ch = (guchar) str [in_pos]; + if (mb_size == 0) { + if (ch < 0x80) + ret [out_pos++] = ch; + else if ((ch & 0xE0) == 0xC0) { + codepoint = ch & 0x1F; + mb_size = 2; + } else if ((ch & 0xF0) == 0xE0) { + codepoint = ch & 0x0F; + mb_size = 3; + } else if ((ch & 0xF8) == 0xF0) { + codepoint = ch & 7; + mb_size = 4; + } else if ((ch & 0xFC) == 0xF8) { + codepoint = ch & 3; + mb_size = 5; + } else if ((ch & 0xFE) == 0xFC) { + codepoint = ch & 3; + mb_size = 6; + } else { + /* invalid utf-8 sequence */ + codepoint = 0; + mb_remain = mb_size = 0; + } + if (mb_size > 1) + mb_remain = mb_size - 1; + } else { + if ((ch & 0xC0) == 0x80) { + codepoint = (codepoint << 6) | (ch & 0x3F); + if (--mb_remain == 0) { + /* multi byte character is fully consumed now. */ + if (codepoint < 0x10000) { + ret [out_pos++] = (gunichar2)(codepoint % 0x10000); + } else if (codepoint < 0x110000) { + /* surrogate pair */ + codepoint -= 0x10000; + ret [out_pos++] = (gunichar2)((codepoint >> 10) + 0xD800); + ret [out_pos++] = (gunichar2)((codepoint & 0x3FF) + 0xDC00); + } else { + /* invalid utf-8 sequence (excess) */ + codepoint = 0; + mb_remain = 0; + } + mb_size = 0; + } + } else { + /* invalid utf-8 sequence */ + codepoint = 0; + mb_remain = mb_size = 0; + } + } + } + + ret [out_pos] = 0; + if (items_written) + *items_written = out_pos; + return ret; +} + +gchar* +g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error) +{ + /* The conversion logic is almost identical to UTF8Encoding.GetBytes(), + but error check is always done at utf16_to_utf8_len() so that + the conversion core below simply resets erroreous bits */ + glong utf8_len; + gchar *ret; + glong in_pos, out_pos; + gunichar2 ch; + guint32 codepoint = 0; + gboolean surrogate; + + in_pos = 0; + out_pos = 0; + surrogate = FALSE; + + if (items_written) + *items_written = 0; + utf8_len = utf16_to_utf8_len (str, len, items_read, error); + if (error) + if (*error) + return NULL; + if (utf8_len < 0) + return NULL; + + ret = g_malloc ((1+utf8_len) * sizeof (gchar)); + + while (len < 0 ? str [in_pos] : in_pos < len) { + ch = str [in_pos]; + if (surrogate) { + if (ch >= 0xDC00 && ch <= 0xDFFF) { + codepoint = 0x10000 + (ch - 0xDC00) + ((surrogate - 0xD800) << 10); + surrogate = 0; + } else { + surrogate = 0; + /* invalid surrogate pair */ + continue; + } + } else { + /* fast path optimization */ + if (ch < 0x80) { + for (; len < 0 ? str [in_pos] : in_pos < len; in_pos++) { + if (str [in_pos] < 0x80) + ret [out_pos++] = (gchar)(str [in_pos]); + else + break; + } + continue; + } + else if (ch >= 0xD800 && ch <= 0xDBFF) + surrogate = ch; + else if (ch >= 0xDC00 && ch <= 0xDFFF) { + /* invalid surrogate pair */ + continue; + } + else + codepoint = ch; + } + in_pos++; + + if (surrogate != 0) + continue; + if (codepoint < 0x80) + ret [out_pos++] = (gchar) codepoint; + else if (codepoint < 0x0800) { + ret [out_pos++] = (gchar) (0xC0 | (codepoint >> 6)); + ret [out_pos++] = (gchar) (0x80 | (codepoint & 0x3F)); + } else if (codepoint < 0x10000) { + ret [out_pos++] = (gchar) (0xE0 | (codepoint >> 12)); + ret [out_pos++] = (gchar) (0x80 | ((codepoint >> 6) & 0x3F)); + ret [out_pos++] = (gchar) (0x80 | (codepoint & 0x3F)); + } else { + ret [out_pos++] = (gchar) (0xF0 | (codepoint >> 18)); + ret [out_pos++] = (gchar) (0x80 | ((codepoint >> 12) & 0x3F)); + ret [out_pos++] = (gchar) (0x80 | ((codepoint >> 6) & 0x3F)); + ret [out_pos++] = (gchar) (0x80 | (codepoint & 0x3F)); + } + } + ret [out_pos] = 0; + + if (items_written) + *items_written = out_pos; + return ret; +} + +static glong +utf16_to_utf8_len (const gunichar2 *str, glong len, glong *items_read, GError **error) +{ + glong ret, in_pos; + gunichar2 ch; + gboolean surrogate; + + ret = 0; + in_pos = 0; + surrogate = FALSE; + + while (len < 0 ? str [in_pos] : in_pos < len) { + ch = str [in_pos]; + if (surrogate) { + if (ch >= 0xDC00 && ch <= 0xDFFF) { + ret += 4; + } else { + /* invalid surrogate pair */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-16 sequence at %d (missing surrogate tail)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } /* otherwise just ignore. */ + } + surrogate = FALSE; + } else { + /* fast path optimization */ + if (ch < 0x80) { + for (; len < 0 ? str [in_pos] : in_pos < len; in_pos++) { + if (str [in_pos] < 0x80) + ++ret; + else + break; + } + continue; + } + else if (ch < 0x0800) + ret += 2; + else if (ch >= 0xD800 && ch <= 0xDBFF) + surrogate = TRUE; + else if (ch >= 0xDC00 && ch <= 0xDFFF) { + /* invalid surrogate pair */ + if (error) { + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "invalid utf-16 sequence at %d (missing surrogate head)", in_pos); + if (items_read) + *items_read = in_pos; + return -1; + } /* otherwise just ignore. */ + } + else + ret += 3; + } + in_pos++; + } + + if (items_read) + *items_read = in_pos; + return ret; +} + +static glong +g_ucs4_to_utf16_len (const gunichar *str, glong len, glong *items_read, GError **error) +{ + glong retlen = 0; + glong errindex = 0; + const gunichar *lstr = str; + + if (!str) + return 0; + + while (*lstr != '\0' && len--) { + gunichar ch; + ch = *lstr++; + if (ch <= 0x0000FFFF) { + if (ch >= 0xD800 && ch <= 0xDFFF) { + errindex = (glong)(lstr - str)-1; + if (error) + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + "Invalid sequence in conversion input"); + if (items_read) + *items_read = errindex; + return 0; + } else { + retlen++; + } + } else if (ch > 0x10FFFF) { + errindex = (glong)(lstr - str)-1; + if (error) + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + "Character out of range for UTF-16"); + if (items_read) + *items_read = errindex; + return 0; + + } else { + retlen+=2; + } + } + + if (items_read) + *items_read = (glong)(lstr - str); + return retlen; +} + +gunichar2* +g_ucs4_to_utf16 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **error) +{ + glong allocsz; + gunichar2 *retstr = 0; + gunichar2 *retch = 0; + glong nwritten = 0; + GError *lerror =0 ; + + allocsz = g_ucs4_to_utf16_len (str, len, items_read, &lerror); + + if (!lerror) { + retch = retstr = g_malloc ((allocsz+1) * sizeof (gunichar2)); + retstr[allocsz] = '\0'; + + while (*str != '\0' && len--) { + gunichar ch; + ch = *str++; + if (ch <= 0x0000FFFF && (ch < 0xD800 || ch > 0xDFFF)) { + *retch++ = (gunichar2)ch; + nwritten ++; + } else { + ch -= 0x0010000UL; + *retch++ = (gunichar2)((ch >> 10) + 0xD800); + *retch++ = (gunichar2)((ch & 0x3FFUL) + 0xDC00); + nwritten +=2; + } + } + } + + if (items_written) + *items_written = nwritten; + if (error) + *error = lerror; + + return retstr; +} + +static glong +g_utf16_to_ucs4_len (const gunichar2 *str, glong len, glong *items_read, GError **error) +{ + glong retlen = 0; + glong errindex = 0; + const gunichar2 *lstr = str; + gunichar2 ch,ch2; + + if (!str) + return 0; + + while (*lstr != '\0' && len--) { + ch = *lstr++; + if (ch >= 0xD800 && ch <= 0xDBFF) { + if (!len--) { + lstr--; + break; + } + ch2 = *lstr; + if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { + lstr++; + } else { + errindex = (glong)(lstr - str); + if (error) + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + "Invalid sequence in conversion input"); + if (items_read) + *items_read = errindex; + return 0; + } + } else { + if (ch >= 0xDC00 && ch <= 0xDFFF) { + errindex = (glong)(lstr - str)-1; + if (error) + g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + "Invalid sequence in conversion input"); + if (items_read) + *items_read = errindex; + return 0; + } + } + retlen++; + } + + if (items_read) + *items_read = (glong)(lstr - str); + + return retlen; +} + +gunichar* +g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error) +{ + glong allocsz; + gunichar *retstr = 0; + gunichar *retch = 0; + glong nwritten = 0; + GError *lerror =0 ; + gunichar ch,ch2; + + allocsz = g_utf16_to_ucs4_len (str, len, items_read, &lerror); + + if (!lerror) { + retch = retstr = g_malloc ((allocsz+1) * sizeof (gunichar)); + retstr[allocsz] = '\0'; + nwritten = allocsz; + + while (*str != '\0' && allocsz--) { + ch = *str++; + if (ch >= 0xD800 && ch <= 0xDBFF) { + ch2 = *str++; + ch = ((ch - (gunichar)0xD800) << 10) + + (ch2 - (gunichar)0xDC00) + (gunichar)0x0010000UL; + } + *retch++ = ch; + } + } + + if (items_written) + *items_written = nwritten; + if (error) + *error = lerror; + + return retstr; +} diff --git a/eglib/src/sort.frag.h b/eglib/src/sort.frag.h new file mode 100644 index 0000000000..2cf5a9ba1f --- /dev/null +++ b/eglib/src/sort.frag.h @@ -0,0 +1,184 @@ +/* + * sort.frag.h: Common implementation of linked-list sorting + * + * Author: + * Raja R Harinath (rharinath@novell.com) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * (C) 2006 Novell, Inc. + */ + +/* + * This code requires a typedef named 'list_node' for the list node. It + * is assumed that the list type is the type of a pointer to a list + * node, and that the node has a field named 'next' that implements to + * the linked list. No additional invariant is maintained (e.g. the + * 'prev' pointer of a doubly-linked list node is _not_ updated). Any + * invariant would require a post-processing pass to fix matters if + * necessary. + */ +typedef list_node *digit; + +/* + * The maximum possible depth of the merge tree + * = ceiling (log2 (maximum number of list nodes)) + * = ceiling (log2 (maximum possible memory size/size of each list node)) + * = number of bits in 'size_t' - floor (log2 (sizeof digit)) + * Also, each list in sort_info is at least 2 nodes long: we can reduce the depth by 1 + */ +#define FLOOR_LOG2(x) (((x)>=2) + ((x)>=4) + ((x)>=8) + ((x)>=16) + ((x)>=32) + ((x)>=64) + ((x)>=128)) +#define MAX_RANKS ((sizeof (size_t) * 8) - FLOOR_LOG2(sizeof (list_node)) - 1) + +struct sort_info +{ + int min_rank, n_ranks; + GCompareFunc func; + + /* Invariant: ranks[i] == NULL || length(ranks[i]) >= 2**(i+1) */ + list_node *ranks [MAX_RANKS]; /* ~ 128 bytes on 32bit, ~ 512 bytes on 64bit */ +}; + +static inline void +init_sort_info (struct sort_info *si, GCompareFunc func) +{ + si->min_rank = si->n_ranks = 0; + si->func = func; + /* we don't need to initialize si->ranks, since we never lookup past si->n_ranks. */ +} + +static inline list_node * +merge_lists (list_node *first, list_node *second, GCompareFunc func) +{ + /* merge the two lists */ + list_node *list = NULL; + list_node **pos = &list; + while (first && second) { + if (func (first->data, second->data) > 0) { + *pos = second; + second = second->next; + } else { + *pos = first; + first = first->next; + } + pos = &((*pos)->next); + } + *pos = first ? first : second; + return list; +} + +/* Pre-condition: upto <= si->n_ranks, list == NULL || length(list) == 1 */ +static inline list_node * +sweep_up (struct sort_info *si, list_node *list, int upto) +{ + int i; + for (i = si->min_rank; i < upto; ++i) { + list = merge_lists (si->ranks [i], list, si->func); + si->ranks [i] = NULL; + } + return list; +} + +/* + * The 'ranks' array essentially captures the recursion stack of a mergesort. + * The merge tree is built in a bottom-up manner. The control loop for + * updating the 'ranks' array is analogous to incrementing a binary integer, + * and the O(n) time for counting upto n translates to O(n) merges when + * inserting rank-0 lists. When we plug in the sizes of the lists involved in + * those merges, we get the O(n log n) time for the sort. + * + * Inserting higher-ranked lists reduce the height of the merge tree, and also + * eliminate a lot of redundant comparisons when merging two lists that would've + * been part of the same run. Adding a rank-i list is analogous to incrementing + * a binary integer by 2**i in one operation, thus sharing a similar speedup. + * + * When inserting higher-ranked lists, we choose to clear out the lower ranks + * in the interests of keeping the sort stable, but this makes analysis harder. + * Note that clearing the lower-ranked lists is O(length(list))-- thus it + * shouldn't affect the O(n log n) behaviour. IOW, inserting one rank-i list + * is equivalent to inserting 2**i rank-0 lists, thus even if we do i additional + * merges in the clearing-out (taking at most 2**i time) we are still fine. + */ + +#define stringify2(x) #x +#define stringify(x) stringify2(x) + +/* Pre-condition: 2**(rank+1) <= length(list) < 2**(rank+2) (therefore: length(list) >= 2) */ +static inline void +insert_list (struct sort_info *si, list_node* list, int rank) +{ + int i; + + if (rank > si->n_ranks) { + if (rank > MAX_RANKS) { + g_warning ("Rank '%d' should not exceed " stringify (MAX_RANKS), rank); + rank = MAX_RANKS; + } + list = merge_lists (sweep_up (si, NULL, si->n_ranks), list, si->func); + for (i = si->n_ranks; i < rank; ++i) + si->ranks [i] = NULL; + } else { + if (rank) + list = merge_lists (sweep_up (si, NULL, rank), list, si->func); + for (i = rank; i < si->n_ranks && si->ranks [i]; ++i) { + list = merge_lists (si->ranks [i], list, si->func); + si->ranks [i] = NULL; + } + } + + if (i == MAX_RANKS) /* Will _never_ happen: so we can just devolve into quadratic ;-) */ + --i; + if (i >= si->n_ranks) + si->n_ranks = i + 1; + si->min_rank = i; + si->ranks [i] = list; +} + +#undef stringify2 +#undef stringify +#undef MAX_RANKS +#undef FLOOR_LOG2 + +/* A non-recursive mergesort */ +static inline digit +do_sort (list_node* list, GCompareFunc func) +{ + struct sort_info si; + + init_sort_info (&si, func); + + while (list && list->next) { + list_node* next = list->next; + list_node* tail = next->next; + + if (func (list->data, next->data) > 0) { + next->next = list; + next = list; + list = list->next; + } + next->next = NULL; + + insert_list (&si, list, 0); + + list = tail; + } + + return sweep_up (&si, list, si.n_ranks); +} diff --git a/eglib/src/unicode-data.h b/eglib/src/unicode-data.h new file mode 100644 index 0000000000..1cd75f3a96 --- /dev/null +++ b/eglib/src/unicode-data.h @@ -0,0 +1,2152 @@ +/* +This file is automatically generated by ucd.exe. +The source for this generator should be in Mono repository +(mcs/class/corlib/Mono.Globalization.Unicode directory). +*/ + +#ifndef __UNICODE_DATA_H +#define __UNICODE_DATA_H + +#include <glib.h> + + +/* ======== Structures ======== */ +typedef struct { + guint32 codepoint; + guint32 upper; + guint32 title; +} SimpleTitlecaseMapping; +typedef struct { + guint32 start; + guint32 end; +} CodePointRange; +typedef struct { + guint32 upper; + guint32 lower; +} SimpleCaseMapping; + +/* ======== Unicode Categories ======== */ +static const guint8 unicode_category_ranges_count = 11; +static const CodePointRange unicode_category_ranges [] = { +{0x000000, 0x003400}, +{0x004DC0, 0x004E00}, +{0x00A000, 0x00AA80}, +{0x00F900, 0x010000}, +{0x010000, 0x0104C0}, +{0x010800, 0x010A80}, +{0x012000, 0x012480}, +{0x01D000, 0x01D800}, +{0x01F000, 0x01F0C0}, +{0x02F800, 0x02FA40}, +{0x0E0000, 0x0E0200}, +{0, 0}}; +static const guint8 unicode_category_table0 [] = { + /* ==== 0-3400 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 29,21,21,21,23,21,21,21,22,18,21,25,21,17,21,21, + 13,13,13,13,13,13,13,13,13,13,21,21,25,25,25,21, + 21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,22,21,18,24,16, + 24,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,22,25,18,25,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 29,21,23,23,23,23,26,26,24,26,5,20,25,1,26,24, + 26,25,15,15,24,5,26,21,24,15,5,19,15,15,15,21, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,25,9,9,9,9,9,9,9,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,25,5,5,5,5,5,5,5,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,5,9,5,9,5,9,5,9, + 5,9,5,9,5,9,5,9,5,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,9,5,9,5,9,5,5, + 5,9,9,5,9,5,9,9,5,9,9,9,5,5,9,9, + 9,9,5,9,9,5,9,9,9,5,5,5,9,9,5,9, + 9,5,9,5,9,5,9,9,5,9,5,5,9,5,9,9, + 5,9,9,9,5,9,5,9,9,5,5,7,9,5,5,5, + 7,7,7,7,9,8,5,9,8,5,9,8,5,9,5,9, + 5,9,5,9,5,9,5,9,5,9,5,9,5,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 5,9,8,5,9,5,9,9,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,5,5,5,5,5,5,9,9,5,9,9,5, + 5,9,5,9,9,9,9,5,9,5,9,5,9,5,9,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,24,24,24,24,6,6,6,6,6,6,6,6,6,6, + 6,6,24,24,24,24,24,24,24,24,24,24,24,24,24,24, + 6,6,6,6,6,24,24,24,24,24,24,24,6,24,6,24, + 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 9,5,9,5,6,24,9,5,0,0,6,5,5,5,21,0, + 0,0,0,0,24,24,9,21,9,9,9,0,9,0,9,9, + 5,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,0,9,9,9,9,9,9,9,9,9,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9, + 5,5,9,9,9,5,5,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 5,5,5,5,9,5,25,9,5,9,9,5,5,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,26,12,12,12,12,12,11,11,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,9,5,9,5,9,5,9,5,9,5,9,5,9,5,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,0,0,0,0,0,0,0,0,0,0,0,0, + 0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,0,0,6,21,21,21,21,21,21, + 0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,0,21,17,0,0,0,0,0, + 0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,12, + 21,12,12,21,12,12,21,12,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, + 7,7,7,21,21,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,0,0,25,25,25,21,21,23,21,21,26,26, + 12,12,12,12,12,12,12,12,12,12,12,21,0,0,21,21, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 6,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,7,7, + 12,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,21,7,12,12,12,12,12,12,12,1,11,12, + 12,12,12,12,12,6,6,12,12,26,12,12,12,12,7,7, + 13,13,13,13,13,13,13,13,13,13,7,7,7,26,26,7, + 21,21,21,21,21,21,21,21,21,21,21,21,21,21,0,1, + 7,12,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,0,0,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,12,12,12,12,12,12,12,12,12,12, + 12,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12, + 12,12,12,12,6,6,26,21,21,21,6,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,12,12,10,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,12,7,10,10, + 10,12,12,12,12,12,12,12,12,10,10,10,10,12,0,0, + 7,12,12,12,12,0,0,0,7,7,7,7,7,7,7,7, + 7,7,12,12,21,21,13,13,13,13,13,13,13,13,13,13, + 21,6,7,0,0,0,0,0,0,0,0,7,7,7,7,7, + 0,12,10,10,0,7,7,7,7,7,7,7,7,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,0,0,0,7,7,7,7,0,0,12,7,10,10, + 10,12,12,12,12,0,0,10,10,0,0,10,10,12,7,0, + 0,0,0,0,0,0,0,10,0,0,0,0,7,7,0,7, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 7,7,23,23,15,15,15,15,15,15,26,0,0,0,0,0, + 0,12,12,10,0,7,7,7,7,7,7,0,0,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,0,7,7,0,0,12,0,10,10, + 10,12,12,0,0,0,0,12,12,0,0,12,12,12,0,0, + 0,12,0,0,0,0,0,0,0,7,7,7,7,0,7,0, + 0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13, + 12,12,7,7,7,12,0,0,0,0,0,0,0,0,0,0, + 0,12,12,10,0,7,7,7,7,7,7,7,7,7,0,7, + 7,7,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,7,7,7,0,0,12,7,10,10, + 10,12,12,12,12,12,0,12,12,10,0,10,10,12,0,0, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,12,10,10,0,7,7,7,7,7,7,7,7,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,7,7,7,0,0,12,7,10,12, + 10,12,12,12,12,0,0,10,10,0,0,10,10,12,0,0, + 0,0,0,0,0,0,12,10,0,0,0,0,7,7,0,7, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 26,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,12,7,0,7,7,7,7,7,7,0,0,0,7,7, + 7,0,7,7,7,7,0,0,0,7,7,0,7,0,7,7, + 0,0,0,7,7,0,0,0,7,7,7,0,0,0,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,10,10, + 12,10,10,0,0,0,10,10,10,0,10,10,10,12,0,0, + 7,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13, + 15,15,15,26,26,26,26,26,26,23,26,0,0,0,0,0, + 0,10,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,0,7,7,7,7,7,0,0,0,7,12,12, + 12,10,10,10,10,0,12,12,12,0,12,12,12,12,0,0, + 0,0,0,0,0,12,12,0,7,7,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,26, + 0,0,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,0,7,7,7,7,7,0,0,12,7,10,12, + 10,10,10,10,10,0,12,10,10,0,10,10,12,12,0,0, + 0,0,0,0,0,10,10,0,0,0,0,0,0,0,7,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,7,10,10, + 10,12,12,12,12,0,10,10,10,0,10,10,10,12,0,0, + 0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 15,15,15,15,15,15,0,0,0,26,7,7,7,7,7,7, + 0,0,10,10,0,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,0,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,0,7,7,7,7,7,7,7,7,7,0,7,0,0, + 7,7,7,7,7,7,7,0,0,0,12,0,0,0,0,10, + 10,10,12,12,12,0,12,0,10,10,10,10,10,10,10,10, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,10,10,21,0,0,0,0,0,0,0,0,0,0,0, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,12,7,7,12,12,12,12,12,12,12,0,0,0,0,23, + 7,7,7,7,7,7,6,12,12,12,12,12,12,12,12,21, + 13,13,13,13,13,13,13,13,13,13,21,21,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,7,7,0,7,0,0,7,7,0,7,0,0,7,0,0, + 0,0,0,0,7,7,7,7,0,7,7,7,7,7,7,7, + 0,7,7,7,0,7,0,7,0,0,7,7,0,7,7,7, + 7,12,7,7,12,12,12,12,12,12,0,12,12,7,0,0, + 7,7,7,7,7,0,6,0,12,12,12,12,12,12,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,7,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,26,26,26,21,21,21,21,21,21,21,21,21,21,21,21, + 21,21,21,26,26,26,26,26,12,12,26,26,26,26,26,26, + 13,13,13,13,13,13,13,13,13,13,15,15,15,15,15,15, + 15,15,15,15,26,12,26,12,26,12,22,18,22,18,10,10, + 7,7,7,7,7,7,7,7,0,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,10, + 12,12,12,12,12,21,12,12,7,7,7,7,0,0,0,0, + 12,12,12,12,12,12,12,12,0,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,0,26,26, + 26,26,26,26,26,26,12,26,26,26,26,26,26,0,26,26, + 21,21,21,21,21,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,10,10,12,12,12, + 12,10,12,12,12,12,12,12,10,12,12,10,10,12,12,7, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,21,21, + 7,7,7,7,7,7,10,10,12,12,7,7,7,7,12,12, + 12,7,10,10,10,7,7,10,10,10,10,10,10,10,7,7, + 7,12,12,12,12,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,10,10,12,12,10,10,10,10,10,10,12,7,10, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,26,26, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,21,6,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,0,0,0,0,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,0,0, + 7,7,7,7,7,7,7,0,7,0,7,7,7,7,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,0,7,7,7,7,0,0,7,7,7,7,7,7,7,0, + 7,0,7,7,7,7,0,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,0,7,7,7,7,0,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,12, + 26,21,21,21,21,21,21,21,21,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 26,26,26,26,26,26,26,26,26,26,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,21,21,7, + 7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0, + 29,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,22,18,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,21,21,21,14,14, + 14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,7,7, + 7,7,12,12,12,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,12,12,21,21,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,12,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,7,7, + 7,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,1,1,10,12,12,12,12,12,12,12,10,10, + 10,10,10,10,10,10,12,10,10,12,12,12,12,12,12,12, + 12,12,12,12,21,21,21,6,21,21,21,23,7,12,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0, + 21,21,21,21,21,21,17,21,21,21,21,12,12,12,29,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,6,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,12,7,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 12,12,12,10,10,10,10,12,12,10,10,10,0,0,0,0, + 10,10,12,10,10,10,10,10,10,12,12,12,0,0,0,0, + 26,0,0,0,21,21,13,13,13,13,13,13,13,13,13,13, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,7,7,7,7,7,7,7,10,10,0,0,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,21,21, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,12,12,10,10,10,0,0,21,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,10,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,12,10,12,12,12,12,12,10,12,10,10,10, + 10,10,12,10,10,7,7,7,7,7,7,7,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,21,21, + 21,26,26,26,26,26,26,26,26,26,26,12,12,12,12,12, + 12,12,12,12,26,26,26,26,26,26,26,26,26,0,0,0, + 12,12,10,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,10,12,12,12,12,10,10,12,12,10,0,0,0,7,7, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,10,10,10,10,10,10,10,10,12,12,12,12, + 12,12,12,12,10,10,12,12,0,0,0,21,21,21,21,21, + 13,13,13,13,13,13,13,13,13,13,0,0,0,7,7,7, + 13,13,13,13,13,13,13,13,13,13,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,6,6,6,6,6,6,21,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,5,5,5,5,5,5,5,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 5,5,5,5,5,5,0,0,9,9,9,9,9,9,0,0, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 5,5,5,5,5,5,0,0,9,9,9,9,9,9,0,0, + 5,5,5,5,5,5,5,5,0,9,0,9,0,9,0,9, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, + 5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8, + 5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8, + 5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8, + 5,5,5,5,5,0,5,5,9,9,9,9,8,24,5,24, + 24,24,5,5,5,0,5,5,9,9,9,9,8,24,24,24, + 5,5,5,5,0,0,5,5,9,9,9,9,0,24,24,24, + 5,5,5,5,5,5,5,5,9,9,9,9,9,24,24,24, + 0,0,5,5,5,0,5,5,9,9,9,9,8,24,24,0, + 29,29,29,29,29,29,29,29,29,29,29,1,1,1,1,1, + 17,17,17,17,17,17,21,21,20,19,22,20,20,19,22,20, + 21,21,21,21,21,21,21,21,27,28,1,1,1,1,1,29, + 21,21,21,21,21,21,21,21,21,20,19,21,21,21,21,16, + 16,21,21,21,25,22,18,21,21,21,21,21,21,21,21,21, + 21,21,25,21,16,21,21,21,21,21,21,21,21,21,21,29, + 1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1, + 15,5,0,0,15,15,15,15,15,15,25,25,25,22,18,5, + 15,15,15,15,15,15,15,15,15,15,25,25,25,22,18,0, + 6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0, + 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, + 23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11, + 11,12,11,11,11,12,12,12,12,12,12,12,12,12,12,12, + 12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,9,26,26,26,26,9,26,26,5,9,9,9,5,5, + 9,9,9,5,26,9,26,26,26,9,9,9,9,9,26,26, + 26,26,26,26,9,26,9,26,9,26,9,9,9,9,26,5, + 9,9,9,9,5,7,7,7,7,5,26,26,5,5,9,9, + 25,25,25,25,25,9,5,5,5,5,26,25,26,26,5,26, + 0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,9,5,14,14,14,14,0,0,0,0,0,0,0, + 25,25,25,25,25,26,26,26,26,26,25,25,26,26,26,26, + 25,26,26,25,26,26,25,26,26,26,26,26,26,26,25,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,25,25, + 26,26,25,26,25,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,25,25,25,25,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,26,26,26,26,26,26,26,22,18,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,25,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,25,25,25,25, + 25,25,26,26,26,26,26,26,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,25,26,26,26,26,26,26,26,26, + 26,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,0,0,0, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,26,26,26,26,0,26,26,26,26,0,0,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,0,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,0,26,0,26, + 26,26,26,0,0,0,26,0,26,26,26,26,26,26,26,0, + 0,26,26,26,26,26,26,26,22,18,22,18,22,18,22,18, + 22,18,22,18,22,18,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,26,0,0,0,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 25,25,25,25,25,22,18,25,25,25,25,0,25,0,0,0, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,22,18,22,18,22,18,22,18,22,18, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,22,18,22,18,22,18,22,18,22,18,22,18,22, + 18,22,18,22,18,22,18,22,18,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,22,18,22,18,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,22,18,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,26,26,25,25,25,25,25,25,0,0,0, + 26,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, + 9,5,9,9,9,5,5,9,5,9,5,9,5,9,9,9, + 0,5,9,5,5,9,5,5,5,5,5,5,5,6,0,0, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,5,26,26,26,26,26,26,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,21,21,21,21,15,21,21, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,6, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 21,21,20,19,20,19,21,21,21,20,19,21,20,19,21,21, + 21,21,21,21,21,21,21,17,21,21,17,21,20,19,21,21, + 20,19,22,18,22,18,22,18,22,18,21,21,21,21,21,6, + 21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,0,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,0, + 29,21,21,21,26,6,7,14,22,18,22,18,22,18,22,18, + 22,18,26,26,22,18,22,18,22,18,22,18,17,22,18,18, + 26,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12, + 17,6,6,6,6,6,26,26,14,14,14,6,7,21,26,26, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,12,12,24,24,6,6,7, + 17,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,21,6,6,6,7, + 0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 26,26,15,15,15,15,26,26,26,26,26,26,26,26,26,26, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 15,15,15,15,15,15,15,15,15,15,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 26,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 15,15,15,15,15,15,15,15,15,15,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0}; +static const guint8 unicode_category_table1 [] = { + /* ==== 4DC0-4E00 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0}; +static const guint8 unicode_category_table2 [] = { + /* ==== A000-AA80 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,6,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,6,21,21,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 13,13,13,13,13,13,13,13,13,13,7,7,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 0,0,9,5,9,5,9,5,9,5,9,5,9,5,7,12, + 11,11,11,21,0,0,0,0,0,0,0,0,12,12,21,6, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, + 24,24,24,24,24,24,24,6,6,6,6,6,6,6,6,6, + 24,24,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 5,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 6,5,5,5,5,5,5,5,5,9,5,9,5,9,9,5, + 9,5,9,5,9,5,9,5,6,24,24,9,5,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7, + 7,7,12,7,7,7,12,7,7,7,7,12,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,10,10,12,12,10,26,26,26,26,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,21,21,21,21,0,0,0,0,0,0,0,0, + 10,10,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,12,0,0,0,0,0,0,0,0,0,21,21, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,12,12,12,12,12,12,12,12,21,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,12,12,12,12,12,12,12,12,12, + 12,12,10,10,0,0,0,0,0,0,0,0,0,0,0,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,12,12,12,12,12,12,10, + 10,12,12,10,10,12,12,0,0,0,0,0,0,0,0,0, + 7,7,7,12,7,7,7,7,7,7,7,7,12,10,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,21,21,21,21, + 0}; +static const guint8 unicode_category_table3 [] = { + /* ==== F900-10000 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, + 0,0,0,5,5,5,5,5,0,0,0,0,0,7,12,7, + 7,7,7,7,7,7,7,7,7,25,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,7,7,7,7,7,0,7,0, + 7,7,0,7,7,0,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,22,18, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,23,26,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 21,21,21,21,21,21,21,22,18,21,0,0,0,0,0,0, + 12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0, + 21,17,17,16,16,22,18,22,18,22,18,22,18,22,18,22, + 18,22,18,22,18,21,21,22,18,21,21,21,21,16,16,16, + 21,21,21,0,21,21,21,21,17,22,18,22,18,22,18,21, + 21,21,25,17,25,25,25,0,21,23,21,21,0,0,0,0, + 7,7,7,7,7,0,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,1, + 0,21,21,21,23,21,21,21,22,18,21,25,21,17,21,21, + 13,13,13,13,13,13,13,13,13,13,21,21,25,25,25,21, + 21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,22,21,18,24,16, + 24,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,22,25,18,25,22, + 18,21,22,18,21,21,7,7,7,7,7,7,7,7,7,7, + 6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 0,0,7,7,7,7,7,7,0,0,7,7,7,7,7,7, + 0,0,7,7,7,7,7,7,0,0,7,7,7,0,0,0, + 23,23,25,24,26,23,23,0,26,25,25,25,25,26,26,0, + 0,0,0,0,0,0,0,0,0,1,1,1,26,26,0}; +static const guint8 unicode_category_table4 [] = { + /* ==== 10000-104C0 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,0,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,7,7,0,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, + 21,21,26,0,0,0,0,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,0,0,0,26,26,26,26,26,26,26,26,26, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,15,15,15,15,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,15,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,12,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,14,7,7,7,7,7,7,7,7,14,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,0,0,0,0,7,7,7,7,7,7,7,7, + 21,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 13,13,13,13,13,13,13,13,13,13,0}; +static const guint8 unicode_category_table5 [] = { + /* ==== 10800-10A80 ==== */ + 7,7,7,7,7,7,0,0,7,0,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,0,7,7,0,0,0,7,0,0,7, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,15,15,15,15,0,0,0,0,0,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,12,12,12,0,12,12,0,0,0,0,0,12,12,12,12, + 7,7,7,7,0,7,7,7,0,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,0,0,0,0,12,12,12,0,0,0,0,12, + 15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0, + 21,21,21,21,21,21,21,21,21,0}; +static const guint8 unicode_category_table6 [] = { + /* ==== 12000-12480 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0, + 21,21,21,21,0}; +static const guint8 unicode_category_table7 [] = { + /* ==== 1D000-1D800 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,10,10,12,12,12,26,26,26,10,10,10, + 10,10,10,1,1,1,1,1,1,1,1,12,12,12,12,12, + 12,12,12,26,26,12,12,12,12,12,12,12,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,12,12,12,12,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,12,12,12,26,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,5, + 5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,9,0,9,9, + 0,0,9,0,0,9,9,0,0,9,9,9,9,0,9,9, + 9,9,9,9,9,9,5,5,5,5,0,5,0,5,5,5, + 5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,9,9,0,9,9,9,9,0,0,9,9,9, + 9,9,9,9,9,0,9,9,9,9,9,9,9,0,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,9,9,0,9,9,9,9,0, + 9,9,9,9,9,0,9,0,0,0,9,9,9,9,9,9, + 9,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,0,0,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,25,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,25,5,5,5,5, + 5,5,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,25,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,25,5,5,5,5,5,5,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,25,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,25, + 5,5,5,5,5,5,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,25, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,25,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,25,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,25,5,5,5,5,5,5,9,5,0,0,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 0}; +static const guint8 unicode_category_table8 [] = { + /* ==== 1F000-1F0C0 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0}; +static const guint8 unicode_category_table9 [] = { + /* ==== 2F800-2FA40 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0}; +static const guint8 unicode_category_table10 [] = { + /* ==== E0000-E0200 ==== */ + 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 0}; +static const guint8 *unicode_category [11] = { + unicode_category_table0, + unicode_category_table1, + unicode_category_table2, + unicode_category_table3, + unicode_category_table4, + unicode_category_table5, + unicode_category_table6, + unicode_category_table7, + unicode_category_table8, + unicode_category_table9, + unicode_category_table10 +}; + +static const guint8 simple_case_map_ranges_count = 9; +static const CodePointRange simple_case_map_ranges [] = { +{0x000040, 0x000600}, +{0x001000, 0x0010D0}, +{0x001D00, 0x002000}, +{0x002100, 0x0021C0}, +{0x002480, 0x002500}, +{0x002C00, 0x002D80}, +{0x00A640, 0x00A7C0}, +{0x00FF20, 0x00FF80}, +{0x010400, 0x010480}, +{0, 0}}; +static const guint16 simple_upper_case_mapping_lowarea_table0 [] = { + /* ==== 40-600 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, + 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x39C,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, + 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x178, + 0,0x100,0,0x102,0,0x104,0,0x106,0,0x108,0,0x10A,0,0x10C,0,0x10E, + 0,0x110,0,0x112,0,0x114,0,0x116,0,0x118,0,0x11A,0,0x11C,0,0x11E, + 0,0x120,0,0x122,0,0x124,0,0x126,0,0x128,0,0x12A,0,0x12C,0,0x12E, + 0,0x49,0,0x132,0,0x134,0,0x136,0,0,0x139,0,0x13B,0,0x13D,0, + 0x13F,0,0x141,0,0x143,0,0x145,0,0x147,0,0,0x14A,0,0x14C,0,0x14E, + 0,0x150,0,0x152,0,0x154,0,0x156,0,0x158,0,0x15A,0,0x15C,0,0x15E, + 0,0x160,0,0x162,0,0x164,0,0x166,0,0x168,0,0x16A,0,0x16C,0,0x16E, + 0,0x170,0,0x172,0,0x174,0,0x176,0,0,0x179,0,0x17B,0,0x17D,0x53, + 0x243,0,0,0x182,0,0x184,0,0,0x187,0,0,0,0x18B,0,0,0, + 0,0,0x191,0,0,0x1F6,0,0,0,0x198,0x23D,0,0,0,0x220,0, + 0,0x1A0,0,0x1A2,0,0x1A4,0,0,0x1A7,0,0,0,0,0x1AC,0,0, + 0x1AF,0,0,0,0x1B3,0,0x1B5,0,0,0x1B8,0,0,0,0x1BC,0,0x1F7, + 0,0,0,0,0,0x1C4,0x1C4,0,0x1C7,0x1C7,0,0x1CA,0x1CA,0,0x1CD,0, + 0x1CF,0,0x1D1,0,0x1D3,0,0x1D5,0,0x1D7,0,0x1D9,0,0x1DB,0x18E,0,0x1DE, + 0,0x1E0,0,0x1E2,0,0x1E4,0,0x1E6,0,0x1E8,0,0x1EA,0,0x1EC,0,0x1EE, + 0,0,0x1F1,0x1F1,0,0x1F4,0,0,0,0x1F8,0,0x1FA,0,0x1FC,0,0x1FE, + 0,0x200,0,0x202,0,0x204,0,0x206,0,0x208,0,0x20A,0,0x20C,0,0x20E, + 0,0x210,0,0x212,0,0x214,0,0x216,0,0x218,0,0x21A,0,0x21C,0,0x21E, + 0,0,0,0x222,0,0x224,0,0x226,0,0x228,0,0x22A,0,0x22C,0,0x22E, + 0,0x230,0,0x232,0,0,0,0,0,0,0,0,0x23B,0,0,0, + 0,0,0x241,0,0,0,0,0x246,0,0x248,0,0x24A,0,0x24C,0,0x24E, + 0x2C6F,0x2C6D,0,0x181,0x186,0,0x189,0x18A,0,0x18F,0,0x190,0,0,0,0, + 0x193,0,0,0x194,0,0,0,0,0x197,0x196,0,0x2C62,0,0,0,0x19C, + 0,0x2C6E,0x19D,0,0,0x19F,0,0,0,0,0,0,0,0x2C64,0,0, + 0x1A6,0,0,0x1A9,0,0,0,0,0x1AE,0x244,0x1B1,0x1B2,0x245,0,0,0, + 0,0,0x1B7,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x399,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x370,0,0x372,0,0,0,0x376,0,0,0,0x3FD,0x3FE,0x3FF,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x386,0x388,0x389,0x38A, + 0,0x391,0x392,0x393,0x394,0x395,0x396,0x397,0x398,0x399,0x39A,0x39B,0x39C,0x39D,0x39E,0x39F, + 0x3A0,0x3A1,0x3A3,0x3A3,0x3A4,0x3A5,0x3A6,0x3A7,0x3A8,0x3A9,0x3AA,0x3AB,0x38C,0x38E,0x38F,0, + 0x392,0x398,0,0,0,0x3A6,0x3A0,0x3CF,0,0x3D8,0,0x3DA,0,0x3DC,0,0x3DE, + 0,0x3E0,0,0x3E2,0,0x3E4,0,0x3E6,0,0x3E8,0,0x3EA,0,0x3EC,0,0x3EE, + 0x39A,0x3A1,0x3F9,0,0,0x395,0,0,0x3F7,0,0,0x3FA,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x410,0x411,0x412,0x413,0x414,0x415,0x416,0x417,0x418,0x419,0x41A,0x41B,0x41C,0x41D,0x41E,0x41F, + 0x420,0x421,0x422,0x423,0x424,0x425,0x426,0x427,0x428,0x429,0x42A,0x42B,0x42C,0x42D,0x42E,0x42F, + 0x400,0x401,0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40A,0x40B,0x40C,0x40D,0x40E,0x40F, + 0,0x460,0,0x462,0,0x464,0,0x466,0,0x468,0,0x46A,0,0x46C,0,0x46E, + 0,0x470,0,0x472,0,0x474,0,0x476,0,0x478,0,0x47A,0,0x47C,0,0x47E, + 0,0x480,0,0,0,0,0,0,0,0,0,0x48A,0,0x48C,0,0x48E, + 0,0x490,0,0x492,0,0x494,0,0x496,0,0x498,0,0x49A,0,0x49C,0,0x49E, + 0,0x4A0,0,0x4A2,0,0x4A4,0,0x4A6,0,0x4A8,0,0x4AA,0,0x4AC,0,0x4AE, + 0,0x4B0,0,0x4B2,0,0x4B4,0,0x4B6,0,0x4B8,0,0x4BA,0,0x4BC,0,0x4BE, + 0,0,0x4C1,0,0x4C3,0,0x4C5,0,0x4C7,0,0x4C9,0,0x4CB,0,0x4CD,0x4C0, + 0,0x4D0,0,0x4D2,0,0x4D4,0,0x4D6,0,0x4D8,0,0x4DA,0,0x4DC,0,0x4DE, + 0,0x4E0,0,0x4E2,0,0x4E4,0,0x4E6,0,0x4E8,0,0x4EA,0,0x4EC,0,0x4EE, + 0,0x4F0,0,0x4F2,0,0x4F4,0,0x4F6,0,0x4F8,0,0x4FA,0,0x4FC,0,0x4FE, + 0,0x500,0,0x502,0,0x504,0,0x506,0,0x508,0,0x50A,0,0x50C,0,0x50E, + 0,0x510,0,0x512,0,0x514,0,0x516,0,0x518,0,0x51A,0,0x51C,0,0x51E, + 0,0x520,0,0x522,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x531,0x532,0x533,0x534,0x535,0x536,0x537,0x538,0x539,0x53A,0x53B,0x53C,0x53D,0x53E,0x53F, + 0x540,0x541,0x542,0x543,0x544,0x545,0x546,0x547,0x548,0x549,0x54A,0x54B,0x54C,0x54D,0x54E,0x54F, + 0x550,0x551,0x552,0x553,0x554,0x555,0x556,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0}; +static const guint16 simple_upper_case_mapping_lowarea_table1 [] = { + /* ==== 1000-10D0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0}; +static const guint16 simple_upper_case_mapping_lowarea_table2 [] = { + /* ==== 1D00-2000 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0xA77D,0,0,0,0x2C63,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x1E00,0,0x1E02,0,0x1E04,0,0x1E06,0,0x1E08,0,0x1E0A,0,0x1E0C,0,0x1E0E, + 0,0x1E10,0,0x1E12,0,0x1E14,0,0x1E16,0,0x1E18,0,0x1E1A,0,0x1E1C,0,0x1E1E, + 0,0x1E20,0,0x1E22,0,0x1E24,0,0x1E26,0,0x1E28,0,0x1E2A,0,0x1E2C,0,0x1E2E, + 0,0x1E30,0,0x1E32,0,0x1E34,0,0x1E36,0,0x1E38,0,0x1E3A,0,0x1E3C,0,0x1E3E, + 0,0x1E40,0,0x1E42,0,0x1E44,0,0x1E46,0,0x1E48,0,0x1E4A,0,0x1E4C,0,0x1E4E, + 0,0x1E50,0,0x1E52,0,0x1E54,0,0x1E56,0,0x1E58,0,0x1E5A,0,0x1E5C,0,0x1E5E, + 0,0x1E60,0,0x1E62,0,0x1E64,0,0x1E66,0,0x1E68,0,0x1E6A,0,0x1E6C,0,0x1E6E, + 0,0x1E70,0,0x1E72,0,0x1E74,0,0x1E76,0,0x1E78,0,0x1E7A,0,0x1E7C,0,0x1E7E, + 0,0x1E80,0,0x1E82,0,0x1E84,0,0x1E86,0,0x1E88,0,0x1E8A,0,0x1E8C,0,0x1E8E, + 0,0x1E90,0,0x1E92,0,0x1E94,0,0,0,0,0,0x1E60,0,0,0,0, + 0,0x1EA0,0,0x1EA2,0,0x1EA4,0,0x1EA6,0,0x1EA8,0,0x1EAA,0,0x1EAC,0,0x1EAE, + 0,0x1EB0,0,0x1EB2,0,0x1EB4,0,0x1EB6,0,0x1EB8,0,0x1EBA,0,0x1EBC,0,0x1EBE, + 0,0x1EC0,0,0x1EC2,0,0x1EC4,0,0x1EC6,0,0x1EC8,0,0x1ECA,0,0x1ECC,0,0x1ECE, + 0,0x1ED0,0,0x1ED2,0,0x1ED4,0,0x1ED6,0,0x1ED8,0,0x1EDA,0,0x1EDC,0,0x1EDE, + 0,0x1EE0,0,0x1EE2,0,0x1EE4,0,0x1EE6,0,0x1EE8,0,0x1EEA,0,0x1EEC,0,0x1EEE, + 0,0x1EF0,0,0x1EF2,0,0x1EF4,0,0x1EF6,0,0x1EF8,0,0x1EFA,0,0x1EFC,0,0x1EFE, + 0x1F08,0x1F09,0x1F0A,0x1F0B,0x1F0C,0x1F0D,0x1F0E,0x1F0F,0,0,0,0,0,0,0,0, + 0x1F18,0x1F19,0x1F1A,0x1F1B,0x1F1C,0x1F1D,0,0,0,0,0,0,0,0,0,0, +0x1F28,0x1F29,0x1F2A,0x1F2B,0x1F2C,0x1F2D,0x1F2E,0x1F2F,0,0,0,0,0,0,0,0, + 0x1F38,0x1F39,0x1F3A,0x1F3B,0x1F3C,0x1F3D,0x1F3E,0x1F3F,0,0,0,0,0,0,0,0, + 0x1F48,0x1F49,0x1F4A,0x1F4B,0x1F4C,0x1F4D,0,0,0,0,0,0,0,0,0,0, +0,0x1F59,0,0x1F5B,0,0x1F5D,0,0x1F5F,0,0,0,0,0,0,0,0, + 0x1F68,0x1F69,0x1F6A,0x1F6B,0x1F6C,0x1F6D,0x1F6E,0x1F6F,0,0,0,0,0,0,0,0, + 0x1FBA,0x1FBB,0x1FC8,0x1FC9,0x1FCA,0x1FCB,0x1FDA,0x1FDB,0x1FF8,0x1FF9,0x1FEA,0x1FEB,0x1FFA,0x1FFB,0,0, +0x1F88,0x1F89,0x1F8A,0x1F8B,0x1F8C,0x1F8D,0x1F8E,0x1F8F,0,0,0,0,0,0,0,0, + 0x1F98,0x1F99,0x1F9A,0x1F9B,0x1F9C,0x1F9D,0x1F9E,0x1F9F,0,0,0,0,0,0,0,0, + 0x1FA8,0x1FA9,0x1FAA,0x1FAB,0x1FAC,0x1FAD,0x1FAE,0x1FAF,0,0,0,0,0,0,0,0, + 0x1FB8,0x1FB9,0,0x1FBC,0,0,0,0,0,0,0,0,0,0,0x399,0, + 0,0,0,0x1FCC,0,0,0,0,0,0,0,0,0,0,0,0, + 0x1FD8,0x1FD9,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x1FE8,0x1FE9,0,0,0,0x1FEC,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0x1FFC,0,0,0,0,0,0,0,0,0,0,0,0}; +static const guint16 simple_upper_case_mapping_lowarea_table3 [] = { + /* ==== 2100-21C0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x2132,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,0x216A,0x216B,0x216C,0x216D,0x216E,0x216F, + 0,0,0,0,0x2183,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table4 [] = { + /* ==== 2480-2500 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x24B6,0x24B7,0x24B8,0x24B9,0x24BA,0x24BB,0x24BC,0x24BD,0x24BE,0x24BF,0x24C0,0x24C1,0x24C2,0x24C3,0x24C4,0x24C5, + 0x24C6,0x24C7,0x24C8,0x24C9,0x24CA,0x24CB,0x24CC,0x24CD,0x24CE,0x24CF,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table5 [] = { + /* ==== 2C00-2D80 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x2C00,0x2C01,0x2C02,0x2C03,0x2C04,0x2C05,0x2C06,0x2C07,0x2C08,0x2C09,0x2C0A,0x2C0B,0x2C0C,0x2C0D,0x2C0E,0x2C0F, + 0x2C10,0x2C11,0x2C12,0x2C13,0x2C14,0x2C15,0x2C16,0x2C17,0x2C18,0x2C19,0x2C1A,0x2C1B,0x2C1C,0x2C1D,0x2C1E,0x2C1F, + 0x2C20,0x2C21,0x2C22,0x2C23,0x2C24,0x2C25,0x2C26,0x2C27,0x2C28,0x2C29,0x2C2A,0x2C2B,0x2C2C,0x2C2D,0x2C2E,0, +0,0x2C60,0,0,0,0x23A,0x23E,0,0x2C67,0,0x2C69,0,0x2C6B,0,0,0, + 0,0,0,0x2C72,0,0,0x2C75,0,0,0,0,0,0,0,0,0, +0,0x2C80,0,0x2C82,0,0x2C84,0,0x2C86,0,0x2C88,0,0x2C8A,0,0x2C8C,0,0x2C8E, + 0,0x2C90,0,0x2C92,0,0x2C94,0,0x2C96,0,0x2C98,0,0x2C9A,0,0x2C9C,0,0x2C9E, + 0,0x2CA0,0,0x2CA2,0,0x2CA4,0,0x2CA6,0,0x2CA8,0,0x2CAA,0,0x2CAC,0,0x2CAE, + 0,0x2CB0,0,0x2CB2,0,0x2CB4,0,0x2CB6,0,0x2CB8,0,0x2CBA,0,0x2CBC,0,0x2CBE, + 0,0x2CC0,0,0x2CC2,0,0x2CC4,0,0x2CC6,0,0x2CC8,0,0x2CCA,0,0x2CCC,0,0x2CCE, + 0,0x2CD0,0,0x2CD2,0,0x2CD4,0,0x2CD6,0,0x2CD8,0,0x2CDA,0,0x2CDC,0,0x2CDE, + 0,0x2CE0,0,0x2CE2,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x10A0,0x10A1,0x10A2,0x10A3,0x10A4,0x10A5,0x10A6,0x10A7,0x10A8,0x10A9,0x10AA,0x10AB,0x10AC,0x10AD,0x10AE,0x10AF, + 0x10B0,0x10B1,0x10B2,0x10B3,0x10B4,0x10B5,0x10B6,0x10B7,0x10B8,0x10B9,0x10BA,0x10BB,0x10BC,0x10BD,0x10BE,0x10BF, + 0x10C0,0x10C1,0x10C2,0x10C3,0x10C4,0x10C5,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table6 [] = { + /* ==== A640-A7C0 ==== */ + 0,0xA640,0,0xA642,0,0xA644,0,0xA646,0,0xA648,0,0xA64A,0,0xA64C,0,0xA64E, + 0,0xA650,0,0xA652,0,0xA654,0,0xA656,0,0xA658,0,0xA65A,0,0xA65C,0,0xA65E, + 0,0,0,0xA662,0,0xA664,0,0xA666,0,0xA668,0,0xA66A,0,0xA66C,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0xA680,0,0xA682,0,0xA684,0,0xA686,0,0xA688,0,0xA68A,0,0xA68C,0,0xA68E, + 0,0xA690,0,0xA692,0,0xA694,0,0xA696,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0xA722,0,0xA724,0,0xA726,0,0xA728,0,0xA72A,0,0xA72C,0,0xA72E, + 0,0,0,0xA732,0,0xA734,0,0xA736,0,0xA738,0,0xA73A,0,0xA73C,0,0xA73E, + 0,0xA740,0,0xA742,0,0xA744,0,0xA746,0,0xA748,0,0xA74A,0,0xA74C,0,0xA74E, + 0,0xA750,0,0xA752,0,0xA754,0,0xA756,0,0xA758,0,0xA75A,0,0xA75C,0,0xA75E, + 0,0xA760,0,0xA762,0,0xA764,0,0xA766,0,0xA768,0,0xA76A,0,0xA76C,0,0xA76E, + 0,0,0,0,0,0,0,0,0,0,0xA779,0,0xA77B,0,0,0xA77E, + 0,0xA780,0,0xA782,0,0xA784,0,0xA786,0,0,0,0,0xA78B,0}; +static const guint16 simple_upper_case_mapping_lowarea_table7 [] = { + /* ==== FF20-FF80 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,0xFF28,0xFF29,0xFF2A,0xFF2B,0xFF2C,0xFF2D,0xFF2E,0xFF2F, + 0xFF30,0xFF31,0xFF32,0xFF33,0xFF34,0xFF35,0xFF36,0xFF37,0xFF38,0xFF39,0xFF3A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 *simple_upper_case_mapping_lowarea [] = { + simple_upper_case_mapping_lowarea_table0, + simple_upper_case_mapping_lowarea_table1, + simple_upper_case_mapping_lowarea_table2, + simple_upper_case_mapping_lowarea_table3, + simple_upper_case_mapping_lowarea_table4, + simple_upper_case_mapping_lowarea_table5, + simple_upper_case_mapping_lowarea_table6, + simple_upper_case_mapping_lowarea_table7}; +static const int simple_upper_case_mapping_lowarea_table_count = 8; + +static const guint32 simple_upper_case_mapping_higharea_table0 [] = { + /* ==== 10400-10480 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0x10400,0x10401,0x10402,0x10403,0x10404,0x10405,0x10406,0x10407, + 0x10408,0x10409,0x1040A,0x1040B,0x1040C,0x1040D,0x1040E,0x1040F,0x10410,0x10411,0x10412,0x10413,0x10414,0x10415,0x10416,0x10417, + 0x10418,0x10419,0x1041A,0x1041B,0x1041C,0x1041D,0x1041E,0x1041F,0x10420,0x10421,0x10422,0x10423,0x10424,0x10425,0x10426,0x10427, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint32 *simple_upper_case_mapping_higharea [] = { + simple_upper_case_mapping_higharea_table0}; + +static const guint16 simple_lower_case_mapping_lowarea_table0 [] = { + /* ==== 40-600 ==== */ + 0,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, + 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, + 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x101,0,0x103,0,0x105,0,0x107,0,0x109,0,0x10B,0,0x10D,0,0x10F,0, + 0x111,0,0x113,0,0x115,0,0x117,0,0x119,0,0x11B,0,0x11D,0,0x11F,0, + 0x121,0,0x123,0,0x125,0,0x127,0,0x129,0,0x12B,0,0x12D,0,0x12F,0, + 0x69,0,0x133,0,0x135,0,0x137,0,0,0x13A,0,0x13C,0,0x13E,0,0x140, + 0,0x142,0,0x144,0,0x146,0,0x148,0,0,0x14B,0,0x14D,0,0x14F,0, + 0x151,0,0x153,0,0x155,0,0x157,0,0x159,0,0x15B,0,0x15D,0,0x15F,0, + 0x161,0,0x163,0,0x165,0,0x167,0,0x169,0,0x16B,0,0x16D,0,0x16F,0, + 0x171,0,0x173,0,0x175,0,0x177,0,0xFF,0x17A,0,0x17C,0,0x17E,0,0, + 0,0x253,0x183,0,0x185,0,0x254,0x188,0,0x256,0x257,0x18C,0,0,0x1DD,0x259, + 0x25B,0x192,0,0x260,0x263,0,0x269,0x268,0x199,0,0,0,0x26F,0x272,0,0x275, + 0x1A1,0,0x1A3,0,0x1A5,0,0x280,0x1A8,0,0x283,0,0,0x1AD,0,0x288,0x1B0, + 0,0x28A,0x28B,0x1B4,0,0x1B6,0,0x292,0x1B9,0,0,0,0x1BD,0,0,0, + 0,0,0,0,0x1C6,0x1C6,0,0x1C9,0x1C9,0,0x1CC,0x1CC,0,0x1CE,0,0x1D0, + 0,0x1D2,0,0x1D4,0,0x1D6,0,0x1D8,0,0x1DA,0,0x1DC,0,0,0x1DF,0, + 0x1E1,0,0x1E3,0,0x1E5,0,0x1E7,0,0x1E9,0,0x1EB,0,0x1ED,0,0x1EF,0, + 0,0x1F3,0x1F3,0,0x1F5,0,0x195,0x1BF,0x1F9,0,0x1FB,0,0x1FD,0,0x1FF,0, + 0x201,0,0x203,0,0x205,0,0x207,0,0x209,0,0x20B,0,0x20D,0,0x20F,0, + 0x211,0,0x213,0,0x215,0,0x217,0,0x219,0,0x21B,0,0x21D,0,0x21F,0, + 0x19E,0,0x223,0,0x225,0,0x227,0,0x229,0,0x22B,0,0x22D,0,0x22F,0, + 0x231,0,0x233,0,0,0,0,0,0,0,0x2C65,0x23C,0,0x19A,0x2C66,0, + 0,0x242,0,0x180,0x289,0x28C,0x247,0,0x249,0,0x24B,0,0x24D,0,0x24F,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x371,0,0x373,0,0,0,0x377,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0x3AC,0,0x3AD,0x3AE,0x3AF,0,0x3CC,0,0x3CD,0x3CE, + 0,0x3B1,0x3B2,0x3B3,0x3B4,0x3B5,0x3B6,0x3B7,0x3B8,0x3B9,0x3BA,0x3BB,0x3BC,0x3BD,0x3BE,0x3BF, + 0x3C0,0x3C1,0,0x3C3,0x3C4,0x3C5,0x3C6,0x3C7,0x3C8,0x3C9,0x3CA,0x3CB,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3D7, + 0,0,0,0,0,0,0,0,0x3D9,0,0x3DB,0,0x3DD,0,0x3DF,0, + 0x3E1,0,0x3E3,0,0x3E5,0,0x3E7,0,0x3E9,0,0x3EB,0,0x3ED,0,0x3EF,0, + 0,0,0,0,0x3B8,0,0,0x3F8,0,0x3F2,0x3FB,0,0,0x37B,0x37C,0x37D, + 0x450,0x451,0x452,0x453,0x454,0x455,0x456,0x457,0x458,0x459,0x45A,0x45B,0x45C,0x45D,0x45E,0x45F, + 0x430,0x431,0x432,0x433,0x434,0x435,0x436,0x437,0x438,0x439,0x43A,0x43B,0x43C,0x43D,0x43E,0x43F, + 0x440,0x441,0x442,0x443,0x444,0x445,0x446,0x447,0x448,0x449,0x44A,0x44B,0x44C,0x44D,0x44E,0x44F, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x461,0,0x463,0,0x465,0,0x467,0,0x469,0,0x46B,0,0x46D,0,0x46F,0, + 0x471,0,0x473,0,0x475,0,0x477,0,0x479,0,0x47B,0,0x47D,0,0x47F,0, + 0x481,0,0,0,0,0,0,0,0,0,0x48B,0,0x48D,0,0x48F,0, + 0x491,0,0x493,0,0x495,0,0x497,0,0x499,0,0x49B,0,0x49D,0,0x49F,0, + 0x4A1,0,0x4A3,0,0x4A5,0,0x4A7,0,0x4A9,0,0x4AB,0,0x4AD,0,0x4AF,0, + 0x4B1,0,0x4B3,0,0x4B5,0,0x4B7,0,0x4B9,0,0x4BB,0,0x4BD,0,0x4BF,0, + 0x4CF,0x4C2,0,0x4C4,0,0x4C6,0,0x4C8,0,0x4CA,0,0x4CC,0,0x4CE,0,0, + 0x4D1,0,0x4D3,0,0x4D5,0,0x4D7,0,0x4D9,0,0x4DB,0,0x4DD,0,0x4DF,0, + 0x4E1,0,0x4E3,0,0x4E5,0,0x4E7,0,0x4E9,0,0x4EB,0,0x4ED,0,0x4EF,0, + 0x4F1,0,0x4F3,0,0x4F5,0,0x4F7,0,0x4F9,0,0x4FB,0,0x4FD,0,0x4FF,0, + 0x501,0,0x503,0,0x505,0,0x507,0,0x509,0,0x50B,0,0x50D,0,0x50F,0, + 0x511,0,0x513,0,0x515,0,0x517,0,0x519,0,0x51B,0,0x51D,0,0x51F,0, + 0x521,0,0x523,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x561,0x562,0x563,0x564,0x565,0x566,0x567,0x568,0x569,0x56A,0x56B,0x56C,0x56D,0x56E,0x56F, + 0x570,0x571,0x572,0x573,0x574,0x575,0x576,0x577,0x578,0x579,0x57A,0x57B,0x57C,0x57D,0x57E,0x57F, + 0x580,0x581,0x582,0x583,0x584,0x585,0x586,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table1 [] = { + /* ==== 1000-10D0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x2D00,0x2D01,0x2D02,0x2D03,0x2D04,0x2D05,0x2D06,0x2D07,0x2D08,0x2D09,0x2D0A,0x2D0B,0x2D0C,0x2D0D,0x2D0E,0x2D0F, + 0x2D10,0x2D11,0x2D12,0x2D13,0x2D14,0x2D15,0x2D16,0x2D17,0x2D18,0x2D19,0x2D1A,0x2D1B,0x2D1C,0x2D1D,0x2D1E,0x2D1F, + 0x2D20,0x2D21,0x2D22,0x2D23,0x2D24,0x2D25,0}; +static const guint16 simple_lower_case_mapping_lowarea_table2 [] = { + /* ==== 1D00-2000 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x1E01,0,0x1E03,0,0x1E05,0,0x1E07,0,0x1E09,0,0x1E0B,0,0x1E0D,0,0x1E0F,0, + 0x1E11,0,0x1E13,0,0x1E15,0,0x1E17,0,0x1E19,0,0x1E1B,0,0x1E1D,0,0x1E1F,0, + 0x1E21,0,0x1E23,0,0x1E25,0,0x1E27,0,0x1E29,0,0x1E2B,0,0x1E2D,0,0x1E2F,0, + 0x1E31,0,0x1E33,0,0x1E35,0,0x1E37,0,0x1E39,0,0x1E3B,0,0x1E3D,0,0x1E3F,0, + 0x1E41,0,0x1E43,0,0x1E45,0,0x1E47,0,0x1E49,0,0x1E4B,0,0x1E4D,0,0x1E4F,0, + 0x1E51,0,0x1E53,0,0x1E55,0,0x1E57,0,0x1E59,0,0x1E5B,0,0x1E5D,0,0x1E5F,0, + 0x1E61,0,0x1E63,0,0x1E65,0,0x1E67,0,0x1E69,0,0x1E6B,0,0x1E6D,0,0x1E6F,0, + 0x1E71,0,0x1E73,0,0x1E75,0,0x1E77,0,0x1E79,0,0x1E7B,0,0x1E7D,0,0x1E7F,0, + 0x1E81,0,0x1E83,0,0x1E85,0,0x1E87,0,0x1E89,0,0x1E8B,0,0x1E8D,0,0x1E8F,0, + 0x1E91,0,0x1E93,0,0x1E95,0,0,0,0,0,0,0,0,0,0xDF,0, + 0x1EA1,0,0x1EA3,0,0x1EA5,0,0x1EA7,0,0x1EA9,0,0x1EAB,0,0x1EAD,0,0x1EAF,0, + 0x1EB1,0,0x1EB3,0,0x1EB5,0,0x1EB7,0,0x1EB9,0,0x1EBB,0,0x1EBD,0,0x1EBF,0, + 0x1EC1,0,0x1EC3,0,0x1EC5,0,0x1EC7,0,0x1EC9,0,0x1ECB,0,0x1ECD,0,0x1ECF,0, + 0x1ED1,0,0x1ED3,0,0x1ED5,0,0x1ED7,0,0x1ED9,0,0x1EDB,0,0x1EDD,0,0x1EDF,0, + 0x1EE1,0,0x1EE3,0,0x1EE5,0,0x1EE7,0,0x1EE9,0,0x1EEB,0,0x1EED,0,0x1EEF,0, + 0x1EF1,0,0x1EF3,0,0x1EF5,0,0x1EF7,0,0x1EF9,0,0x1EFB,0,0x1EFD,0,0x1EFF,0, + 0,0,0,0,0,0,0,0,0x1F00,0x1F01,0x1F02,0x1F03,0x1F04,0x1F05,0x1F06,0x1F07, + 0,0,0,0,0,0,0,0,0x1F10,0x1F11,0x1F12,0x1F13,0x1F14,0x1F15,0,0, +0,0,0,0,0,0,0,0,0x1F20,0x1F21,0x1F22,0x1F23,0x1F24,0x1F25,0x1F26,0x1F27, + 0,0,0,0,0,0,0,0,0x1F30,0x1F31,0x1F32,0x1F33,0x1F34,0x1F35,0x1F36,0x1F37, + 0,0,0,0,0,0,0,0,0x1F40,0x1F41,0x1F42,0x1F43,0x1F44,0x1F45,0,0, +0,0,0,0,0,0,0,0,0,0x1F51,0,0x1F53,0,0x1F55,0,0x1F57, + 0,0,0,0,0,0,0,0,0x1F60,0x1F61,0x1F62,0x1F63,0x1F64,0x1F65,0x1F66,0x1F67, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1F80,0x1F81,0x1F82,0x1F83,0x1F84,0x1F85,0x1F86,0x1F87, + 0,0,0,0,0,0,0,0,0x1F90,0x1F91,0x1F92,0x1F93,0x1F94,0x1F95,0x1F96,0x1F97, + 0,0,0,0,0,0,0,0,0x1FA0,0x1FA1,0x1FA2,0x1FA3,0x1FA4,0x1FA5,0x1FA6,0x1FA7, + 0,0,0,0,0,0,0,0,0x1FB0,0x1FB1,0x1F70,0x1F71,0x1FB3,0,0,0, + 0,0,0,0,0,0,0,0,0x1F72,0x1F73,0x1F74,0x1F75,0x1FC3,0,0,0, + 0,0,0,0,0,0,0,0,0x1FD0,0x1FD1,0x1F76,0x1F77,0,0,0,0, + 0,0,0,0,0,0,0,0,0x1FE0,0x1FE1,0x1F7A,0x1F7B,0x1FE5,0,0,0, + 0,0,0,0,0,0,0,0,0x1F78,0x1F79,0x1F7C,0x1F7D,0x1FF3,0,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table3 [] = { + /* ==== 2100-21C0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0x3C9,0,0,0,0x6B,0xE5,0,0,0,0, + 0,0,0x214E,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178,0x2179,0x217A,0x217B,0x217C,0x217D,0x217E,0x217F, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0x2184,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table4 [] = { + /* ==== 2480-2500 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0x24D0,0x24D1,0x24D2,0x24D3,0x24D4,0x24D5,0x24D6,0x24D7,0x24D8,0x24D9, + 0x24DA,0x24DB,0x24DC,0x24DD,0x24DE,0x24DF,0x24E0,0x24E1,0x24E2,0x24E3,0x24E4,0x24E5,0x24E6,0x24E7,0x24E8,0x24E9, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table5 [] = { + /* ==== 2C00-2D80 ==== */ + 0x2C30,0x2C31,0x2C32,0x2C33,0x2C34,0x2C35,0x2C36,0x2C37,0x2C38,0x2C39,0x2C3A,0x2C3B,0x2C3C,0x2C3D,0x2C3E,0x2C3F, + 0x2C40,0x2C41,0x2C42,0x2C43,0x2C44,0x2C45,0x2C46,0x2C47,0x2C48,0x2C49,0x2C4A,0x2C4B,0x2C4C,0x2C4D,0x2C4E,0x2C4F, + 0x2C50,0x2C51,0x2C52,0x2C53,0x2C54,0x2C55,0x2C56,0x2C57,0x2C58,0x2C59,0x2C5A,0x2C5B,0x2C5C,0x2C5D,0x2C5E,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x2C61,0,0x26B,0x1D7D,0x27D,0,0,0x2C68,0,0x2C6A,0,0x2C6C,0,0x251,0x271,0x250, + 0,0,0x2C73,0,0,0x2C76,0,0,0,0,0,0,0,0,0,0, +0x2C81,0,0x2C83,0,0x2C85,0,0x2C87,0,0x2C89,0,0x2C8B,0,0x2C8D,0,0x2C8F,0, + 0x2C91,0,0x2C93,0,0x2C95,0,0x2C97,0,0x2C99,0,0x2C9B,0,0x2C9D,0,0x2C9F,0, + 0x2CA1,0,0x2CA3,0,0x2CA5,0,0x2CA7,0,0x2CA9,0,0x2CAB,0,0x2CAD,0,0x2CAF,0, + 0x2CB1,0,0x2CB3,0,0x2CB5,0,0x2CB7,0,0x2CB9,0,0x2CBB,0,0x2CBD,0,0x2CBF,0, + 0x2CC1,0,0x2CC3,0,0x2CC5,0,0x2CC7,0,0x2CC9,0,0x2CCB,0,0x2CCD,0,0x2CCF,0, + 0x2CD1,0,0x2CD3,0,0x2CD5,0,0x2CD7,0,0x2CD9,0,0x2CDB,0,0x2CDD,0,0x2CDF,0, + 0x2CE1,0,0x2CE3,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table6 [] = { + /* ==== A640-A7C0 ==== */ + 0xA641,0,0xA643,0,0xA645,0,0xA647,0,0xA649,0,0xA64B,0,0xA64D,0,0xA64F,0, + 0xA651,0,0xA653,0,0xA655,0,0xA657,0,0xA659,0,0xA65B,0,0xA65D,0,0xA65F,0, + 0,0,0xA663,0,0xA665,0,0xA667,0,0xA669,0,0xA66B,0,0xA66D,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xA681,0,0xA683,0,0xA685,0,0xA687,0,0xA689,0,0xA68B,0,0xA68D,0,0xA68F,0, + 0xA691,0,0xA693,0,0xA695,0,0xA697,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0xA723,0,0xA725,0,0xA727,0,0xA729,0,0xA72B,0,0xA72D,0,0xA72F,0, + 0,0,0xA733,0,0xA735,0,0xA737,0,0xA739,0,0xA73B,0,0xA73D,0,0xA73F,0, + 0xA741,0,0xA743,0,0xA745,0,0xA747,0,0xA749,0,0xA74B,0,0xA74D,0,0xA74F,0, + 0xA751,0,0xA753,0,0xA755,0,0xA757,0,0xA759,0,0xA75B,0,0xA75D,0,0xA75F,0, + 0xA761,0,0xA763,0,0xA765,0,0xA767,0,0xA769,0,0xA76B,0,0xA76D,0,0xA76F,0, + 0,0,0,0,0,0,0,0,0,0xA77A,0,0xA77C,0,0x1D79,0xA77F,0, + 0xA781,0,0xA783,0,0xA785,0,0xA787,0,0,0,0,0xA78C,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table7 [] = { + /* ==== FF20-FF80 ==== */ + 0,0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F, + 0xFF50,0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56,0xFF57,0xFF58,0xFF59,0xFF5A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 *simple_lower_case_mapping_lowarea [] = { + simple_lower_case_mapping_lowarea_table0, + simple_lower_case_mapping_lowarea_table1, + simple_lower_case_mapping_lowarea_table2, + simple_lower_case_mapping_lowarea_table3, + simple_lower_case_mapping_lowarea_table4, + simple_lower_case_mapping_lowarea_table5, + simple_lower_case_mapping_lowarea_table6, + simple_lower_case_mapping_lowarea_table7}; +static const int simple_lower_case_mapping_lowarea_table_count = 8; + +static const guint32 simple_lower_case_mapping_higharea_table0 [] = { + /* ==== 10400-10480 ==== */ + 0x10428,0x10429,0x1042A,0x1042B,0x1042C,0x1042D,0x1042E,0x1042F,0x10430,0x10431,0x10432,0x10433,0x10434,0x10435,0x10436,0x10437, + 0x10438,0x10439,0x1043A,0x1043B,0x1043C,0x1043D,0x1043E,0x1043F,0x10440,0x10441,0x10442,0x10443,0x10444,0x10445,0x10446,0x10447, + 0x10448,0x10449,0x1044A,0x1044B,0x1044C,0x1044D,0x1044E,0x1044F,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint32 *simple_lower_case_mapping_higharea [] = { + simple_lower_case_mapping_higharea_table0}; + + +static const SimpleTitlecaseMapping simple_titlecase_mapping [] = { + {0x0001C4, 0x000000, 0x0001C5}, + {0x0001C5, 0x0001C4, 0x0001C5}, + {0x0001C6, 0x0001C4, 0x0001C5}, + {0x0001C7, 0x000000, 0x0001C8}, + {0x0001C8, 0x0001C7, 0x0001C8}, + {0x0001C9, 0x0001C7, 0x0001C8}, + {0x0001CA, 0x000000, 0x0001CB}, + {0x0001CB, 0x0001CA, 0x0001CB}, + {0x0001CC, 0x0001CA, 0x0001CB}, + {0x0001F1, 0x000000, 0x0001F2}, + {0x0001F2, 0x0001F1, 0x0001F2}, + {0x0001F3, 0x0001F1, 0x0001F2} +}; +static const guint8 simple_titlecase_mapping_count = 12; + +#endif + diff --git a/eglib/src/vasprintf.c b/eglib/src/vasprintf.c new file mode 100644 index 0000000000..8699df289b --- /dev/null +++ b/eglib/src/vasprintf.c @@ -0,0 +1,30 @@ +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +int vasprintf(char **ret, const char *fmt, va_list ap) +{ + char *buf; + int len; + size_t buflen; + va_list ap2; + +#ifdef _MSC_VER + ap2 = ap; + len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( ) +#else + va_copy(ap2, ap); + len = vsnprintf(NULL, 0, fmt, ap2); +#endif + + if (len > 0 && (buf = malloc((buflen = (size_t) (len + 1)))) != NULL) { + len = vsnprintf(buf, buflen, fmt, ap); + *ret = buf; + } else { + *ret = NULL; + len = -1; + } + + va_end(ap2); + return len; +} diff --git a/eglib/test/Makefile.am b/eglib/test/Makefile.am new file mode 100644 index 0000000000..3411ef90b4 --- /dev/null +++ b/eglib/test/Makefile.am @@ -0,0 +1,60 @@ +SOURCES = \ + test.c \ + test.h \ + tests.h \ + driver.c \ + hashtable.c \ + string-util.c \ + string.c \ + slist.c \ + sizes.c \ + ptrarray.c \ + list.c \ + array.c \ + fake.c \ + path.c \ + queue.c \ + shell.c \ + spawn.c \ + timer.c \ + file.c \ + pattern.c \ + dir.c \ + markup.c \ + unicode.c \ + utf8.c \ + endian.c \ + module.c \ + memory.c + +test_eglib_SOURCES = $(SOURCES) + +test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\" +test_eglib_LDADD = ../src/libeglib.la + +run-eglib: all + ./test-eglib + +if HAVE_GLIB + +noinst_PROGRAMS = test-glib test-eglib + +test_glib_SOURCES = $(SOURCES) + +test_glib_CFLAGS = `pkg-config --cflags glib-2.0` -DDRIVER_NAME=\"GLib\" +test_glib_LDFLAGS = `pkg-config --libs glib-2.0 gmodule-2.0` + +run-glib: all + ./test-glib + +run-both: run-glib run-eglib + +else + +noinst_PROGRAMS = test-eglib + +run-both: run-eglib + +endif + +MAINTAINERCLEANFILES = Makefile.in diff --git a/eglib/test/Makefile.in b/eglib/test/Makefile.in new file mode 100644 index 0000000000..db572505a0 --- /dev/null +++ b/eglib/test/Makefile.in @@ -0,0 +1,1296 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@HAVE_GLIB_FALSE@noinst_PROGRAMS = test-eglib$(EXEEXT) +@HAVE_GLIB_TRUE@noinst_PROGRAMS = test-glib$(EXEEXT) \ +@HAVE_GLIB_TRUE@ test-eglib$(EXEEXT) +subdir = test +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am__objects_1 = test_eglib-test.$(OBJEXT) test_eglib-driver.$(OBJEXT) \ + test_eglib-hashtable.$(OBJEXT) \ + test_eglib-string-util.$(OBJEXT) test_eglib-string.$(OBJEXT) \ + test_eglib-slist.$(OBJEXT) test_eglib-sizes.$(OBJEXT) \ + test_eglib-ptrarray.$(OBJEXT) test_eglib-list.$(OBJEXT) \ + test_eglib-array.$(OBJEXT) test_eglib-fake.$(OBJEXT) \ + test_eglib-path.$(OBJEXT) test_eglib-queue.$(OBJEXT) \ + test_eglib-shell.$(OBJEXT) test_eglib-spawn.$(OBJEXT) \ + test_eglib-timer.$(OBJEXT) test_eglib-file.$(OBJEXT) \ + test_eglib-pattern.$(OBJEXT) test_eglib-dir.$(OBJEXT) \ + test_eglib-markup.$(OBJEXT) test_eglib-unicode.$(OBJEXT) \ + test_eglib-utf8.$(OBJEXT) test_eglib-endian.$(OBJEXT) \ + test_eglib-module.$(OBJEXT) test_eglib-memory.$(OBJEXT) +am_test_eglib_OBJECTS = $(am__objects_1) +test_eglib_OBJECTS = $(am_test_eglib_OBJECTS) +test_eglib_DEPENDENCIES = ../src/libeglib.la +test_eglib_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_eglib_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__test_glib_SOURCES_DIST = test.c test.h tests.h driver.c \ + hashtable.c string-util.c string.c slist.c sizes.c ptrarray.c \ + list.c array.c fake.c path.c queue.c shell.c spawn.c timer.c \ + file.c pattern.c dir.c markup.c unicode.c utf8.c endian.c \ + module.c memory.c +am__objects_2 = test_glib-test.$(OBJEXT) test_glib-driver.$(OBJEXT) \ + test_glib-hashtable.$(OBJEXT) test_glib-string-util.$(OBJEXT) \ + test_glib-string.$(OBJEXT) test_glib-slist.$(OBJEXT) \ + test_glib-sizes.$(OBJEXT) test_glib-ptrarray.$(OBJEXT) \ + test_glib-list.$(OBJEXT) test_glib-array.$(OBJEXT) \ + test_glib-fake.$(OBJEXT) test_glib-path.$(OBJEXT) \ + test_glib-queue.$(OBJEXT) test_glib-shell.$(OBJEXT) \ + test_glib-spawn.$(OBJEXT) test_glib-timer.$(OBJEXT) \ + test_glib-file.$(OBJEXT) test_glib-pattern.$(OBJEXT) \ + test_glib-dir.$(OBJEXT) test_glib-markup.$(OBJEXT) \ + test_glib-unicode.$(OBJEXT) test_glib-utf8.$(OBJEXT) \ + test_glib-endian.$(OBJEXT) test_glib-module.$(OBJEXT) \ + test_glib-memory.$(OBJEXT) +@HAVE_GLIB_TRUE@am_test_glib_OBJECTS = $(am__objects_2) +test_glib_OBJECTS = $(am_test_glib_OBJECTS) +test_glib_LDADD = $(LDADD) +test_glib_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_glib_CFLAGS) \ + $(CFLAGS) $(test_glib_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DIST_SOURCES = $(test_eglib_SOURCES) $(am__test_glib_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BREAKPOINT = @BREAKPOINT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GINT_TO_POINTER = @GINT_TO_POINTER@ +GNUC_NORETURN = @GNUC_NORETURN@ +GNUC_PRETTY = @GNUC_PRETTY@ +GNUC_UNUSED = @GNUC_UNUSED@ +GPOINTER_TO_INT = @GPOINTER_TO_INT@ +GPOINTER_TO_UINT = @GPOINTER_TO_UINT@ +GREP = @GREP@ +GSIZE = @GSIZE@ +GSIZE_FORMAT = @GSIZE_FORMAT@ +GUINT_TO_POINTER = @GUINT_TO_POINTER@ +G_GINT64_FORMAT = @G_GINT64_FORMAT@ +G_GUINT64_FORMAT = @G_GUINT64_FORMAT@ +G_HAVE_ISO_VARARGS = @G_HAVE_ISO_VARARGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +ORDER = @ORDER@ +OS = @OS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATHSEP = @PATHSEP@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SEARCHSEP = @SEARCHSEP@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SOURCES = \ + test.c \ + test.h \ + tests.h \ + driver.c \ + hashtable.c \ + string-util.c \ + string.c \ + slist.c \ + sizes.c \ + ptrarray.c \ + list.c \ + array.c \ + fake.c \ + path.c \ + queue.c \ + shell.c \ + spawn.c \ + timer.c \ + file.c \ + pattern.c \ + dir.c \ + markup.c \ + unicode.c \ + utf8.c \ + endian.c \ + module.c \ + memory.c + +test_eglib_SOURCES = $(SOURCES) +test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\" +test_eglib_LDADD = ../src/libeglib.la +@HAVE_GLIB_TRUE@test_glib_SOURCES = $(SOURCES) +@HAVE_GLIB_TRUE@test_glib_CFLAGS = `pkg-config --cflags glib-2.0` -DDRIVER_NAME=\"GLib\" +@HAVE_GLIB_TRUE@test_glib_LDFLAGS = `pkg-config --libs glib-2.0 gmodule-2.0` +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +test-eglib$(EXEEXT): $(test_eglib_OBJECTS) $(test_eglib_DEPENDENCIES) + @rm -f test-eglib$(EXEEXT) + $(test_eglib_LINK) $(test_eglib_OBJECTS) $(test_eglib_LDADD) $(LIBS) +test-glib$(EXEEXT): $(test_glib_OBJECTS) $(test_glib_DEPENDENCIES) + @rm -f test-glib$(EXEEXT) + $(test_glib_LINK) $(test_glib_OBJECTS) $(test_glib_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-array.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-dir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-driver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-endian.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-fake.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-hashtable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-markup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-path.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-pattern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-ptrarray.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-queue.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-shell.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-sizes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-slist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-spawn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-string-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-timer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-unicode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_eglib-utf8.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-array.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-dir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-driver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-endian.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-fake.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-hashtable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-markup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-path.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-pattern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-ptrarray.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-queue.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-shell.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-sizes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-slist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-spawn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-string-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-timer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-unicode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_glib-utf8.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +test_eglib-test.o: test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-test.o -MD -MP -MF $(DEPDIR)/test_eglib-test.Tpo -c -o test_eglib-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-test.Tpo $(DEPDIR)/test_eglib-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='test_eglib-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c + +test_eglib-test.obj: test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-test.obj -MD -MP -MF $(DEPDIR)/test_eglib-test.Tpo -c -o test_eglib-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-test.Tpo $(DEPDIR)/test_eglib-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='test_eglib-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` + +test_eglib-driver.o: driver.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-driver.o -MD -MP -MF $(DEPDIR)/test_eglib-driver.Tpo -c -o test_eglib-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-driver.Tpo $(DEPDIR)/test_eglib-driver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='test_eglib-driver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c + +test_eglib-driver.obj: driver.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-driver.obj -MD -MP -MF $(DEPDIR)/test_eglib-driver.Tpo -c -o test_eglib-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-driver.Tpo $(DEPDIR)/test_eglib-driver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='test_eglib-driver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` + +test_eglib-hashtable.o: hashtable.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-hashtable.o -MD -MP -MF $(DEPDIR)/test_eglib-hashtable.Tpo -c -o test_eglib-hashtable.o `test -f 'hashtable.c' || echo '$(srcdir)/'`hashtable.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-hashtable.Tpo $(DEPDIR)/test_eglib-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hashtable.c' object='test_eglib-hashtable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-hashtable.o `test -f 'hashtable.c' || echo '$(srcdir)/'`hashtable.c + +test_eglib-hashtable.obj: hashtable.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-hashtable.obj -MD -MP -MF $(DEPDIR)/test_eglib-hashtable.Tpo -c -o test_eglib-hashtable.obj `if test -f 'hashtable.c'; then $(CYGPATH_W) 'hashtable.c'; else $(CYGPATH_W) '$(srcdir)/hashtable.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-hashtable.Tpo $(DEPDIR)/test_eglib-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hashtable.c' object='test_eglib-hashtable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-hashtable.obj `if test -f 'hashtable.c'; then $(CYGPATH_W) 'hashtable.c'; else $(CYGPATH_W) '$(srcdir)/hashtable.c'; fi` + +test_eglib-string-util.o: string-util.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-string-util.o -MD -MP -MF $(DEPDIR)/test_eglib-string-util.Tpo -c -o test_eglib-string-util.o `test -f 'string-util.c' || echo '$(srcdir)/'`string-util.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-string-util.Tpo $(DEPDIR)/test_eglib-string-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string-util.c' object='test_eglib-string-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-string-util.o `test -f 'string-util.c' || echo '$(srcdir)/'`string-util.c + +test_eglib-string-util.obj: string-util.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-string-util.obj -MD -MP -MF $(DEPDIR)/test_eglib-string-util.Tpo -c -o test_eglib-string-util.obj `if test -f 'string-util.c'; then $(CYGPATH_W) 'string-util.c'; else $(CYGPATH_W) '$(srcdir)/string-util.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-string-util.Tpo $(DEPDIR)/test_eglib-string-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string-util.c' object='test_eglib-string-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-string-util.obj `if test -f 'string-util.c'; then $(CYGPATH_W) 'string-util.c'; else $(CYGPATH_W) '$(srcdir)/string-util.c'; fi` + +test_eglib-string.o: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-string.o -MD -MP -MF $(DEPDIR)/test_eglib-string.Tpo -c -o test_eglib-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-string.Tpo $(DEPDIR)/test_eglib-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='test_eglib-string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c + +test_eglib-string.obj: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-string.obj -MD -MP -MF $(DEPDIR)/test_eglib-string.Tpo -c -o test_eglib-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-string.Tpo $(DEPDIR)/test_eglib-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='test_eglib-string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` + +test_eglib-slist.o: slist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-slist.o -MD -MP -MF $(DEPDIR)/test_eglib-slist.Tpo -c -o test_eglib-slist.o `test -f 'slist.c' || echo '$(srcdir)/'`slist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-slist.Tpo $(DEPDIR)/test_eglib-slist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='test_eglib-slist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-slist.o `test -f 'slist.c' || echo '$(srcdir)/'`slist.c + +test_eglib-slist.obj: slist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-slist.obj -MD -MP -MF $(DEPDIR)/test_eglib-slist.Tpo -c -o test_eglib-slist.obj `if test -f 'slist.c'; then $(CYGPATH_W) 'slist.c'; else $(CYGPATH_W) '$(srcdir)/slist.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-slist.Tpo $(DEPDIR)/test_eglib-slist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='test_eglib-slist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-slist.obj `if test -f 'slist.c'; then $(CYGPATH_W) 'slist.c'; else $(CYGPATH_W) '$(srcdir)/slist.c'; fi` + +test_eglib-sizes.o: sizes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-sizes.o -MD -MP -MF $(DEPDIR)/test_eglib-sizes.Tpo -c -o test_eglib-sizes.o `test -f 'sizes.c' || echo '$(srcdir)/'`sizes.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-sizes.Tpo $(DEPDIR)/test_eglib-sizes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sizes.c' object='test_eglib-sizes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-sizes.o `test -f 'sizes.c' || echo '$(srcdir)/'`sizes.c + +test_eglib-sizes.obj: sizes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-sizes.obj -MD -MP -MF $(DEPDIR)/test_eglib-sizes.Tpo -c -o test_eglib-sizes.obj `if test -f 'sizes.c'; then $(CYGPATH_W) 'sizes.c'; else $(CYGPATH_W) '$(srcdir)/sizes.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-sizes.Tpo $(DEPDIR)/test_eglib-sizes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sizes.c' object='test_eglib-sizes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-sizes.obj `if test -f 'sizes.c'; then $(CYGPATH_W) 'sizes.c'; else $(CYGPATH_W) '$(srcdir)/sizes.c'; fi` + +test_eglib-ptrarray.o: ptrarray.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-ptrarray.o -MD -MP -MF $(DEPDIR)/test_eglib-ptrarray.Tpo -c -o test_eglib-ptrarray.o `test -f 'ptrarray.c' || echo '$(srcdir)/'`ptrarray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-ptrarray.Tpo $(DEPDIR)/test_eglib-ptrarray.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptrarray.c' object='test_eglib-ptrarray.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-ptrarray.o `test -f 'ptrarray.c' || echo '$(srcdir)/'`ptrarray.c + +test_eglib-ptrarray.obj: ptrarray.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-ptrarray.obj -MD -MP -MF $(DEPDIR)/test_eglib-ptrarray.Tpo -c -o test_eglib-ptrarray.obj `if test -f 'ptrarray.c'; then $(CYGPATH_W) 'ptrarray.c'; else $(CYGPATH_W) '$(srcdir)/ptrarray.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-ptrarray.Tpo $(DEPDIR)/test_eglib-ptrarray.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptrarray.c' object='test_eglib-ptrarray.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-ptrarray.obj `if test -f 'ptrarray.c'; then $(CYGPATH_W) 'ptrarray.c'; else $(CYGPATH_W) '$(srcdir)/ptrarray.c'; fi` + +test_eglib-list.o: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-list.o -MD -MP -MF $(DEPDIR)/test_eglib-list.Tpo -c -o test_eglib-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-list.Tpo $(DEPDIR)/test_eglib-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='test_eglib-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c + +test_eglib-list.obj: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-list.obj -MD -MP -MF $(DEPDIR)/test_eglib-list.Tpo -c -o test_eglib-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-list.Tpo $(DEPDIR)/test_eglib-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='test_eglib-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` + +test_eglib-array.o: array.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-array.o -MD -MP -MF $(DEPDIR)/test_eglib-array.Tpo -c -o test_eglib-array.o `test -f 'array.c' || echo '$(srcdir)/'`array.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-array.Tpo $(DEPDIR)/test_eglib-array.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='array.c' object='test_eglib-array.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-array.o `test -f 'array.c' || echo '$(srcdir)/'`array.c + +test_eglib-array.obj: array.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-array.obj -MD -MP -MF $(DEPDIR)/test_eglib-array.Tpo -c -o test_eglib-array.obj `if test -f 'array.c'; then $(CYGPATH_W) 'array.c'; else $(CYGPATH_W) '$(srcdir)/array.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-array.Tpo $(DEPDIR)/test_eglib-array.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='array.c' object='test_eglib-array.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-array.obj `if test -f 'array.c'; then $(CYGPATH_W) 'array.c'; else $(CYGPATH_W) '$(srcdir)/array.c'; fi` + +test_eglib-fake.o: fake.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-fake.o -MD -MP -MF $(DEPDIR)/test_eglib-fake.Tpo -c -o test_eglib-fake.o `test -f 'fake.c' || echo '$(srcdir)/'`fake.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-fake.Tpo $(DEPDIR)/test_eglib-fake.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fake.c' object='test_eglib-fake.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-fake.o `test -f 'fake.c' || echo '$(srcdir)/'`fake.c + +test_eglib-fake.obj: fake.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-fake.obj -MD -MP -MF $(DEPDIR)/test_eglib-fake.Tpo -c -o test_eglib-fake.obj `if test -f 'fake.c'; then $(CYGPATH_W) 'fake.c'; else $(CYGPATH_W) '$(srcdir)/fake.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-fake.Tpo $(DEPDIR)/test_eglib-fake.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fake.c' object='test_eglib-fake.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-fake.obj `if test -f 'fake.c'; then $(CYGPATH_W) 'fake.c'; else $(CYGPATH_W) '$(srcdir)/fake.c'; fi` + +test_eglib-path.o: path.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-path.o -MD -MP -MF $(DEPDIR)/test_eglib-path.Tpo -c -o test_eglib-path.o `test -f 'path.c' || echo '$(srcdir)/'`path.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-path.Tpo $(DEPDIR)/test_eglib-path.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='path.c' object='test_eglib-path.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-path.o `test -f 'path.c' || echo '$(srcdir)/'`path.c + +test_eglib-path.obj: path.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-path.obj -MD -MP -MF $(DEPDIR)/test_eglib-path.Tpo -c -o test_eglib-path.obj `if test -f 'path.c'; then $(CYGPATH_W) 'path.c'; else $(CYGPATH_W) '$(srcdir)/path.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-path.Tpo $(DEPDIR)/test_eglib-path.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='path.c' object='test_eglib-path.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-path.obj `if test -f 'path.c'; then $(CYGPATH_W) 'path.c'; else $(CYGPATH_W) '$(srcdir)/path.c'; fi` + +test_eglib-queue.o: queue.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-queue.o -MD -MP -MF $(DEPDIR)/test_eglib-queue.Tpo -c -o test_eglib-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-queue.Tpo $(DEPDIR)/test_eglib-queue.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='queue.c' object='test_eglib-queue.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c + +test_eglib-queue.obj: queue.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-queue.obj -MD -MP -MF $(DEPDIR)/test_eglib-queue.Tpo -c -o test_eglib-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-queue.Tpo $(DEPDIR)/test_eglib-queue.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='queue.c' object='test_eglib-queue.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi` + +test_eglib-shell.o: shell.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-shell.o -MD -MP -MF $(DEPDIR)/test_eglib-shell.Tpo -c -o test_eglib-shell.o `test -f 'shell.c' || echo '$(srcdir)/'`shell.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-shell.Tpo $(DEPDIR)/test_eglib-shell.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shell.c' object='test_eglib-shell.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-shell.o `test -f 'shell.c' || echo '$(srcdir)/'`shell.c + +test_eglib-shell.obj: shell.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-shell.obj -MD -MP -MF $(DEPDIR)/test_eglib-shell.Tpo -c -o test_eglib-shell.obj `if test -f 'shell.c'; then $(CYGPATH_W) 'shell.c'; else $(CYGPATH_W) '$(srcdir)/shell.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-shell.Tpo $(DEPDIR)/test_eglib-shell.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shell.c' object='test_eglib-shell.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-shell.obj `if test -f 'shell.c'; then $(CYGPATH_W) 'shell.c'; else $(CYGPATH_W) '$(srcdir)/shell.c'; fi` + +test_eglib-spawn.o: spawn.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-spawn.o -MD -MP -MF $(DEPDIR)/test_eglib-spawn.Tpo -c -o test_eglib-spawn.o `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-spawn.Tpo $(DEPDIR)/test_eglib-spawn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spawn.c' object='test_eglib-spawn.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-spawn.o `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c + +test_eglib-spawn.obj: spawn.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-spawn.obj -MD -MP -MF $(DEPDIR)/test_eglib-spawn.Tpo -c -o test_eglib-spawn.obj `if test -f 'spawn.c'; then $(CYGPATH_W) 'spawn.c'; else $(CYGPATH_W) '$(srcdir)/spawn.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-spawn.Tpo $(DEPDIR)/test_eglib-spawn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spawn.c' object='test_eglib-spawn.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-spawn.obj `if test -f 'spawn.c'; then $(CYGPATH_W) 'spawn.c'; else $(CYGPATH_W) '$(srcdir)/spawn.c'; fi` + +test_eglib-timer.o: timer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-timer.o -MD -MP -MF $(DEPDIR)/test_eglib-timer.Tpo -c -o test_eglib-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-timer.Tpo $(DEPDIR)/test_eglib-timer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='test_eglib-timer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c + +test_eglib-timer.obj: timer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-timer.obj -MD -MP -MF $(DEPDIR)/test_eglib-timer.Tpo -c -o test_eglib-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-timer.Tpo $(DEPDIR)/test_eglib-timer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='test_eglib-timer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` + +test_eglib-file.o: file.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-file.o -MD -MP -MF $(DEPDIR)/test_eglib-file.Tpo -c -o test_eglib-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-file.Tpo $(DEPDIR)/test_eglib-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='test_eglib-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c + +test_eglib-file.obj: file.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-file.obj -MD -MP -MF $(DEPDIR)/test_eglib-file.Tpo -c -o test_eglib-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-file.Tpo $(DEPDIR)/test_eglib-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='test_eglib-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` + +test_eglib-pattern.o: pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-pattern.o -MD -MP -MF $(DEPDIR)/test_eglib-pattern.Tpo -c -o test_eglib-pattern.o `test -f 'pattern.c' || echo '$(srcdir)/'`pattern.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-pattern.Tpo $(DEPDIR)/test_eglib-pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pattern.c' object='test_eglib-pattern.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-pattern.o `test -f 'pattern.c' || echo '$(srcdir)/'`pattern.c + +test_eglib-pattern.obj: pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-pattern.obj -MD -MP -MF $(DEPDIR)/test_eglib-pattern.Tpo -c -o test_eglib-pattern.obj `if test -f 'pattern.c'; then $(CYGPATH_W) 'pattern.c'; else $(CYGPATH_W) '$(srcdir)/pattern.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-pattern.Tpo $(DEPDIR)/test_eglib-pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pattern.c' object='test_eglib-pattern.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-pattern.obj `if test -f 'pattern.c'; then $(CYGPATH_W) 'pattern.c'; else $(CYGPATH_W) '$(srcdir)/pattern.c'; fi` + +test_eglib-dir.o: dir.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-dir.o -MD -MP -MF $(DEPDIR)/test_eglib-dir.Tpo -c -o test_eglib-dir.o `test -f 'dir.c' || echo '$(srcdir)/'`dir.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-dir.Tpo $(DEPDIR)/test_eglib-dir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir.c' object='test_eglib-dir.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-dir.o `test -f 'dir.c' || echo '$(srcdir)/'`dir.c + +test_eglib-dir.obj: dir.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-dir.obj -MD -MP -MF $(DEPDIR)/test_eglib-dir.Tpo -c -o test_eglib-dir.obj `if test -f 'dir.c'; then $(CYGPATH_W) 'dir.c'; else $(CYGPATH_W) '$(srcdir)/dir.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-dir.Tpo $(DEPDIR)/test_eglib-dir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir.c' object='test_eglib-dir.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-dir.obj `if test -f 'dir.c'; then $(CYGPATH_W) 'dir.c'; else $(CYGPATH_W) '$(srcdir)/dir.c'; fi` + +test_eglib-markup.o: markup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-markup.o -MD -MP -MF $(DEPDIR)/test_eglib-markup.Tpo -c -o test_eglib-markup.o `test -f 'markup.c' || echo '$(srcdir)/'`markup.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-markup.Tpo $(DEPDIR)/test_eglib-markup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='markup.c' object='test_eglib-markup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-markup.o `test -f 'markup.c' || echo '$(srcdir)/'`markup.c + +test_eglib-markup.obj: markup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-markup.obj -MD -MP -MF $(DEPDIR)/test_eglib-markup.Tpo -c -o test_eglib-markup.obj `if test -f 'markup.c'; then $(CYGPATH_W) 'markup.c'; else $(CYGPATH_W) '$(srcdir)/markup.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-markup.Tpo $(DEPDIR)/test_eglib-markup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='markup.c' object='test_eglib-markup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-markup.obj `if test -f 'markup.c'; then $(CYGPATH_W) 'markup.c'; else $(CYGPATH_W) '$(srcdir)/markup.c'; fi` + +test_eglib-unicode.o: unicode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-unicode.o -MD -MP -MF $(DEPDIR)/test_eglib-unicode.Tpo -c -o test_eglib-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-unicode.Tpo $(DEPDIR)/test_eglib-unicode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='test_eglib-unicode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c + +test_eglib-unicode.obj: unicode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-unicode.obj -MD -MP -MF $(DEPDIR)/test_eglib-unicode.Tpo -c -o test_eglib-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-unicode.Tpo $(DEPDIR)/test_eglib-unicode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='test_eglib-unicode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi` + +test_eglib-utf8.o: utf8.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-utf8.o -MD -MP -MF $(DEPDIR)/test_eglib-utf8.Tpo -c -o test_eglib-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-utf8.Tpo $(DEPDIR)/test_eglib-utf8.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='test_eglib-utf8.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c + +test_eglib-utf8.obj: utf8.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-utf8.obj -MD -MP -MF $(DEPDIR)/test_eglib-utf8.Tpo -c -o test_eglib-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-utf8.Tpo $(DEPDIR)/test_eglib-utf8.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='test_eglib-utf8.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi` + +test_eglib-endian.o: endian.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-endian.o -MD -MP -MF $(DEPDIR)/test_eglib-endian.Tpo -c -o test_eglib-endian.o `test -f 'endian.c' || echo '$(srcdir)/'`endian.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-endian.Tpo $(DEPDIR)/test_eglib-endian.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endian.c' object='test_eglib-endian.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-endian.o `test -f 'endian.c' || echo '$(srcdir)/'`endian.c + +test_eglib-endian.obj: endian.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-endian.obj -MD -MP -MF $(DEPDIR)/test_eglib-endian.Tpo -c -o test_eglib-endian.obj `if test -f 'endian.c'; then $(CYGPATH_W) 'endian.c'; else $(CYGPATH_W) '$(srcdir)/endian.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-endian.Tpo $(DEPDIR)/test_eglib-endian.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endian.c' object='test_eglib-endian.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-endian.obj `if test -f 'endian.c'; then $(CYGPATH_W) 'endian.c'; else $(CYGPATH_W) '$(srcdir)/endian.c'; fi` + +test_eglib-module.o: module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-module.o -MD -MP -MF $(DEPDIR)/test_eglib-module.Tpo -c -o test_eglib-module.o `test -f 'module.c' || echo '$(srcdir)/'`module.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-module.Tpo $(DEPDIR)/test_eglib-module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='module.c' object='test_eglib-module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-module.o `test -f 'module.c' || echo '$(srcdir)/'`module.c + +test_eglib-module.obj: module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-module.obj -MD -MP -MF $(DEPDIR)/test_eglib-module.Tpo -c -o test_eglib-module.obj `if test -f 'module.c'; then $(CYGPATH_W) 'module.c'; else $(CYGPATH_W) '$(srcdir)/module.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-module.Tpo $(DEPDIR)/test_eglib-module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='module.c' object='test_eglib-module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-module.obj `if test -f 'module.c'; then $(CYGPATH_W) 'module.c'; else $(CYGPATH_W) '$(srcdir)/module.c'; fi` + +test_eglib-memory.o: memory.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-memory.o -MD -MP -MF $(DEPDIR)/test_eglib-memory.Tpo -c -o test_eglib-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-memory.Tpo $(DEPDIR)/test_eglib-memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memory.c' object='test_eglib-memory.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c + +test_eglib-memory.obj: memory.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -MT test_eglib-memory.obj -MD -MP -MF $(DEPDIR)/test_eglib-memory.Tpo -c -o test_eglib-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_eglib-memory.Tpo $(DEPDIR)/test_eglib-memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memory.c' object='test_eglib-memory.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_eglib_CFLAGS) $(CFLAGS) -c -o test_eglib-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi` + +test_glib-test.o: test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-test.o -MD -MP -MF $(DEPDIR)/test_glib-test.Tpo -c -o test_glib-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-test.Tpo $(DEPDIR)/test_glib-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='test_glib-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c + +test_glib-test.obj: test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-test.obj -MD -MP -MF $(DEPDIR)/test_glib-test.Tpo -c -o test_glib-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-test.Tpo $(DEPDIR)/test_glib-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='test_glib-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` + +test_glib-driver.o: driver.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-driver.o -MD -MP -MF $(DEPDIR)/test_glib-driver.Tpo -c -o test_glib-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-driver.Tpo $(DEPDIR)/test_glib-driver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='test_glib-driver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c + +test_glib-driver.obj: driver.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-driver.obj -MD -MP -MF $(DEPDIR)/test_glib-driver.Tpo -c -o test_glib-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-driver.Tpo $(DEPDIR)/test_glib-driver.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='test_glib-driver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` + +test_glib-hashtable.o: hashtable.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-hashtable.o -MD -MP -MF $(DEPDIR)/test_glib-hashtable.Tpo -c -o test_glib-hashtable.o `test -f 'hashtable.c' || echo '$(srcdir)/'`hashtable.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-hashtable.Tpo $(DEPDIR)/test_glib-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hashtable.c' object='test_glib-hashtable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-hashtable.o `test -f 'hashtable.c' || echo '$(srcdir)/'`hashtable.c + +test_glib-hashtable.obj: hashtable.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-hashtable.obj -MD -MP -MF $(DEPDIR)/test_glib-hashtable.Tpo -c -o test_glib-hashtable.obj `if test -f 'hashtable.c'; then $(CYGPATH_W) 'hashtable.c'; else $(CYGPATH_W) '$(srcdir)/hashtable.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-hashtable.Tpo $(DEPDIR)/test_glib-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hashtable.c' object='test_glib-hashtable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-hashtable.obj `if test -f 'hashtable.c'; then $(CYGPATH_W) 'hashtable.c'; else $(CYGPATH_W) '$(srcdir)/hashtable.c'; fi` + +test_glib-string-util.o: string-util.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-string-util.o -MD -MP -MF $(DEPDIR)/test_glib-string-util.Tpo -c -o test_glib-string-util.o `test -f 'string-util.c' || echo '$(srcdir)/'`string-util.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-string-util.Tpo $(DEPDIR)/test_glib-string-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string-util.c' object='test_glib-string-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-string-util.o `test -f 'string-util.c' || echo '$(srcdir)/'`string-util.c + +test_glib-string-util.obj: string-util.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-string-util.obj -MD -MP -MF $(DEPDIR)/test_glib-string-util.Tpo -c -o test_glib-string-util.obj `if test -f 'string-util.c'; then $(CYGPATH_W) 'string-util.c'; else $(CYGPATH_W) '$(srcdir)/string-util.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-string-util.Tpo $(DEPDIR)/test_glib-string-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string-util.c' object='test_glib-string-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-string-util.obj `if test -f 'string-util.c'; then $(CYGPATH_W) 'string-util.c'; else $(CYGPATH_W) '$(srcdir)/string-util.c'; fi` + +test_glib-string.o: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-string.o -MD -MP -MF $(DEPDIR)/test_glib-string.Tpo -c -o test_glib-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-string.Tpo $(DEPDIR)/test_glib-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='test_glib-string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c + +test_glib-string.obj: string.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-string.obj -MD -MP -MF $(DEPDIR)/test_glib-string.Tpo -c -o test_glib-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-string.Tpo $(DEPDIR)/test_glib-string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='test_glib-string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` + +test_glib-slist.o: slist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-slist.o -MD -MP -MF $(DEPDIR)/test_glib-slist.Tpo -c -o test_glib-slist.o `test -f 'slist.c' || echo '$(srcdir)/'`slist.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-slist.Tpo $(DEPDIR)/test_glib-slist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='test_glib-slist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-slist.o `test -f 'slist.c' || echo '$(srcdir)/'`slist.c + +test_glib-slist.obj: slist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-slist.obj -MD -MP -MF $(DEPDIR)/test_glib-slist.Tpo -c -o test_glib-slist.obj `if test -f 'slist.c'; then $(CYGPATH_W) 'slist.c'; else $(CYGPATH_W) '$(srcdir)/slist.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-slist.Tpo $(DEPDIR)/test_glib-slist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slist.c' object='test_glib-slist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-slist.obj `if test -f 'slist.c'; then $(CYGPATH_W) 'slist.c'; else $(CYGPATH_W) '$(srcdir)/slist.c'; fi` + +test_glib-sizes.o: sizes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-sizes.o -MD -MP -MF $(DEPDIR)/test_glib-sizes.Tpo -c -o test_glib-sizes.o `test -f 'sizes.c' || echo '$(srcdir)/'`sizes.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-sizes.Tpo $(DEPDIR)/test_glib-sizes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sizes.c' object='test_glib-sizes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-sizes.o `test -f 'sizes.c' || echo '$(srcdir)/'`sizes.c + +test_glib-sizes.obj: sizes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-sizes.obj -MD -MP -MF $(DEPDIR)/test_glib-sizes.Tpo -c -o test_glib-sizes.obj `if test -f 'sizes.c'; then $(CYGPATH_W) 'sizes.c'; else $(CYGPATH_W) '$(srcdir)/sizes.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-sizes.Tpo $(DEPDIR)/test_glib-sizes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sizes.c' object='test_glib-sizes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-sizes.obj `if test -f 'sizes.c'; then $(CYGPATH_W) 'sizes.c'; else $(CYGPATH_W) '$(srcdir)/sizes.c'; fi` + +test_glib-ptrarray.o: ptrarray.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-ptrarray.o -MD -MP -MF $(DEPDIR)/test_glib-ptrarray.Tpo -c -o test_glib-ptrarray.o `test -f 'ptrarray.c' || echo '$(srcdir)/'`ptrarray.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-ptrarray.Tpo $(DEPDIR)/test_glib-ptrarray.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptrarray.c' object='test_glib-ptrarray.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-ptrarray.o `test -f 'ptrarray.c' || echo '$(srcdir)/'`ptrarray.c + +test_glib-ptrarray.obj: ptrarray.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-ptrarray.obj -MD -MP -MF $(DEPDIR)/test_glib-ptrarray.Tpo -c -o test_glib-ptrarray.obj `if test -f 'ptrarray.c'; then $(CYGPATH_W) 'ptrarray.c'; else $(CYGPATH_W) '$(srcdir)/ptrarray.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-ptrarray.Tpo $(DEPDIR)/test_glib-ptrarray.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptrarray.c' object='test_glib-ptrarray.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-ptrarray.obj `if test -f 'ptrarray.c'; then $(CYGPATH_W) 'ptrarray.c'; else $(CYGPATH_W) '$(srcdir)/ptrarray.c'; fi` + +test_glib-list.o: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-list.o -MD -MP -MF $(DEPDIR)/test_glib-list.Tpo -c -o test_glib-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-list.Tpo $(DEPDIR)/test_glib-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='test_glib-list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c + +test_glib-list.obj: list.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-list.obj -MD -MP -MF $(DEPDIR)/test_glib-list.Tpo -c -o test_glib-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-list.Tpo $(DEPDIR)/test_glib-list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='test_glib-list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` + +test_glib-array.o: array.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-array.o -MD -MP -MF $(DEPDIR)/test_glib-array.Tpo -c -o test_glib-array.o `test -f 'array.c' || echo '$(srcdir)/'`array.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-array.Tpo $(DEPDIR)/test_glib-array.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='array.c' object='test_glib-array.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-array.o `test -f 'array.c' || echo '$(srcdir)/'`array.c + +test_glib-array.obj: array.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-array.obj -MD -MP -MF $(DEPDIR)/test_glib-array.Tpo -c -o test_glib-array.obj `if test -f 'array.c'; then $(CYGPATH_W) 'array.c'; else $(CYGPATH_W) '$(srcdir)/array.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-array.Tpo $(DEPDIR)/test_glib-array.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='array.c' object='test_glib-array.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-array.obj `if test -f 'array.c'; then $(CYGPATH_W) 'array.c'; else $(CYGPATH_W) '$(srcdir)/array.c'; fi` + +test_glib-fake.o: fake.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-fake.o -MD -MP -MF $(DEPDIR)/test_glib-fake.Tpo -c -o test_glib-fake.o `test -f 'fake.c' || echo '$(srcdir)/'`fake.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-fake.Tpo $(DEPDIR)/test_glib-fake.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fake.c' object='test_glib-fake.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-fake.o `test -f 'fake.c' || echo '$(srcdir)/'`fake.c + +test_glib-fake.obj: fake.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-fake.obj -MD -MP -MF $(DEPDIR)/test_glib-fake.Tpo -c -o test_glib-fake.obj `if test -f 'fake.c'; then $(CYGPATH_W) 'fake.c'; else $(CYGPATH_W) '$(srcdir)/fake.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-fake.Tpo $(DEPDIR)/test_glib-fake.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fake.c' object='test_glib-fake.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-fake.obj `if test -f 'fake.c'; then $(CYGPATH_W) 'fake.c'; else $(CYGPATH_W) '$(srcdir)/fake.c'; fi` + +test_glib-path.o: path.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-path.o -MD -MP -MF $(DEPDIR)/test_glib-path.Tpo -c -o test_glib-path.o `test -f 'path.c' || echo '$(srcdir)/'`path.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-path.Tpo $(DEPDIR)/test_glib-path.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='path.c' object='test_glib-path.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-path.o `test -f 'path.c' || echo '$(srcdir)/'`path.c + +test_glib-path.obj: path.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-path.obj -MD -MP -MF $(DEPDIR)/test_glib-path.Tpo -c -o test_glib-path.obj `if test -f 'path.c'; then $(CYGPATH_W) 'path.c'; else $(CYGPATH_W) '$(srcdir)/path.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-path.Tpo $(DEPDIR)/test_glib-path.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='path.c' object='test_glib-path.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-path.obj `if test -f 'path.c'; then $(CYGPATH_W) 'path.c'; else $(CYGPATH_W) '$(srcdir)/path.c'; fi` + +test_glib-queue.o: queue.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-queue.o -MD -MP -MF $(DEPDIR)/test_glib-queue.Tpo -c -o test_glib-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-queue.Tpo $(DEPDIR)/test_glib-queue.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='queue.c' object='test_glib-queue.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-queue.o `test -f 'queue.c' || echo '$(srcdir)/'`queue.c + +test_glib-queue.obj: queue.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-queue.obj -MD -MP -MF $(DEPDIR)/test_glib-queue.Tpo -c -o test_glib-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-queue.Tpo $(DEPDIR)/test_glib-queue.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='queue.c' object='test_glib-queue.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-queue.obj `if test -f 'queue.c'; then $(CYGPATH_W) 'queue.c'; else $(CYGPATH_W) '$(srcdir)/queue.c'; fi` + +test_glib-shell.o: shell.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-shell.o -MD -MP -MF $(DEPDIR)/test_glib-shell.Tpo -c -o test_glib-shell.o `test -f 'shell.c' || echo '$(srcdir)/'`shell.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-shell.Tpo $(DEPDIR)/test_glib-shell.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shell.c' object='test_glib-shell.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-shell.o `test -f 'shell.c' || echo '$(srcdir)/'`shell.c + +test_glib-shell.obj: shell.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-shell.obj -MD -MP -MF $(DEPDIR)/test_glib-shell.Tpo -c -o test_glib-shell.obj `if test -f 'shell.c'; then $(CYGPATH_W) 'shell.c'; else $(CYGPATH_W) '$(srcdir)/shell.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-shell.Tpo $(DEPDIR)/test_glib-shell.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shell.c' object='test_glib-shell.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-shell.obj `if test -f 'shell.c'; then $(CYGPATH_W) 'shell.c'; else $(CYGPATH_W) '$(srcdir)/shell.c'; fi` + +test_glib-spawn.o: spawn.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-spawn.o -MD -MP -MF $(DEPDIR)/test_glib-spawn.Tpo -c -o test_glib-spawn.o `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-spawn.Tpo $(DEPDIR)/test_glib-spawn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spawn.c' object='test_glib-spawn.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-spawn.o `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c + +test_glib-spawn.obj: spawn.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-spawn.obj -MD -MP -MF $(DEPDIR)/test_glib-spawn.Tpo -c -o test_glib-spawn.obj `if test -f 'spawn.c'; then $(CYGPATH_W) 'spawn.c'; else $(CYGPATH_W) '$(srcdir)/spawn.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-spawn.Tpo $(DEPDIR)/test_glib-spawn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spawn.c' object='test_glib-spawn.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-spawn.obj `if test -f 'spawn.c'; then $(CYGPATH_W) 'spawn.c'; else $(CYGPATH_W) '$(srcdir)/spawn.c'; fi` + +test_glib-timer.o: timer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-timer.o -MD -MP -MF $(DEPDIR)/test_glib-timer.Tpo -c -o test_glib-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-timer.Tpo $(DEPDIR)/test_glib-timer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='test_glib-timer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c + +test_glib-timer.obj: timer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-timer.obj -MD -MP -MF $(DEPDIR)/test_glib-timer.Tpo -c -o test_glib-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-timer.Tpo $(DEPDIR)/test_glib-timer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='test_glib-timer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` + +test_glib-file.o: file.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-file.o -MD -MP -MF $(DEPDIR)/test_glib-file.Tpo -c -o test_glib-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-file.Tpo $(DEPDIR)/test_glib-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='test_glib-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c + +test_glib-file.obj: file.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-file.obj -MD -MP -MF $(DEPDIR)/test_glib-file.Tpo -c -o test_glib-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-file.Tpo $(DEPDIR)/test_glib-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='test_glib-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi` + +test_glib-pattern.o: pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-pattern.o -MD -MP -MF $(DEPDIR)/test_glib-pattern.Tpo -c -o test_glib-pattern.o `test -f 'pattern.c' || echo '$(srcdir)/'`pattern.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-pattern.Tpo $(DEPDIR)/test_glib-pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pattern.c' object='test_glib-pattern.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-pattern.o `test -f 'pattern.c' || echo '$(srcdir)/'`pattern.c + +test_glib-pattern.obj: pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-pattern.obj -MD -MP -MF $(DEPDIR)/test_glib-pattern.Tpo -c -o test_glib-pattern.obj `if test -f 'pattern.c'; then $(CYGPATH_W) 'pattern.c'; else $(CYGPATH_W) '$(srcdir)/pattern.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-pattern.Tpo $(DEPDIR)/test_glib-pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pattern.c' object='test_glib-pattern.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-pattern.obj `if test -f 'pattern.c'; then $(CYGPATH_W) 'pattern.c'; else $(CYGPATH_W) '$(srcdir)/pattern.c'; fi` + +test_glib-dir.o: dir.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-dir.o -MD -MP -MF $(DEPDIR)/test_glib-dir.Tpo -c -o test_glib-dir.o `test -f 'dir.c' || echo '$(srcdir)/'`dir.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-dir.Tpo $(DEPDIR)/test_glib-dir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir.c' object='test_glib-dir.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-dir.o `test -f 'dir.c' || echo '$(srcdir)/'`dir.c + +test_glib-dir.obj: dir.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-dir.obj -MD -MP -MF $(DEPDIR)/test_glib-dir.Tpo -c -o test_glib-dir.obj `if test -f 'dir.c'; then $(CYGPATH_W) 'dir.c'; else $(CYGPATH_W) '$(srcdir)/dir.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-dir.Tpo $(DEPDIR)/test_glib-dir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir.c' object='test_glib-dir.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-dir.obj `if test -f 'dir.c'; then $(CYGPATH_W) 'dir.c'; else $(CYGPATH_W) '$(srcdir)/dir.c'; fi` + +test_glib-markup.o: markup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-markup.o -MD -MP -MF $(DEPDIR)/test_glib-markup.Tpo -c -o test_glib-markup.o `test -f 'markup.c' || echo '$(srcdir)/'`markup.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-markup.Tpo $(DEPDIR)/test_glib-markup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='markup.c' object='test_glib-markup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-markup.o `test -f 'markup.c' || echo '$(srcdir)/'`markup.c + +test_glib-markup.obj: markup.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-markup.obj -MD -MP -MF $(DEPDIR)/test_glib-markup.Tpo -c -o test_glib-markup.obj `if test -f 'markup.c'; then $(CYGPATH_W) 'markup.c'; else $(CYGPATH_W) '$(srcdir)/markup.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-markup.Tpo $(DEPDIR)/test_glib-markup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='markup.c' object='test_glib-markup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-markup.obj `if test -f 'markup.c'; then $(CYGPATH_W) 'markup.c'; else $(CYGPATH_W) '$(srcdir)/markup.c'; fi` + +test_glib-unicode.o: unicode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-unicode.o -MD -MP -MF $(DEPDIR)/test_glib-unicode.Tpo -c -o test_glib-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-unicode.Tpo $(DEPDIR)/test_glib-unicode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='test_glib-unicode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-unicode.o `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c + +test_glib-unicode.obj: unicode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-unicode.obj -MD -MP -MF $(DEPDIR)/test_glib-unicode.Tpo -c -o test_glib-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-unicode.Tpo $(DEPDIR)/test_glib-unicode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='test_glib-unicode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-unicode.obj `if test -f 'unicode.c'; then $(CYGPATH_W) 'unicode.c'; else $(CYGPATH_W) '$(srcdir)/unicode.c'; fi` + +test_glib-utf8.o: utf8.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-utf8.o -MD -MP -MF $(DEPDIR)/test_glib-utf8.Tpo -c -o test_glib-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-utf8.Tpo $(DEPDIR)/test_glib-utf8.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='test_glib-utf8.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c + +test_glib-utf8.obj: utf8.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-utf8.obj -MD -MP -MF $(DEPDIR)/test_glib-utf8.Tpo -c -o test_glib-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-utf8.Tpo $(DEPDIR)/test_glib-utf8.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='test_glib-utf8.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi` + +test_glib-endian.o: endian.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-endian.o -MD -MP -MF $(DEPDIR)/test_glib-endian.Tpo -c -o test_glib-endian.o `test -f 'endian.c' || echo '$(srcdir)/'`endian.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-endian.Tpo $(DEPDIR)/test_glib-endian.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endian.c' object='test_glib-endian.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-endian.o `test -f 'endian.c' || echo '$(srcdir)/'`endian.c + +test_glib-endian.obj: endian.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-endian.obj -MD -MP -MF $(DEPDIR)/test_glib-endian.Tpo -c -o test_glib-endian.obj `if test -f 'endian.c'; then $(CYGPATH_W) 'endian.c'; else $(CYGPATH_W) '$(srcdir)/endian.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-endian.Tpo $(DEPDIR)/test_glib-endian.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='endian.c' object='test_glib-endian.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-endian.obj `if test -f 'endian.c'; then $(CYGPATH_W) 'endian.c'; else $(CYGPATH_W) '$(srcdir)/endian.c'; fi` + +test_glib-module.o: module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-module.o -MD -MP -MF $(DEPDIR)/test_glib-module.Tpo -c -o test_glib-module.o `test -f 'module.c' || echo '$(srcdir)/'`module.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-module.Tpo $(DEPDIR)/test_glib-module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='module.c' object='test_glib-module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-module.o `test -f 'module.c' || echo '$(srcdir)/'`module.c + +test_glib-module.obj: module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-module.obj -MD -MP -MF $(DEPDIR)/test_glib-module.Tpo -c -o test_glib-module.obj `if test -f 'module.c'; then $(CYGPATH_W) 'module.c'; else $(CYGPATH_W) '$(srcdir)/module.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-module.Tpo $(DEPDIR)/test_glib-module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='module.c' object='test_glib-module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-module.obj `if test -f 'module.c'; then $(CYGPATH_W) 'module.c'; else $(CYGPATH_W) '$(srcdir)/module.c'; fi` + +test_glib-memory.o: memory.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-memory.o -MD -MP -MF $(DEPDIR)/test_glib-memory.Tpo -c -o test_glib-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-memory.Tpo $(DEPDIR)/test_glib-memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memory.c' object='test_glib-memory.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-memory.o `test -f 'memory.c' || echo '$(srcdir)/'`memory.c + +test_glib-memory.obj: memory.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -MT test_glib-memory.obj -MD -MP -MF $(DEPDIR)/test_glib-memory.Tpo -c -o test_glib-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/test_glib-memory.Tpo $(DEPDIR)/test_glib-memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memory.c' object='test_glib-memory.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_glib_CFLAGS) $(CFLAGS) -c -o test_glib-memory.obj `if test -f 'memory.c'; then $(CYGPATH_W) 'memory.c'; else $(CYGPATH_W) '$(srcdir)/memory.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +run-eglib: all + ./test-eglib + +@HAVE_GLIB_TRUE@run-glib: all +@HAVE_GLIB_TRUE@ ./test-glib + +@HAVE_GLIB_TRUE@run-both: run-glib run-eglib + +@HAVE_GLIB_FALSE@run-both: run-eglib +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/eglib/test/README b/eglib/test/README new file mode 100644 index 0000000000..7c28d03e95 --- /dev/null +++ b/eglib/test/README @@ -0,0 +1,113 @@ +EGlib Unit Testing +=============================================================================== + + 1. Writing new tests + 2. Using the test driver + +=============================================================================== +1. Writing new tests +=============================================================================== + +Tests are easy to write, but must be grouped in to logical cases. For instance, +the GPtrArray group has a number of tests that cover the entire GPtrArray +implementation. + +These logical case groups should be in a single C file, and must have +three elements: + + #include <glib.h> + #include "test.h" + + ... + <define test implementations> + ... + + static Test groupname_tests [] = { + {"groupname_test1", groupname_test1}, + {"groupname_test1", groupname_test2}, + {NULL, NULL} + }; + + DEFINE_TEST_GROUP_INIT(groupname_tests_init, groupname_tests) + +A test implementation should look like: + + RESULT groupname_test1() + { + <perform the test> + + if(test_failed) { + return FAILED("reason: %s", "this works like printf"); + } + + return OK; /* just NULL, but OK is cute */ + } + +Once a test group is written, it needs to be added to the groups table +in tests.h: + + DEFINE_TEST_GROUP_INIT_H(groupname_tests_init) // same as in impl + + static Group test_groups [] = { + ... + {"groupname", groupname_tests_init} + ... + }; + +=============================================================================== +2. Using the test driver +=============================================================================== + +When tests are written, they are rebuilt with make. Two programs will be +built: + + test-eglib: the test driver and tests linked against eglib + test-glib: the test driver and tests linked against system glib-2.0 + +Each driver program works exactly the same. Running test-eglib will run +the tests against eglib, and test-glib against glib-2.0. + +The test driver supports a few options to allow for performance measuring: + + --help show all options and available test groups + --time time the overall run and report it, even if --quiet is set + --quiet do not print test results, useful for timing + --iterations N run all or specified test groups N times + +Run "test-eglib --help" for more details. + +Example: run the ptrarray test group 100000 times and only print the time + it took to perform all iterations + + ./test-eglib -tqi 100000 ptrarray + +Example: show single iteration of test output for two groups + + ./test-eglib ptrarray hashtable + +Example: show test output of all available groups + + ./test-eglib + +The 'test-both' script can be used to run both test-eglib and test-glib +with the same options back to back: + + $ ./test-both -tqi 100000 ptrarray + EGlib Total Time: 1.1961s + GLib Total Time: 0.955957s + +test-both also has a nice --speed-compare mode that shows comparison +information about EGlib vs GLib. It can run all tests or specific tests +with a configurable number of iterations. --speed-compare mode always runs +the drivers with -qtni + +The syntax for --speed-compare is: + + ./test-both --speed-compare [ITERATIONS] [GROUPS...] + + $ ./test-both --speed-compare Runs all tests with default iterations + $ ./test-both --speed-compare 500 Runs all tests with 500 iterations + $ ./test-both --speed-compare ptrarray Runs ptrarray test with default + iterations + + diff --git a/eglib/test/array.c b/eglib/test/array.c new file mode 100644 index 0000000000..37d5486ace --- /dev/null +++ b/eglib/test/array.c @@ -0,0 +1,163 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + +/* example from glib documentation */ +RESULT +test_array_big () +{ + GArray *garray; + gint i; + + /* We create a new array to store gint values. + We don't want it zero-terminated or cleared to 0's. */ + garray = g_array_new (FALSE, FALSE, sizeof (gint)); + for (i = 0; i < 10000; i++) + g_array_append_val (garray, i); + + for (i = 0; i < 10000; i++) + if (g_array_index (garray, gint, i) != i) + return FAILED ("array value didn't match"); + + g_array_free (garray, TRUE); + + return NULL; +} + +RESULT +test_array_index () +{ + GArray *array = g_array_new (FALSE, FALSE, sizeof (int)); + int v; + + v = 27; + g_array_append_val (array, v); + + if (27 != g_array_index (array, int, 0)) + return FAILED (""); + + g_array_free (array, TRUE); + + return NULL; +} + +RESULT +test_array_append_zero_terminated () +{ + GArray *array = g_array_new (TRUE, FALSE, sizeof (int)); + int v; + + v = 27; + g_array_append_val (array, v); + + if (27 != g_array_index (array, int, 0)) + return FAILED ("g_array_append_val failed"); + + if (0 != g_array_index (array, int, 1)) + return FAILED ("zero_terminated didn't append a zero element"); + + g_array_free (array, TRUE); + + return NULL; +} + +RESULT +test_array_append () +{ + GArray *array = g_array_new (FALSE, FALSE, sizeof (int)); + int v; + + if (0 != array->len) + return FAILED ("initial array length not zero"); + + v = 27; + + g_array_append_val (array, v); + + if (1 != array->len) + return FAILED ("array append failed"); + + g_array_free (array, TRUE); + + return NULL; +} + +RESULT +test_array_insert_val () +{ + GArray *array = g_array_new (FALSE, FALSE, sizeof (gpointer)); + gpointer ptr0, ptr1, ptr2, ptr3; + + g_array_insert_val (array, 0, array); + + if (array != g_array_index (array, gpointer, 0)) + return FAILED ("1 The value in the array is incorrect"); + + g_array_insert_val (array, 1, array); + if (array != g_array_index (array, gpointer, 1)) + return FAILED ("2 The value in the array is incorrect"); + + g_array_insert_val (array, 2, array); + if (array != g_array_index (array, gpointer, 2)) + return FAILED ("3 The value in the array is incorrect"); + + g_array_free (array, TRUE); + array = g_array_new (FALSE, FALSE, sizeof (gpointer)); + ptr0 = array; + ptr1 = array + 1; + ptr2 = array + 2; + ptr3 = array + 3; + + g_array_insert_val (array, 0, ptr0); + g_array_insert_val (array, 1, ptr1); + g_array_insert_val (array, 2, ptr2); + g_array_insert_val (array, 1, ptr3); + if (ptr0 != g_array_index (array, gpointer, 0)) + return FAILED ("4 The value in the array is incorrect"); + if (ptr3 != g_array_index (array, gpointer, 1)) + return FAILED ("5 The value in the array is incorrect"); + if (ptr1 != g_array_index (array, gpointer, 2)) + return FAILED ("6 The value in the array is incorrect"); + if (ptr2 != g_array_index (array, gpointer, 3)) + return FAILED ("7 The value in the array is incorrect"); + + g_array_free (array, TRUE); + return NULL; +} + +RESULT +test_array_remove () +{ + GArray *array = g_array_new (FALSE, FALSE, sizeof (int)); + int v[] = {30, 29, 28, 27, 26, 25}; + + g_array_append_vals (array, v, 6); + + if (6 != array->len) + return FAILED ("append_vals fail"); + + g_array_remove_index (array, 3); + + if (5 != array->len) + return FAILED ("remove_index failed to update length"); + + if (26 != g_array_index (array, int, 3)) + return FAILED ("remove_index failed to update the array"); + + g_array_free (array, TRUE); + + return NULL; +} + +static Test array_tests [] = { + {"big", test_array_big}, + {"append", test_array_append}, + {"insert_val", test_array_insert_val}, + {"index", test_array_index}, + {"remove", test_array_remove}, + {"append_zero_term", test_array_append_zero_terminated}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(array_tests_init, array_tests) diff --git a/eglib/test/dir.c b/eglib/test/dir.c new file mode 100644 index 0000000000..f871121725 --- /dev/null +++ b/eglib/test/dir.c @@ -0,0 +1,66 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdio.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef G_OS_UNIX +#include <pthread.h> +#endif +#include "test.h" + +/* This test is just to be used with valgrind */ +RESULT +test_dir () +{ + GDir *dir; + GError *error; + const gchar *name; + + /* + dir = g_dir_open (NULL, 0, NULL); + */ + dir = g_dir_open ("", 0, NULL); + if (dir != NULL) + return FAILED ("1 Should be an error"); + + dir = g_dir_open ("", 9, NULL); + if (dir != NULL) + return FAILED ("2 Should be an error"); + + error = NULL; + dir = g_dir_open (".ljasdslakjd", 9, &error); + if (dir != NULL) + return FAILED ("3 opendir should fail"); + if (error == NULL) + return FAILED ("4 got no error"); + g_error_free (error); + error = NULL; + dir = g_dir_open (g_get_tmp_dir (), 9, &error); + if (dir == NULL) + return FAILED ("5 opendir should succeed"); + if (error != NULL) + return FAILED ("6 got an error"); + name = NULL; + name = g_dir_read_name (dir); + if (name == NULL) + return FAILED ("7 didn't read a file name"); + while ((name = g_dir_read_name (dir)) != NULL) { + if (strcmp (name, ".") == 0) + return FAILED (". directory found"); + if (strcmp (name, "..") == 0) + return FAILED (".. directory found"); + } + g_dir_close (dir); + return OK; +} + +static Test dir_tests [] = { + {"g_dir_*", test_dir}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(dir_tests_init, dir_tests) + + diff --git a/eglib/test/driver.c b/eglib/test/driver.c new file mode 100644 index 0000000000..23e7638bdb --- /dev/null +++ b/eglib/test/driver.c @@ -0,0 +1,248 @@ +/* + * EGLib Unit Test Driver + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include <config.h> +#include "test.h" +#include "tests.h" + +#include <stdio.h> +#ifdef HAVE_GETOPT_H +#include <getopt.h> +#endif + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif + +#ifndef DRIVER_NAME +#define DRIVER_NAME "EGlib" +#endif + +typedef struct _StringArray { + gchar **strings; + gint length; +} StringArray; + +static StringArray * +string_array_append(StringArray *array, gchar *string) +{ + if(array == NULL) { + array = g_new0(StringArray, 1); + array->length = 1; + array->strings = g_malloc(sizeof(gchar *) * 2); + } else { + array->length++; + array->strings = g_realloc(array->strings, sizeof(gchar *) + * (array->length + 1)); + } + + array->strings[array->length - 1] = string; + array->strings[array->length] = NULL; + + return array; +} + +gint global_passed = 0, global_tests = 0; + +static void +string_array_free(StringArray *array) +{ + g_free(array->strings); + g_free(array); +} + +static void print_help(char *s) +{ + gint i; + + printf("Usage: %s [OPTION]... [TESTGROUP]...\n\n", s); + printf("OPTIONS are:\n"); + printf(" -h, --help show this help\n"); + printf(" -t, --time time the tests\n"); + printf(" -i, --iterations number of times to run tests\n"); + printf(" -q, --quiet do not print test results; " + "final time always prints\n"); + printf(" -n, --no-labels print final time without labels, " + "nice for scripts\n"); + printf(" -d, --debug do not run tests, " + "debug the driver itself for valgrind\n\n"); + printf("TESTGROUPS available:\n"); + + for(i = 0; test_groups[i].name != NULL; i++) { + if(test_groups[i].handler != fake_tests_init) { + printf(" %s\n", test_groups[i].name); + } + } + + printf("\n"); +} + +gint main(gint argc, gchar **argv) +{ + gint i, j, c, iterations = 1; + StringArray *tests_to_run = NULL; + gdouble time_start; + gboolean report_time = FALSE; + gboolean quiet = FALSE; + gboolean global_failure = FALSE; + gboolean no_final_time_labels = FALSE; + gboolean debug = FALSE; + +#if HAVE_GETOPT_H + static struct option long_options [] = { + {"help", no_argument, 0, 'h'}, + {"time", no_argument, 0, 't'}, + {"quiet", no_argument, 0, 'q'}, + {"iterations", required_argument, 0, 'i'}, + {"debug", no_argument, 0, 'd'}, + {"no-labels", no_argument, 0, 'n'}, + {0, 0, 0, 0} + }; + + while((c = getopt_long(argc, argv, "dhtqni:", long_options, NULL)) != -1) { switch(c) { + case 'h': + print_help(argv[0]); + return 1; + case 't': + report_time = TRUE; + break; + case 'i': + iterations = atoi(optarg); + break; + case 'q': + quiet = TRUE; + break; + case 'n': + no_final_time_labels = TRUE; + break; + case 'd': + debug = TRUE; + break; + } + } + + for(i = optind; i < argc; i++) { + if(argv[i][0] == '-') { + continue; + } + + tests_to_run = string_array_append(tests_to_run, argv[i]); + } +#endif + + time_start = get_timestamp(); + + for(j = 0; test_groups[j].name != NULL; j++) { + gboolean run = TRUE; + gchar *tests = NULL; + gchar *group = NULL; + + if(tests_to_run != NULL) { + gint k; + run = FALSE; + + for(k = 0; k < tests_to_run->length; k++) { + gchar *user = tests_to_run->strings[k]; + const gchar *table = test_groups[j].name; + size_t user_len = strlen(user); + size_t table_len = strlen(table); + + if(strncmp(user, table, table_len) == 0) { + if(user_len > table_len && user[table_len] != ':') { + break; + } + + run = TRUE; + group = tests_to_run->strings[k]; + break; + } + } + } + + if(run) { + gboolean passed; + gchar **split = NULL; + + if(debug && test_groups[j].handler != fake_tests_init) { + printf("Skipping %s, in driver debug mode\n", + test_groups[j].name); + continue; + } else if(!debug && test_groups[j].handler == fake_tests_init) { + continue; + } + + if(group != NULL) { + split = eg_strsplit(group, ":", -1); + if(split != NULL) { + gint m; + for(m = 0; split[m] != NULL; m++) { + if(m == 1) { + tests = strdup(split[m]); + break; + } + } + eg_strfreev(split); + } + } + + passed = run_group(&(test_groups[j]), + iterations, quiet, report_time, tests); + + if(tests != NULL) { + g_free(tests); + } + + if(!passed && !global_failure) { + global_failure = TRUE; + } + } + } + + if(!quiet) { + gdouble pass_percentage = ((gdouble)global_passed / (gdouble)global_tests) * 100.0; + printf("=============================\n"); + printf("Overall result: %s : %d / %d (%g%%)\n", global_failure ? "FAILED" : "OK", global_passed, global_tests, pass_percentage); + } + + if(report_time) { + gdouble duration = get_timestamp() - time_start; + if(no_final_time_labels) { + printf("%g\n", duration); + } else { + printf("%s Total Time: %g\n", DRIVER_NAME, duration); + } + } + + if(tests_to_run != NULL) { + string_array_free(tests_to_run); + } + + return global_tests - global_passed; +} + + diff --git a/eglib/test/endian.c b/eglib/test/endian.c new file mode 100644 index 0000000000..3347d765ff --- /dev/null +++ b/eglib/test/endian.c @@ -0,0 +1,38 @@ +#include "test.h" + +RESULT +test_swap () +{ + guint32 a = 0xabcdef01, res32; + guint64 b = (((guint64)a) << 32) | a, res64; + guint64 b_expect = (((guint64)0x1efcdab) << 32) | 0x01efcdab; + guint16 c = 0xabcd, res16; + + res32 = GUINT32_SWAP_LE_BE (a); + if (res32 != 0x01efcdab) + return FAILED ("GUINT32_SWAP_LE_BE returned 0x%x", res32); + res32 = GUINT32_SWAP_LE_BE (1); + if (res32 != 0x1000000) + return FAILED ("GUINT32_SWAP_LE_BE returned 0x%x", res32); + + res64 = GUINT64_SWAP_LE_BE(b); + if (res64 != b_expect) + return FAILED ("GUINT64_SWAP_LE_BE returned 0x%llx (had=0x%llx)", res64, b); + res16 = GUINT16_SWAP_LE_BE(c); + if (res16 != 0xcdab) + return FAILED ("GUINT16_SWAP_LE_BE returned 0x%x", (guint32) res16); + + return OK; +} + +/* + * test initialization + */ + +static Test endian_tests [] = { + {"swap", test_swap}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(endian_tests_init, endian_tests) + diff --git a/eglib/test/fake.c b/eglib/test/fake.c new file mode 100644 index 0000000000..c8d9af6116 --- /dev/null +++ b/eglib/test/fake.c @@ -0,0 +1,19 @@ +/* + * Fake test allows debugging of the driver itself + */ + +#include "test.h" + +RESULT +test_fake() +{ + return OK; +} + +static Test fake_tests [] = { + {"fake", test_fake}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(fake_tests_init, fake_tests) + diff --git a/eglib/test/file.c b/eglib/test/file.c new file mode 100644 index 0000000000..411c945296 --- /dev/null +++ b/eglib/test/file.c @@ -0,0 +1,228 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <stdio.h> +#include "test.h" + +#ifdef G_OS_WIN32 +#include <io.h> +#define close _close +#endif + +RESULT +test_file_get_contents () +{ + GError *error; + gchar *content; + gboolean ret; + gsize length; +#ifdef G_OS_WIN32 + const gchar *filename = "c:\\Windows\\system.ini"; +#else + const gchar *filename = "/etc/hosts"; +#endif + + /* + filename != NULL + ret = g_file_get_contents (NULL, NULL, NULL, NULL); + contents != NULL + ret = g_file_get_contents ("", NULL, NULL, NULL); + error no such file and fails for 'error' not being null too + ret = g_file_get_contents ("", &content, NULL, &error); + */ + + error = NULL; + ret = g_file_get_contents ("", &content, NULL, &error); + if (ret) + return FAILED ("HAH!"); + if (error == NULL) + return FAILED ("Got nothing as error."); + if (content != NULL) + return FAILED ("Content is uninitialized"); + + g_error_free (error); + error = NULL; + ret = g_file_get_contents (filename, &content, &length, &error); + if (!ret) + return FAILED ("The error is %d %s\n", error->code, error->message); + if (error != NULL) + return FAILED ("Got an error returning TRUE"); + if (content == NULL) + return FAILED ("Content is NULL"); + if (strlen (content) != length) + return FAILED ("length is %d but the string is %d", length, strlen (content)); + g_free (content); + + return OK; +} + +RESULT +test_open_tmp () +{ + GError *error; + gint fd; + gchar *name = GINT_TO_POINTER (-1); + + /* + * Okay, this works, but creates a .xxx file in /tmp on every run. Disabled. + * fd = g_file_open_tmp (NULL, NULL, NULL); + * if (fd < 0) + * return FAILED ("Default failed."); + * close (fd); + */ + error = NULL; + fd = g_file_open_tmp ("invalidtemplate", NULL, &error); + if (fd != -1) + return FAILED ("The template was invalid and accepted"); + if (error == NULL) + return FAILED ("No error returned."); + g_error_free (error); + + error = NULL; + fd = g_file_open_tmp ("i/nvalidtemplate", &name, &error); + if (fd != -1) + return FAILED ("The template was invalid and accepted"); + if (error == NULL) + return FAILED ("No error returned."); + if (name == NULL) + return FAILED ("'name' is not reset"); + g_error_free (error); + + error = NULL; + fd = g_file_open_tmp ("valid-XXXXXX", &name, &error); + if (fd == -1) + return FAILED ("This should be valid"); + if (error != NULL) + return FAILED ("No error returned."); + if (name == NULL) + return FAILED ("No name returned."); + close (fd); + unlink (name); + g_free (name); + return OK; +} + +RESULT +test_file () +{ + gboolean res; + const gchar *tmp; + gchar *path; + +#ifndef G_OS_WIN32 /* FIXME */ + gchar *sympath; + gint ignored; +#endif + + res = g_file_test (NULL, 0); + if (res) + return FAILED ("Should return FALSE HERE"); + + res = g_file_test ("file.c", 0); + if (res) + return FAILED ("Should return FALSE HERE"); + + tmp = g_get_tmp_dir (); + res = g_file_test (tmp, G_FILE_TEST_EXISTS); + if (!res) + return FAILED ("tmp does not exist."); + res = g_file_test (tmp, G_FILE_TEST_IS_REGULAR); + if (res) + return FAILED ("tmp is regular"); + + res = g_file_test (tmp, G_FILE_TEST_IS_DIR); + if (!res) + return FAILED ("tmp is not a directory"); + res = g_file_test (tmp, G_FILE_TEST_IS_EXECUTABLE); + if (!res) + return FAILED ("tmp is not a executable"); + + res = g_file_test (tmp, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_SYMLINK); + if (!res) + return FAILED ("2 tmp does not exist."); + res = g_file_test (tmp, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK); + if (res) + return FAILED ("2 tmp is regular"); + + res = g_file_test (tmp, G_FILE_TEST_IS_DIR | G_FILE_TEST_IS_SYMLINK); + if (!res) + return FAILED ("2 tmp is not a directory"); + res = g_file_test (tmp, G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_SYMLINK); + if (!res) + return FAILED ("2 tmp is not a executable"); + + close (g_file_open_tmp (NULL, &path, NULL)); /* create an empty file */ + res = g_file_test (path, G_FILE_TEST_EXISTS); + if (!res) + return FAILED ("3 %s should exist", path); + res = g_file_test (path, G_FILE_TEST_IS_REGULAR); + /* This is strange. Empty file is reported as not existing! */ + if (!res) + return FAILED ("3 %s IS_REGULAR", path); + res = g_file_test (path, G_FILE_TEST_IS_DIR); + if (res) + return FAILED ("3 %s should not be a directory", path); + res = g_file_test (path, G_FILE_TEST_IS_EXECUTABLE); + if (res) + return FAILED ("3 %s should not be executable", path); + res = g_file_test (path, G_FILE_TEST_IS_SYMLINK); + if (res) + return FAILED ("3 %s should not be a symlink", path); + +#ifndef G_OS_WIN32 /* FIXME */ + sympath = g_strconcat (path, "-link", NULL); + ignored = symlink (path, sympath); + res = g_file_test (sympath, G_FILE_TEST_EXISTS); + if (!res) + return FAILED ("4 %s should not exist", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_REGULAR); + if (!res) + return FAILED ("4 %s should not be a regular file", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_DIR); + if (res) + return FAILED ("4 %s should not be a directory", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_EXECUTABLE); + if (res) + return FAILED ("4 %s should not be executable", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_SYMLINK); + if (!res) + return FAILED ("4 %s should be a symlink", sympath); + + unlink (path); + + res = g_file_test (sympath, G_FILE_TEST_EXISTS); + if (res) + return FAILED ("5 %s should exist", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_REGULAR); + if (res) + return FAILED ("5 %s should be a regular file", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_DIR); + if (res) + return FAILED ("5 %s should not be a directory", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_EXECUTABLE); + if (res) + return FAILED ("5 %s should not be executable", sympath); + res = g_file_test (sympath, G_FILE_TEST_IS_SYMLINK); + if (!res) + return FAILED ("5 %s should be a symlink", sympath); + unlink (sympath); + g_free (sympath); +#endif + g_free (path); + return OK; +} + +static Test file_tests [] = { + {"g_file_get_contents", test_file_get_contents}, + {"g_file_open_tmp", test_open_tmp}, + {"g_file_test", test_file}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(file_tests_init, file_tests) + + diff --git a/eglib/test/hashtable.c b/eglib/test/hashtable.c new file mode 100644 index 0000000000..0b2f20ca5d --- /dev/null +++ b/eglib/test/hashtable.c @@ -0,0 +1,144 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + +int foreach_count = 0; +int foreach_fail = 0; + +void foreach (gpointer key, gpointer value, gpointer user_data) +{ + foreach_count++; + if (GPOINTER_TO_INT (user_data) != 'a') + foreach_fail = 1; +} + +RESULT hash_t1 (void) +{ + GHashTable *t = g_hash_table_new (g_str_hash, g_str_equal); + + foreach_count = 0; + foreach_fail = 0; + g_hash_table_insert (t, "hello", "world"); + g_hash_table_insert (t, "my", "god"); + + g_hash_table_foreach (t, foreach, GINT_TO_POINTER('a')); + if (foreach_count != 2) + return FAILED ("did not find all keys, got %d expected 2", foreach_count); + if (foreach_fail) + return FAILED("failed to pass the user-data to foreach"); + + if (!g_hash_table_remove (t, "my")) + return FAILED ("did not find known key"); + if (g_hash_table_size (t) != 1) + return FAILED ("unexpected size"); + g_hash_table_insert(t, "hello", "moon"); + if (strcmp (g_hash_table_lookup (t, "hello"), "moon") != 0) + return FAILED ("did not replace world with moon"); + + if (!g_hash_table_remove (t, "hello")) + return FAILED ("did not find known key"); + if (g_hash_table_size (t) != 0) + return FAILED ("unexpected size"); + g_hash_table_destroy (t); + + return OK; +} + +RESULT hash_t2 (void) +{ + return OK; +} + +RESULT hash_default (void) +{ + GHashTable *hash = g_hash_table_new (NULL, NULL); + + if (hash == NULL) + return FAILED ("g_hash_table_new should return a valid hash"); + + g_hash_table_destroy (hash); + return NULL; +} + +RESULT +hash_null_lookup (void) +{ + GHashTable *hash = g_hash_table_new (NULL, NULL); + gpointer ok, ov; + + g_hash_table_insert (hash, NULL, GINT_TO_POINTER (1)); + g_hash_table_insert (hash, GINT_TO_POINTER(1), GINT_TO_POINTER(2)); + + if (!g_hash_table_lookup_extended (hash, NULL, &ok, &ov)) + return FAILED ("Did not find the NULL"); + if (ok != NULL) + return FAILED ("Incorrect key found"); + if (ov != GINT_TO_POINTER (1)) + return FAILED ("Got wrong value %p\n", ov); + + if (!g_hash_table_lookup_extended (hash, GINT_TO_POINTER(1), &ok, &ov)) + return FAILED ("Did not find the 1"); + if (ok != GINT_TO_POINTER(1)) + return FAILED ("Incorrect key found"); + if (ov != GINT_TO_POINTER (2)) + return FAILED ("Got wrong value %p\n", ov); + + g_hash_table_destroy (hash); + + return NULL; +} + +static void +counter (gpointer key, gpointer value, gpointer user_data) +{ + int *counter = (int *) user_data; + + (*counter)++; +} + +RESULT hash_grow (void) +{ + GHashTable *hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + int i, count = 0; + + for (i = 0; i < 1000; i++) + g_hash_table_insert (hash, g_strdup_printf ("%d", i), g_strdup_printf ("x-%d", i)); + + for (i = 0; i < 1000; i++){ + char buffer [30]; + gpointer value; + + sprintf (buffer, "%d", i); + + value = g_hash_table_lookup (hash, buffer); + sprintf (buffer, "x-%d", i); + if (strcmp (value, buffer) != 0){ + return FAILED ("Failed to lookup the key %d, the value was %s\n", i, value); + } + } + + if (g_hash_table_size (hash) != 1000) + return FAILED ("Did not find 1000 elements on the hash, found %d\n", g_hash_table_size (hash)); + + /* Now do the manual count, lets not trust the internals */ + g_hash_table_foreach (hash, counter, &count); + if (count != 1000){ + return FAILED ("Foreach count is not 1000"); + } + + g_hash_table_destroy (hash); + return NULL; +} + +static Test hashtable_tests [] = { + {"t1", hash_t1}, + {"t2", hash_t2}, + {"grow", hash_grow}, + {"default", hash_default}, + {"null_lookup", hash_null_lookup}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(hashtable_tests_init, hashtable_tests) + diff --git a/eglib/test/list.c b/eglib/test/list.c new file mode 100644 index 0000000000..68dadee612 --- /dev/null +++ b/eglib/test/list.c @@ -0,0 +1,438 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + +RESULT +test_list_length () +{ + GList *list = g_list_prepend (NULL, "foo"); + + if (g_list_length (list) != 1) + return FAILED ("length failed. #1"); + + list = g_list_prepend (list, "bar"); + if (g_list_length (list) != 2) + return FAILED ("length failed. #2"); + + list = g_list_append (list, "bar"); + if (g_list_length (list) != 3) + return FAILED ("length failed. #3"); + + g_list_free (list); + return NULL; +} + +RESULT +test_list_nth () +{ + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + GList *nth, *list; + list = g_list_prepend (NULL, baz); + list = g_list_prepend (list, bar); + list = g_list_prepend (list, foo); + + nth = g_list_nth (list, 0); + if (nth->data != foo) + return FAILED ("nth failed. #0"); + + nth = g_list_nth (list, 1); + if (nth->data != bar) + return FAILED ("nth failed. #1"); + + nth = g_list_nth (list, 2); + if (nth->data != baz) + return FAILED ("nth failed. #2"); + + nth = g_list_nth (list, 3); + if (nth) + return FAILED ("nth failed. #3: %s", nth->data); + + g_list_free (list); + return OK; +} + +RESULT +test_list_index () +{ + int i; + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + GList *list; + list = g_list_prepend (NULL, baz); + list = g_list_prepend (list, bar); + list = g_list_prepend (list, foo); + + i = g_list_index (list, foo); + if (i != 0) + return FAILED ("index failed. #0: %d", i); + + i = g_list_index (list, bar); + if (i != 1) + return FAILED ("index failed. #1: %d", i); + + i = g_list_index (list, baz); + if (i != 2) + return FAILED ("index failed. #2: %d", i); + + g_list_free (list); + return OK; +} + +RESULT +test_list_append () +{ + GList *list = g_list_prepend (NULL, "first"); + if (g_list_length (list) != 1) + return FAILED ("Prepend failed"); + + list = g_list_append (list, "second"); + + if (g_list_length (list) != 2) + return FAILED ("Append failed"); + + g_list_free (list); + return OK; +} + +RESULT +test_list_last () +{ + GList *foo = g_list_prepend (NULL, "foo"); + GList *bar = g_list_prepend (NULL, "bar"); + GList *last; + + foo = g_list_concat (foo, bar); + last = g_list_last (foo); + + if (last != bar) + return FAILED ("last failed. #1"); + + foo = g_list_concat (foo, g_list_prepend (NULL, "baz")); + foo = g_list_concat (foo, g_list_prepend (NULL, "quux")); + + last = g_list_last (foo); + if (strcmp ("quux", last->data)) + return FAILED ("last failed. #2"); + + g_list_free (foo); + + return OK; +} + +RESULT +test_list_concat () +{ + GList *foo = g_list_prepend (NULL, "foo"); + GList *bar = g_list_prepend (NULL, "bar"); + GList *list = g_list_concat (foo, bar); + + if (g_list_length (list) != 2) + return FAILED ("Concat failed. #1"); + + if (strcmp (list->data, "foo")) + return FAILED ("Concat failed. #2"); + + if (strcmp (list->next->data, "bar")) + return FAILED ("Concat failed. #3"); + + if (g_list_first (list) != foo) + return FAILED ("Concat failed. #4"); + + if (g_list_last (list) != bar) + return FAILED ("Concat failed. #5"); + + g_list_free (list); + + return OK; +} + + +static gint +compare (gconstpointer a, gconstpointer b) +{ + char *foo = (char *) a; + char *bar = (char *) b; + + if (strlen (foo) < strlen (bar)) + return -1; + + return 1; +} + +RESULT +test_list_insert_sorted () +{ + GList *list = g_list_prepend (NULL, "a"); + list = g_list_append (list, "aaa"); + + /* insert at the middle */ + list = g_list_insert_sorted (list, "aa", compare); + if (strcmp ("aa", list->next->data)) + return FAILED ("insert_sorted failed. #1"); + + /* insert at the beginning */ + list = g_list_insert_sorted (list, "", compare); + if (strcmp ("", list->data)) + return FAILED ("insert_sorted failed. #2"); + + /* insert at the end */ + list = g_list_insert_sorted (list, "aaaa", compare); + if (strcmp ("aaaa", g_list_last (list)->data)) + return FAILED ("insert_sorted failed. #3"); + + g_list_free (list); + return OK; +} + +RESULT +test_list_copy () +{ + int i, length; + GList *list, *copy; + list = g_list_prepend (NULL, "a"); + list = g_list_append (list, "aa"); + list = g_list_append (list, "aaa"); + list = g_list_append (list, "aaaa"); + + length = g_list_length (list); + copy = g_list_copy (list); + + for (i = 0; i < length; i++) + if (strcmp (g_list_nth (list, i)->data, + g_list_nth (copy, i)->data)) + return FAILED ("copy failed."); + + g_list_free (list); + g_list_free (copy); + return OK; +} + +RESULT +test_list_reverse () +{ + guint i, length; + GList *list, *reverse; + list = g_list_prepend (NULL, "a"); + list = g_list_append (list, "aa"); + list = g_list_append (list, "aaa"); + list = g_list_append (list, "aaaa"); + + length = g_list_length (list); + reverse = g_list_reverse (g_list_copy (list)); + + if (g_list_length (reverse) != length) + return FAILED ("reverse failed #1"); + + for (i = 0; i < length; i++){ + guint j = length - i - 1; + if (strcmp (g_list_nth (list, i)->data, + g_list_nth (reverse, j)->data)) + return FAILED ("reverse failed. #2"); + } + + g_list_free (list); + g_list_free (reverse); + return OK; +} + +RESULT +test_list_remove () +{ + GList *list = g_list_prepend (NULL, "three"); + char *one = "one"; + list = g_list_prepend (list, "two"); + list = g_list_prepend (list, one); + + list = g_list_remove (list, one); + + if (g_list_length (list) != 2) + return FAILED ("Remove failed"); + + if (strcmp ("two", list->data) != 0) + return FAILED ("Remove failed"); + + g_list_free (list); + return OK; +} + +RESULT +test_list_remove_link () +{ + GList *foo = g_list_prepend (NULL, "a"); + GList *bar = g_list_prepend (NULL, "b"); + GList *baz = g_list_prepend (NULL, "c"); + GList *list = foo; + + foo = g_list_concat (foo, bar); + foo = g_list_concat (foo, baz); + + list = g_list_remove_link (list, bar); + + if (g_list_length (list) != 2) + return FAILED ("remove_link failed #1"); + + if (bar->next != NULL) + return FAILED ("remove_link failed #2"); + + g_list_free (list); + g_list_free (bar); + return OK; +} + +RESULT +test_list_insert_before () +{ + GList *foo, *bar, *baz; + + foo = g_list_prepend (NULL, "foo"); + foo = g_list_insert_before (foo, NULL, "bar"); + bar = g_list_last (foo); + + if (strcmp (bar->data, "bar")) + return FAILED ("1"); + + baz = g_list_insert_before (foo, bar, "baz"); + if (foo != baz) + return FAILED ("2"); + + if (strcmp (g_list_nth_data (foo, 1), "baz")) + return FAILED ("3: %s", g_list_nth_data (foo, 1)); + + g_list_free (foo); + return OK; +} + +#define N_ELEMS 101 + +static int intcompare (gconstpointer p1, gconstpointer p2) +{ + return GPOINTER_TO_INT (p1) - GPOINTER_TO_INT (p2); +} + +static gboolean verify_sort (GList *list, int len) +{ + int prev; + + if (list->prev) + return FALSE; + + prev = GPOINTER_TO_INT (list->data); + len--; + for (list = list->next; list; list = list->next) { + int curr = GPOINTER_TO_INT (list->data); + if (prev > curr) + return FALSE; + prev = curr; + + if (!list->prev || list->prev->next != list) + return FALSE; + + if (len == 0) + return FALSE; + len--; + } + return len == 0; +} + +RESULT +test_list_sort () +{ + int i, j, mul; + GList *list = NULL; + + for (i = 0; i < N_ELEMS; ++i) + list = g_list_prepend (list, GINT_TO_POINTER (i)); + list = g_list_sort (list, intcompare); + if (!verify_sort (list, N_ELEMS)) + return FAILED ("decreasing list"); + + g_list_free (list); + + list = NULL; + for (i = 0; i < N_ELEMS; ++i) + list = g_list_prepend (list, GINT_TO_POINTER (-i)); + list = g_list_sort (list, intcompare); + if (!verify_sort (list, N_ELEMS)) + return FAILED ("increasing list"); + + g_list_free (list); + + list = g_list_prepend (NULL, GINT_TO_POINTER (0)); + for (i = 1; i < N_ELEMS; ++i) { + list = g_list_prepend (list, GINT_TO_POINTER (i)); + list = g_list_prepend (list, GINT_TO_POINTER (-i)); + } + list = g_list_sort (list, intcompare); + if (!verify_sort (list, 2*N_ELEMS-1)) + return FAILED ("alternating list"); + + g_list_free (list); + + list = NULL; + mul = 1; + for (i = 1; i < N_ELEMS; ++i) { + mul = -mul; + for (j = 0; j < i; ++j) + list = g_list_prepend (list, GINT_TO_POINTER (mul * j)); + } + list = g_list_sort (list, intcompare); + if (!verify_sort (list, (N_ELEMS*N_ELEMS - N_ELEMS)/2)) + return FAILED ("wavering list"); + + g_list_free (list); + + return OK; +} + +static gint +find_custom (gconstpointer a, gconstpointer b) +{ + return(strcmp (a, b)); +} + +RESULT +test_list_find_custom () +{ + GList *list = NULL, *found; + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + + list = g_list_prepend (list, baz); + list = g_list_prepend (list, bar); + list = g_list_prepend (list, foo); + + found = g_list_find_custom (list, baz, find_custom); + + if (found == NULL) + return FAILED ("Find failed"); + + g_list_free (list); + + return OK; +} + +static Test list_tests [] = { + { "length", test_list_length}, + { "nth", test_list_nth}, + { "index", test_list_index}, + { "last", test_list_last}, + { "append", test_list_append}, + { "concat", test_list_concat}, + {"insert_sorted", test_list_insert_sorted}, + {"insert_before", test_list_insert_before}, + { "copy", test_list_copy}, + { "reverse", test_list_reverse}, + { "remove", test_list_remove}, + { "remove_link", test_list_remove_link}, + { "remove_link", test_list_remove_link}, + { "sort", test_list_sort}, + { "find_custom", test_list_find_custom}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(list_tests_init, list_tests) diff --git a/eglib/test/markup.c b/eglib/test/markup.c new file mode 100644 index 0000000000..cf8d3f2d57 --- /dev/null +++ b/eglib/test/markup.c @@ -0,0 +1,234 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + +#define do_bad_test(s) do { char *r = markup_test (s); if (r == NULL) return FAILED ("Failed on test " # s); else g_free (r); } while (0) +#define do_ok_test(s) do { char *r = markup_test (s); if (r != NULL) return FAILED ("Could not parse valid " # s); } while (0) + +static char * +markup_test (const char *s) +{ + GMarkupParser *parser = g_new0 (GMarkupParser, 1); + GMarkupParseContext *context; + GError *error = NULL; + + context = g_markup_parse_context_new (parser, 0, 0, 0); + + g_markup_parse_context_parse (context, s, strlen (s), &error); + g_markup_parse_context_free (context); + + if (error != NULL){ + char *msg = g_strdup (error->message); + g_error_free (error); + + g_free (parser); + return msg; + } + g_free (parser); + return NULL; +} + +RESULT +invalid_documents (void) +{ + /* These should fail */ + do_bad_test ("<1>"); + do_bad_test ("<a<"); + do_bad_test ("</a>"); + do_bad_test ("<a b>"); + do_bad_test ("<a b=>"); + do_bad_test ("<a b=c>"); + + return OK; +} + +RESULT +valid_documents (void) +{ + /* These should fail */ + do_ok_test ("<a>"); + do_ok_test ("<a a=\"b\">"); + + return OK; +} + +/* + * This is a test for the kind of files that the code in mono/domain.c + * parses; This code comes from Mono + */ +typedef struct { + GSList *supported_runtimes; + char *required_runtime; + int configuration_count; + int startup_count; +} AppConfigInfo; + +static char * +get_attribute_value (const gchar **attribute_names, + const gchar **attribute_values, + const char *att_name) +{ + int n; + for (n=0; attribute_names[n] != NULL; n++) { + if (strcmp (attribute_names[n], att_name) == 0) + return g_strdup (attribute_values[n]); + } + return NULL; +} + +static void +start_element (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error) +{ + AppConfigInfo* app_config = (AppConfigInfo*) user_data; + + if (strcmp (element_name, "configuration") == 0) { + app_config->configuration_count++; + return; + } + if (strcmp (element_name, "startup") == 0) { + app_config->startup_count++; + return; + } + + if (app_config->configuration_count != 1 || app_config->startup_count != 1) + return; + + if (strcmp (element_name, "requiredRuntime") == 0) { + app_config->required_runtime = get_attribute_value (attribute_names, attribute_values, "version"); + } else if (strcmp (element_name, "supportedRuntime") == 0) { + char *version = get_attribute_value (attribute_names, attribute_values, "version"); + app_config->supported_runtimes = g_slist_append (app_config->supported_runtimes, version); + } +} + +static void +end_element (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error) +{ + AppConfigInfo* app_config = (AppConfigInfo*) user_data; + + if (strcmp (element_name, "configuration") == 0) { + app_config->configuration_count--; + } else if (strcmp (element_name, "startup") == 0) { + app_config->startup_count--; + } +} + +static const GMarkupParser +mono_parser = { + start_element, + end_element, + NULL, + NULL, + NULL +}; + +AppConfigInfo * +domain_test (char *text) +{ + AppConfigInfo *app_config = g_new0 (AppConfigInfo, 1); + GMarkupParseContext *context; + + context = g_markup_parse_context_new (&mono_parser, 0, app_config, NULL); + if (g_markup_parse_context_parse (context, text, strlen (text), NULL)) { + g_markup_parse_context_end_parse (context, NULL); + } + g_markup_parse_context_free (context); + + return app_config; +} + +void +domain_free (AppConfigInfo *info) +{ + GSList *l; + if (info->required_runtime) + g_free (info->required_runtime); + for (l = info->supported_runtimes; l != NULL; l = l->next){ + g_free (l->data); + } + g_slist_free (info->supported_runtimes); + g_free (info); +} + +RESULT +mono_domain (void) +{ + AppConfigInfo *info; + + info = domain_test ("<configuration><!--hello--><startup><!--world--><requiredRuntime version=\"v1\"><!--r--></requiredRuntime></startup></configuration>"); + if (info->required_runtime == NULL) + return FAILED ("No required runtime section"); + if (strcmp (info->required_runtime, "v1") != 0) + return FAILED ("Got a runtime version %s, expected v1", info->required_runtime); + domain_free (info); + + info = domain_test ("<configuration><startup><requiredRuntime version=\"v1\"/><!--comment--></configuration><!--end-->"); + if (info->required_runtime == NULL) + return FAILED ("No required runtime section on auto-close section"); + if (strcmp (info->required_runtime, "v1") != 0) + return FAILED ("Got a runtime version %s, expected v1", info->required_runtime); + domain_free (info); + + info = domain_test ("<!--start--><configuration><startup><supportedRuntime version=\"v1\"/><!--middle--><supportedRuntime version=\"v2\"/></startup></configuration>"); + if ((strcmp ((char*)info->supported_runtimes->data, "v1") == 0)){ + if (info->supported_runtimes->next == NULL) + return FAILED ("Expected 2 supported runtimes"); + + if ((strcmp ((char*)info->supported_runtimes->next->data, "v2") != 0)) + return FAILED ("Expected v1, v2, got %s", info->supported_runtimes->next->data); + if (info->supported_runtimes->next->next != NULL) + return FAILED ("Expected v1, v2, got more"); + } else + return FAILED ("Expected `v1', got %s", info->supported_runtimes->data); + domain_free (info); + + return NULL; +} + +RESULT +mcs_config (void) +{ + return markup_test ("<configuration>\r\n <system.diagnostics>\r\n <trace autoflush=\"true\" indentsize=\"4\">\r\n <listeners>\r\n <add name=\"compilerLogListener\" type=\"System.Diagnostics.TextWriterTraceListener,System\"/> </listeners> </trace> </system.diagnostics> </configuration>"); + +} + +RESULT +xml_parse (void) +{ + return markup_test ("<?xml version=\"1.0\" encoding=\"utf-8\"?><a></a>"); +} + +RESULT +machine_config (void) +{ + char *data; + gsize size; + + if (g_file_get_contents ("../../data/net_1_1/machine.config", &data, &size, NULL)){ + return markup_test (data); + } + printf ("Ignoring this test\n"); + return NULL; +} + +static Test markup_tests [] = { + {"invalid_documents", invalid_documents}, + {"good_documents", valid_documents}, + {"mono_domain", mono_domain}, + {"mcs_config", mcs_config}, + {"xml_parse", xml_parse}, + {"machine_config", machine_config}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(markup_tests_init, markup_tests) + diff --git a/eglib/test/memory.c b/eglib/test/memory.c new file mode 100644 index 0000000000..db7db08091 --- /dev/null +++ b/eglib/test/memory.c @@ -0,0 +1,40 @@ + +#include <glib.h> +#include "test.h" + +RESULT +test_memory_zero_size_allocations () +{ + gpointer p; + + p = g_malloc (0); + if (p) + return FAILED ("Calling g_malloc with size zero should return NULL."); + + p = g_malloc0 (0); + if (p) + return FAILED ("Calling g_malloc0 with size zero should return NULL."); + + p = g_realloc (NULL, 0); + if (p) + return FAILED ("Calling g_realloc with size zero should return NULL."); + + p = g_new (int, 0); + if (p) + return FAILED ("Calling g_new with size zero should return NULL."); + + p = g_new0 (int, 0); + if (p) + return FAILED ("Calling g_new0 with size zero should return NULL."); + + return OK; +} + + +static Test memory_tests [] = { + { "zero_size_allocations", test_memory_zero_size_allocations}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(memory_tests_init, memory_tests) + diff --git a/eglib/test/module.c b/eglib/test/module.c new file mode 100644 index 0000000000..a28363785f --- /dev/null +++ b/eglib/test/module.c @@ -0,0 +1,64 @@ +#include <config.h> +#include <glib.h> +#include <gmodule.h> +#include <string.h> +#include <stdio.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include "test.h" + +#if defined (G_OS_WIN32) +#define EXTERNAL_SYMBOL "GetProcAddress" +#else +#define EXTERNAL_SYMBOL "system" +#endif + +void G_MODULE_EXPORT +dummy_test_export () +{ +} + +/* test for g_module_open (NULL, ...) */ +RESULT +test_module_symbol_null () +{ + gpointer proc = GINT_TO_POINTER (42); + + GModule *m = g_module_open (NULL, G_MODULE_BIND_LAZY); + + if (m == NULL) + return FAILED ("bind to main module failed. #0"); + + if (g_module_symbol (m, "__unlikely_\nexistent__", &proc)) + return FAILED ("non-existent symbol lookup failed. #1"); + + if (proc) + return FAILED ("non-existent symbol lookup failed. #2"); + + if (!g_module_symbol (m, EXTERNAL_SYMBOL, &proc)) + return FAILED ("external lookup failed. #3"); + + if (!proc) + return FAILED ("external lookup failed. #4"); + + if (!g_module_symbol (m, "dummy_test_export", &proc)) + return FAILED ("in-proc lookup failed. #5"); + + if (!proc) + return FAILED ("in-proc lookup failed. #6"); + + if (!g_module_close (m)) + return FAILED ("close failed. #7"); + + return OK; +} + +static Test module_tests [] = { + {"g_module_symbol_null", test_module_symbol_null}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(module_tests_init, module_tests) + + diff --git a/eglib/test/path.c b/eglib/test/path.c new file mode 100644 index 0000000000..aaf5685d75 --- /dev/null +++ b/eglib/test/path.c @@ -0,0 +1,329 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdio.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef G_OS_UNIX +#include <pthread.h> +#endif +#include "test.h" + +#ifdef G_OS_WIN32 +#include <direct.h> +#define chdir _chdir +#endif + +/* This test is just to be used with valgrind */ +RESULT +test_buildpath () +{ + char *s; + + s = g_build_path ("/", "hola///", "//mundo", NULL); + if (strcmp (s, "hola/mundo") != 0) + return FAILED ("1 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("/", "hola/", "/mundo", NULL); + if (strcmp (s, "hola/mundo") != 0) + return FAILED ("2 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("/", "hola/", "mundo", NULL); + if (strcmp (s, "hola/mundo") != 0) + return FAILED ("3 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("/", "hola", "/mundo", NULL); + if (strcmp (s, "hola/mundo") != 0) + return FAILED ("4 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("/", "/hello", "world/", NULL); + if (strcmp (s, "/hello/world/") != 0) + return FAILED ("5 Got wrong result, got: %s", s); + g_free (s); + + /* Now test multi-char-separators */ + s = g_build_path ("**", "hello", "world", NULL); + if (strcmp (s, "hello**world") != 0) + return FAILED ("6 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("**", "hello**", "world", NULL); + if (strcmp (s, "hello**world") != 0) + return FAILED ("7 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("**", "hello**", "**world", NULL); + if (strcmp (s, "hello**world") != 0) + return FAILED ("8 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("**", "hello**", "**world", NULL); + if (strcmp (s, "hello**world") != 0) + return FAILED ("9 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("1234567890", "hello", "world", NULL); + if (strcmp (s, "hello1234567890world") != 0) + return FAILED ("10 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("1234567890", "hello1234567890", "1234567890world", NULL); + if (strcmp (s, "hello1234567890world") != 0) + return FAILED ("11 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("1234567890", "hello12345678901234567890", "1234567890world", NULL); + if (strcmp (s, "hello1234567890world") != 0) + return FAILED ("12 Got wrong result, got: %s", s); + g_free (s); + + /* Multiple */ + s = g_build_path ("/", "a", "b", "c", "d", NULL); + if (strcmp (s, "a/b/c/d") != 0) + return FAILED ("13 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_path ("/", "/a", "", "/c/", NULL); + if (strcmp (s, "/a/c/") != 0) + return FAILED ("14 Got wrong result, got: %s", s); + g_free (s); + + /* Null */ + s = g_build_path ("/", NULL, NULL); + if (s == NULL) + return FAILED ("must get a non-NULL return"); + if (s [0] != 0) + return FAILED ("must get an empty string"); + g_free (s); + return OK; +} + +RESULT +test_buildfname () +{ + char *s; + + s = g_build_filename ("a", "b", "c", "d", NULL); +#ifdef G_OS_WIN32 + if (strcmp (s, "a\\b\\c\\d") != 0) +#else + if (strcmp (s, "a/b/c/d") != 0) +#endif + return FAILED ("1 Got wrong result, got: %s", s); + g_free (s); + + s = g_build_filename ("/", "a", NULL); +#ifdef G_OS_WIN32 + if (strcmp (s, "\\a") != 0) +#else + if (strcmp (s, "/a") != 0) +#endif + return FAILED ("1 Got wrong result, got: %s", s); + +#ifndef OS_WIN32 + s = g_build_filename ("/", "foo", "/bar", "tolo/", "/meo/", NULL); + if (strcmp (s, "/foo/bar/tolo/meo/") != 0) + return FAILED ("1 Got wrong result, got: %s", s); +#endif + + return OK; +} + +char * +test_dirname () +{ + char *s; + +#ifdef G_OS_WIN32 + s = g_path_get_dirname ("c:\\home\\miguel"); + if (strcmp (s, "c:\\home") != 0) + return FAILED ("Expected c:\\home, got %s", s); + g_free (s); + + s = g_path_get_dirname ("c:\\home\\dingus\\"); + if (strcmp (s, "c:\\home\\dingus") != 0) + return FAILED ("Expected c:\\home\\dingus, got %s", s); + g_free (s); + + s = g_path_get_dirname ("dir.c"); + if (strcmp (s, ".") != 0) + return FAILED ("Expected `.', got %s", s); + g_free (s); + + s = g_path_get_dirname ("c:\\index.html"); + if (strcmp (s, "c:") != 0) + return FAILED ("Expected [c:], got [%s]", s); +#else + s = g_path_get_dirname ("/home/miguel"); + if (strcmp (s, "/home") != 0) + return FAILED ("Expected /home, got %s", s); + g_free (s); + + s = g_path_get_dirname ("/home/dingus/"); + if (strcmp (s, "/home/dingus") != 0) + return FAILED ("Expected /home/dingus, got %s", s); + g_free (s); + + s = g_path_get_dirname ("dir.c"); + if (strcmp (s, ".") != 0) + return FAILED ("Expected `.', got %s", s); + g_free (s); + + s = g_path_get_dirname ("/index.html"); + if (strcmp (s, "/") != 0) + return FAILED ("Expected [/], got [%s]", s); +#endif + return OK; +} + +char * +test_basename () +{ + char *s; + +#ifdef G_OS_WIN32 + s = g_path_get_basename (""); + if (strcmp (s, ".") != 0) + return FAILED ("Expected `.', got %s", s); + g_free (s); + + s = g_path_get_basename ("c:\\home\\dingus\\"); + if (strcmp (s, "dingus") != 0) + return FAILED ("1 Expected dingus, got %s", s); + g_free (s); + + s = g_path_get_basename ("c:\\home\\dingus"); + if (strcmp (s, "dingus") != 0) + return FAILED ("2 Expected dingus, got %s", s); + g_free (s); +#else + s = g_path_get_basename (""); + if (strcmp (s, ".") != 0) + return FAILED ("Expected `.', got %s", s); + g_free (s); + + s = g_path_get_basename ("/home/dingus/"); + if (strcmp (s, "dingus") != 0) + return FAILED ("1 Expected dingus, got %s", s); + g_free (s); + + s = g_path_get_basename ("/home/dingus"); + if (strcmp (s, "dingus") != 0) + return FAILED ("2 Expected dingus, got %s", s); + g_free (s); +#endif + return OK; +} + +gchar * +test_ppath () +{ + char *s; +#ifdef G_OS_WIN32 + const gchar *searchfor = "explorer.exe"; +#else + const gchar *searchfor = "ls"; +#endif + s = g_find_program_in_path (searchfor); + if (s == NULL) + return FAILED ("No %s on this system?", searchfor); + g_free (s); + return OK; +} + +gchar * +test_ppath2 () +{ + char *s; + const char *path = g_getenv ("PATH"); +#ifdef G_OS_WIN32 + const gchar *searchfor = "test_eglib.exe"; +#else + const gchar *searchfor = "test-glib"; +#endif + + g_setenv ("PATH", "", TRUE); + s = g_find_program_in_path ("ls"); + if (s != NULL) { + g_setenv ("PATH", path, TRUE); + return FAILED ("Found something interesting here: %s", s); + } + g_free (s); + s = g_find_program_in_path (searchfor); + if (s == NULL) { + g_setenv ("PATH", path, TRUE); + return FAILED ("It should find '%s' in the current directory.", searchfor); + } + g_free (s); + g_setenv ("PATH", path, TRUE); + return OK; +} + +#ifndef DISABLE_FILESYSTEM_TESTS +gchar * +test_cwd () +{ + char *dir = g_get_current_dir (); +#ifdef G_OS_WIN32 + const gchar *newdir = "C:\\Windows"; +#else + const gchar *newdir = "/bin"; +#endif + + if (dir == NULL) + return FAILED ("No current directory?"); + g_free (dir); + + if (chdir (newdir) == -1) + return FAILED ("No %s?", newdir); + + dir = g_get_current_dir (); + if (strcmp (dir, newdir) != 0) + return FAILED("Did not go to %s?", newdir); + g_free (dir); + + return OK; +} +#else +gchar * +test_cwd () +{ + return OK; +} +#endif + +gchar * +test_misc () +{ + const char *home = g_get_home_dir (); + const char *tmp = g_get_tmp_dir (); + + if (home == NULL) + return FAILED ("Where did my home go?"); + + if (tmp == NULL) + return FAILED ("Where did my /tmp go?"); + + return OK; +} + +static Test path_tests [] = { + {"g_build_filename", test_buildfname}, + {"g_buildpath", test_buildpath}, + {"g_path_get_dirname", test_dirname}, + {"g_path_get_basename", test_basename}, + {"g_find_program_in_path", test_ppath}, + {"g_find_program_in_path2", test_ppath2}, + {"test_cwd", test_cwd }, + {"test_misc", test_misc }, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(path_tests_init, path_tests) + + diff --git a/eglib/test/pattern.c b/eglib/test/pattern.c new file mode 100644 index 0000000000..7db5a7be3d --- /dev/null +++ b/eglib/test/pattern.c @@ -0,0 +1,61 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <stdio.h> +#include "test.h" + +#define MATCH(pat,string,error_if,msg) \ + spec = g_pattern_spec_new (pat); \ + res = g_pattern_match_string (spec, string); \ + if (res == error_if) \ + return FAILED (msg " returned %s", res ? "TRUE" : "FALSE"); \ + g_pattern_spec_free (spec); + +#define TEST_MATCH(pat,string,n) MATCH (pat, string, FALSE, "MATCH " #n) +#define TEST_NO_MATCH(pat,string,n) MATCH (pat, string,TRUE, "NO_MATCH " #n) + +RESULT +test_pattern_spec () +{ + GPatternSpec *spec; + gboolean res; + + /* spec = g_pattern_spec_new (NULL); */ + TEST_MATCH ("*", "hola", 1); + TEST_MATCH ("hola", "hola", 2); + TEST_MATCH ("????", "hola", 3); + TEST_MATCH ("???a", "hola", 4); + TEST_MATCH ("h??a", "hola", 5); + TEST_MATCH ("h??*", "hola", 6); + TEST_MATCH ("h*", "hola", 7); + TEST_MATCH ("*hola", "hola", 8); + TEST_MATCH ("*l*", "hola", 9); + TEST_MATCH ("h*??", "hola", 10); + TEST_MATCH ("h*???", "hola", 11); + TEST_MATCH ("?o??", "hola", 12); + TEST_MATCH ("*h*o*l*a*", "hola", 13); + TEST_MATCH ("h*o*l*a", "hola", 14); + TEST_MATCH ("h?*?", "hola", 15); + + TEST_NO_MATCH ("", "hola", 1); + TEST_NO_MATCH ("?????", "hola", 2); + TEST_NO_MATCH ("???", "hola", 3); + TEST_NO_MATCH ("*o", "hola", 4); + TEST_NO_MATCH ("h", "hola", 5); + TEST_NO_MATCH ("h*????", "hola", 6); + + return OK; +} + +static Test pattern_tests [] = { + {"g_pattern_spec*", test_pattern_spec}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(pattern_tests_init, pattern_tests) + + diff --git a/eglib/test/ptrarray.c b/eglib/test/ptrarray.c new file mode 100644 index 0000000000..a823dd7655 --- /dev/null +++ b/eglib/test/ptrarray.c @@ -0,0 +1,311 @@ +#include <stdio.h> +#include <glib.h> +#include "test.h" + +/* Redefine the private structure only to verify proper allocations */ +typedef struct _GPtrArrayPriv { + gpointer *pdata; + guint len; + guint size; +} GPtrArrayPriv; + +/* Don't add more than 32 items to this please */ +static const char *items [] = { + "Apples", "Oranges", "Plumbs", "Goats", "Snorps", "Grapes", + "Tickle", "Place", "Coffee", "Cookies", "Cake", "Cheese", + "Tseng", "Holiday", "Avenue", "Smashing", "Water", "Toilet", + NULL +}; + +static GPtrArray *ptrarray_alloc_and_fill(guint *item_count) +{ + GPtrArray *array = g_ptr_array_new(); + gint i; + + for(i = 0; items[i] != NULL; i++) { + g_ptr_array_add(array, (gpointer)items[i]); + } + + if(item_count != NULL) { + *item_count = i; + } + + return array; +} + +static guint guess_size(guint length) +{ + guint size = 1; + + while(size < length) { + size <<= 1; + } + + return size; +} + +RESULT ptrarray_alloc() +{ + GPtrArrayPriv *array; + guint i; + + array = (GPtrArrayPriv *)ptrarray_alloc_and_fill(&i); + + if(array->size != guess_size(array->len)) { + return FAILED("Size should be %d, but it is %d", + guess_size(array->len), array->size); + } + + if(array->len != i) { + return FAILED("Expected %d node(s) in the array", i); + } + + g_ptr_array_free((GPtrArray *)array, TRUE); + + return OK; +} + +RESULT ptrarray_for_iterate() +{ + GPtrArray *array = ptrarray_alloc_and_fill(NULL); + guint i; + + for(i = 0; i < array->len; i++) { + char *item = (char *)g_ptr_array_index(array, i); + if(item != items[i]) { + return FAILED( + "Expected item at %d to be %s, but it was %s", + i, items[i], item); + } + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +static gint foreach_iterate_index = 0; +static char *foreach_iterate_error = NULL; + +void foreach_callback(gpointer data, gpointer user_data) +{ + char *item = (char *)data; + const char *item_cmp = items[foreach_iterate_index++]; + + if(foreach_iterate_error != NULL) { + return; + } + + if(item != item_cmp) { + foreach_iterate_error = FAILED( + "Expected item at %d to be %s, but it was %s", + foreach_iterate_index - 1, item_cmp, item); + } +} + +RESULT ptrarray_foreach_iterate() +{ + GPtrArray *array = ptrarray_alloc_and_fill(NULL); + + foreach_iterate_index = 0; + foreach_iterate_error = NULL; + + g_ptr_array_foreach(array, foreach_callback, array); + + g_ptr_array_free(array, TRUE); + + return foreach_iterate_error; +} + +RESULT ptrarray_set_size() +{ + GPtrArray *array = g_ptr_array_new(); + guint i, grow_length = 50; + + g_ptr_array_add(array, (gpointer)items[0]); + g_ptr_array_add(array, (gpointer)items[1]); + g_ptr_array_set_size(array, grow_length); + + if(array->len != grow_length) { + return FAILED("Array length should be 50, it is %d", array->len); + } else if(array->pdata[0] != items[0]) { + return FAILED("Item 0 was overwritten, should be %s", items[0]); + } else if(array->pdata[1] != items[1]) { + return FAILED("Item 1 was overwritten, should be %s", items[1]); + } + + for(i = 2; i < array->len; i++) { + if(array->pdata[i] != NULL) { + return FAILED("Item %d is not NULL, it is %p", i, array->pdata[i]); + } + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +RESULT ptrarray_remove_index() +{ + GPtrArray *array; + guint i; + + array = ptrarray_alloc_and_fill(&i); + + g_ptr_array_remove_index(array, 0); + if(array->pdata[0] != items[1]) { + return FAILED("First item is not %s, it is %s", items[1], + array->pdata[0]); + } + + g_ptr_array_remove_index(array, array->len - 1); + + if(array->pdata[array->len - 1] != items[array->len]) { + return FAILED("Last item is not %s, it is %s", + items[array->len - 2], array->pdata[array->len - 1]); + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +RESULT ptrarray_remove_index_fast() +{ + GPtrArray *array; + guint i; + + array = ptrarray_alloc_and_fill(&i); + + g_ptr_array_remove_index_fast(array, 0); + if(array->pdata[0] != items[array->len]) { + return FAILED("First item is not %s, it is %s", items[array->len], + array->pdata[0]); + } + + g_ptr_array_remove_index_fast(array, array->len - 1); + if(array->pdata[array->len - 1] != items[array->len - 1]) { + return FAILED("Last item is not %s, it is %s", + items[array->len - 1], array->pdata[array->len - 1]); + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +RESULT ptrarray_remove() +{ + GPtrArray *array; + guint i; + + array = ptrarray_alloc_and_fill(&i); + + g_ptr_array_remove(array, (gpointer)items[7]); + + if(!g_ptr_array_remove(array, (gpointer)items[4])) { + return FAILED("Item %s not removed", items[4]); + } + + if(g_ptr_array_remove(array, (gpointer)items[4])) { + return FAILED("Item %s still in array after removal", items[4]); + } + + if(array->pdata[array->len - 1] != items[array->len + 1]) { + return FAILED("Last item in GPtrArray not correct"); + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +static gint ptrarray_sort_compare(gconstpointer a, gconstpointer b) +{ + gchar *stra = *(gchar **) a; + gchar *strb = *(gchar **) b; + return strcmp(stra, strb); +} + +RESULT ptrarray_sort() +{ + GPtrArray *array = g_ptr_array_new(); + guint i; + gchar *letters [] = { "A", "B", "C", "D", "E" }; + + g_ptr_array_add(array, letters[0]); + g_ptr_array_add(array, letters[1]); + g_ptr_array_add(array, letters[2]); + g_ptr_array_add(array, letters[3]); + g_ptr_array_add(array, letters[4]); + + g_ptr_array_sort(array, ptrarray_sort_compare); + + for(i = 0; i < array->len; i++) { + if(array->pdata[i] != letters[i]) { + return FAILED("Array out of order, expected %s got %s", + (gchar *)array->pdata[i], letters[i]); + } + } + + g_ptr_array_free(array, TRUE); + + return OK; +} + +RESULT ptrarray_remove_fast() +{ + GPtrArray *array = g_ptr_array_new(); + gchar *letters [] = { "A", "B", "C", "D", "E" }; + + if (g_ptr_array_remove_fast (array, NULL)) + return FAILED ("Removing NULL succeeded"); + + g_ptr_array_add(array, letters[0]); + if (!g_ptr_array_remove_fast (array, letters[0]) || array->len != 0) + return FAILED ("Removing last element failed"); + + g_ptr_array_add(array, letters[0]); + g_ptr_array_add(array, letters[1]); + g_ptr_array_add(array, letters[2]); + g_ptr_array_add(array, letters[3]); + g_ptr_array_add(array, letters[4]); + + if (!g_ptr_array_remove_fast (array, letters[0]) || array->len != 4) + return FAILED ("Removing first element failed"); + + if (array->pdata [0] != letters [4]) + return FAILED ("First element wasn't replaced with last upon removal"); + + if (g_ptr_array_remove_fast (array, letters[0])) + return FAILED ("Succedeed removing a non-existing element"); + + if (!g_ptr_array_remove_fast (array, letters[3]) || array->len != 3) + return FAILED ("Failed removing \"D\""); + + if (!g_ptr_array_remove_fast (array, letters[1]) || array->len != 2) + return FAILED ("Failed removing \"B\""); + + if (array->pdata [0] != letters [4] || array->pdata [1] != letters [2]) + return FAILED ("Last two elements are wrong"); + g_ptr_array_free(array, TRUE); + + return OK; +} + +static Test ptrarray_tests [] = { + {"alloc", ptrarray_alloc}, + {"for_iterate", ptrarray_for_iterate}, + {"foreach_iterate", ptrarray_foreach_iterate}, + {"set_size", ptrarray_set_size}, + {"remove_index", ptrarray_remove_index}, + {"remove_index_fast", ptrarray_remove_index_fast}, + {"remove", ptrarray_remove}, + {"sort", ptrarray_sort}, + {"remove_fast", ptrarray_remove_fast}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(ptrarray_tests_init, ptrarray_tests) + + diff --git a/eglib/test/queue.c b/eglib/test/queue.c new file mode 100644 index 0000000000..b12ddec13d --- /dev/null +++ b/eglib/test/queue.c @@ -0,0 +1,184 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + +RESULT +test_queue_push () +{ + GQueue *queue = g_queue_new (); + + g_queue_push_head (queue, "foo"); + g_queue_push_head (queue, "bar"); + g_queue_push_head (queue, "baz"); + + if (queue->length != 3) + return FAILED ("push failed"); + + if (NULL != queue->head->prev) + return FAILED ("HEAD: prev is wrong"); + if (strcmp ("baz", queue->head->data)) + return FAILED ("HEAD: First element is wrong"); + if (strcmp ("bar", queue->head->next->data)) + return FAILED ("HEAD: Second element is wrong"); + if (strcmp ("foo", queue->head->next->next->data)) + return FAILED ("HEAD: Third element is wrong"); + if (NULL != queue->head->next->next->next) + return FAILED ("HEAD: End is wrong"); + + if (NULL != queue->tail->next) + return FAILED ("TAIL: next is wrong"); + if (strcmp ("foo", queue->tail->data)) + return FAILED ("TAIL: Third element is wrong"); + if (strcmp ("bar", queue->tail->prev->data)) + return FAILED ("TAIL: Second element is wrong"); + if (strcmp ("baz", queue->tail->prev->prev->data)) + return FAILED ("TAIL: First element is wrong"); + if (NULL != queue->tail->prev->prev->prev) + return FAILED ("TAIL: End is wrong"); + + g_queue_free (queue); + return OK; +} + +RESULT +test_queue_push_tail () +{ + GQueue *queue = g_queue_new (); + + g_queue_push_tail (queue, "baz"); + g_queue_push_tail (queue, "bar"); + g_queue_push_tail (queue, "foo"); + + if (queue->length != 3) + return FAILED ("push failed"); + + if (NULL != queue->head->prev) + return FAILED ("HEAD: prev is wrong"); + if (strcmp ("baz", queue->head->data)) + return FAILED ("HEAD: First element is wrong"); + if (strcmp ("bar", queue->head->next->data)) + return FAILED ("HEAD: Second element is wrong"); + if (strcmp ("foo", queue->head->next->next->data)) + return FAILED ("HEAD: Third element is wrong"); + if (NULL != queue->head->next->next->next) + return FAILED ("HEAD: End is wrong"); + + if (NULL != queue->tail->next) + return FAILED ("TAIL: next is wrong"); + if (strcmp ("foo", queue->tail->data)) + return FAILED ("TAIL: Third element is wrong"); + if (strcmp ("bar", queue->tail->prev->data)) + return FAILED ("TAIL: Second element is wrong"); + if (strcmp ("baz", queue->tail->prev->prev->data)) + return FAILED ("TAIL: First element is wrong"); + if (NULL != queue->tail->prev->prev->prev) + return FAILED ("TAIL: End is wrong"); + + g_queue_free (queue); + return OK; +} + +RESULT +test_queue_pop () +{ + GQueue *queue = g_queue_new (); + gpointer data; + + g_queue_push_head (queue, "foo"); + g_queue_push_head (queue, "bar"); + g_queue_push_head (queue, "baz"); + + data = g_queue_pop_head (queue); + if (strcmp ("baz", data)) + return FAILED ("expect baz."); + + data = g_queue_pop_head (queue); + if (strcmp ("bar", data)) + return FAILED ("expect bar."); + + data = g_queue_pop_head (queue); + if (strcmp ("foo", data)) + return FAILED ("expect foo."); + + if (g_queue_is_empty (queue) == FALSE) + return FAILED ("expect is_empty."); + + if (queue->length != 0) + return FAILED ("expect 0 length ."); + + g_queue_push_head (queue, "foo"); + g_queue_push_head (queue, "bar"); + g_queue_push_head (queue, "baz"); + + g_queue_pop_head (queue); + + if (NULL != queue->head->prev) + return FAILED ("HEAD: prev is wrong"); + if (strcmp ("bar", queue->head->data)) + return FAILED ("HEAD: Second element is wrong"); + if (strcmp ("foo", queue->head->next->data)) + return FAILED ("HEAD: Third element is wrong"); + if (NULL != queue->head->next->next) + return FAILED ("HEAD: End is wrong"); + + if (NULL != queue->tail->next) + return FAILED ("TAIL: next is wrong"); + if (strcmp ("foo", queue->tail->data)) + return FAILED ("TAIL: Second element is wrong"); + if (strcmp ("bar", queue->tail->prev->data)) + return FAILED ("TAIL: First element is wrong"); + if (NULL != queue->tail->prev->prev) + return FAILED ("TAIL: End is wrong"); + + g_queue_free (queue); + return OK; +} + +RESULT +test_queue_new () +{ + GQueue *queue = g_queue_new (); + + if (queue->length != 0) + return FAILED ("expect length == 0"); + + if (queue->head != NULL) + return FAILED ("expect head == NULL"); + + if (queue->tail != NULL) + return FAILED ("expect tail == NULL"); + + g_queue_free (queue); + return OK; +} + +RESULT +test_queue_is_empty () +{ + GQueue *queue = g_queue_new (); + + if (g_queue_is_empty (queue) == FALSE) + return FAILED ("new queue should be empty"); + + g_queue_push_head (queue, "foo"); + + if (g_queue_is_empty (queue) == TRUE) + return FAILED ("expected TRUE"); + + g_queue_free (queue); + + return OK; +} + +static Test queue_tests [] = { + { "push", test_queue_push}, + {"push_tail", test_queue_push_tail}, + { "pop", test_queue_pop}, + { "new", test_queue_new}, + {"is_empty", test_queue_is_empty}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(queue_tests_init, queue_tests) + diff --git a/eglib/test/shell.c b/eglib/test/shell.c new file mode 100644 index 0000000000..c55e27c630 --- /dev/null +++ b/eglib/test/shell.c @@ -0,0 +1,286 @@ +#include <glib.h> +#include <string.h> +#include <stdio.h> +#include "test.h" + +RESULT +test_shell_argv1 () +{ + GError *error; + gint argc; + gchar **argv; + gboolean ret; + + /* The next line prints a critical error and returns FALSE + ret = g_shell_parse_argv (NULL, NULL, NULL, NULL); + */ + ret = g_shell_parse_argv ("", NULL, NULL, NULL); + if (ret) + return FAILED ("1. It should return FALSE"); + + ret = g_shell_parse_argv ("hola", NULL, NULL, NULL); + if (!ret) + return FAILED ("2. It should return TRUE"); + + argc = 0; + ret = g_shell_parse_argv ("hola", &argc, NULL, NULL); + if (!ret) + return FAILED ("3. It should return TRUE"); + if (argc != 1) + return FAILED ("4. argc was %d", argc); + + argc = 0; + ret = g_shell_parse_argv ("hola bola", &argc, NULL, NULL); + if (!ret) + return FAILED ("5. It should return TRUE"); + if (argc != 2) + return FAILED ("6. argc was %d", argc); + + argc = 0; + ret = g_shell_parse_argv ("hola bola", &argc, &argv, NULL); + if (!ret) + return FAILED ("7. It should return TRUE"); + if (argc != 2) + return FAILED ("8. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("9. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "bola")) + return FAILED ("10. argv[1] was %s", argv [1]); + + g_strfreev (argv); + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola 'bola'", &argc, &argv, &error); + if (!ret) + return FAILED ("11. It should return TRUE"); + if (argc != 2) + return FAILED ("12. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("13. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "bola")) + return FAILED ("14. argv[1] was %s", argv [1]); + if (error != NULL) + return FAILED ("15. error is not null"); + + + g_strfreev (argv); + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola '' 'bola'", &argc, &argv, &error); + if (!ret) + return FAILED ("16. It should return TRUE"); + if (argc != 3) + return FAILED ("17. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("18. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "")) + return FAILED ("19. argv[2] was %s", argv [1]); + if (strcmp (argv [2], "bola")) + return FAILED ("19. argv[2] was %s", argv [2]); + if (error != NULL) + return FAILED ("20. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + return OK; +} + +RESULT +test_shell_argv2 () +{ + GError *error; + gint argc; + gchar **argv; + gboolean ret; + + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola \"bola\"", &argc, &argv, &error); + if (!ret) + return FAILED ("1. It should return TRUE"); + if (argc != 2) + return FAILED ("2. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("3. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "bola")) + return FAILED ("4. argv[1] was %s", argv [1]); + if (error != NULL) + return FAILED ("5. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola \"\" \"bola \"", &argc, &argv, &error); + if (!ret) + return FAILED ("6. It should return TRUE"); + if (argc != 3) + return FAILED ("7. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("8. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "")) + return FAILED ("9. argv[2] was %s", argv [1]); + if (strcmp (argv [2], "bola ")) + return FAILED ("10. argv[2] was %s", argv [2]); + if (error != NULL) + return FAILED ("11. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola\n\t \"\t\" \"bola \"", &argc, &argv, &error); + if (!ret) + return FAILED ("10. It should return TRUE"); + if (argc != 3) + return FAILED ("11. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("12. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "\t")) + return FAILED ("13. argv[2] was %s", argv [1]); + if (strcmp (argv [2], "bola ")) + return FAILED ("14. argv[2] was %s", argv [2]); + if (error != NULL) + return FAILED ("15. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola\n\t \\\n \"\t\" \"bola \"", &argc, &argv, &error); + if (!ret) + return FAILED ("16. It should return TRUE"); + if (argc != 3) + return FAILED ("17. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("18. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "\t")) + return FAILED ("19. argv[2] was %s", argv [1]); + if (strcmp (argv [2], "bola ")) + return FAILED ("20. argv[2] was %s", argv [2]); + if (error != NULL) + return FAILED ("21. error is not null"); + + g_strfreev (argv); + return OK; +} + +RESULT +test_shell_argv3 () +{ + GError *error; + gint argc; + gchar **argv; + gboolean ret; + + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv ("hola \"bola", &argc, &argv, &error); + if (ret) + return FAILED ("1. It should return FALSE"); + if (argc != 0) + return FAILED ("2. argc was %d", argc); + if (argv != NULL) + return FAILED ("3. argv[0] was %s", argv [0]); + if (error == NULL) + return FAILED ("4. error is null"); + + /* Text ended before matching quote was found for ". (The text was 'hola "bola') */ + g_error_free (error); + error = NULL; + ret = g_shell_parse_argv ("hola \\\"bola", &argc, &argv, &error); + if (!ret) + return FAILED ("5. It should return TRUE"); + if (argc != 2) + return FAILED ("6. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("18. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "\"bola")) + return FAILED ("18. argv[1] was %s", argv [1]); + if (error != NULL) + return FAILED ("8. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + ret = g_shell_parse_argv ("hola \"\n\\'bola\"", &argc, &argv, &error); + if (!ret) + return FAILED ("9. It should return TRUE. %s", error->message); + if (argc != 2) + return FAILED ("10. argc was %d", argc); + if (strcmp (argv [0], "hola")) + return FAILED ("11. argv[0] was %s", argv [0]); + if (strcmp (argv [1], "\n\\'bola")) + return FAILED ("12. argv[1] was %s", argv [1]); + if (error != NULL) + return FAILED ("13. error is not null"); + + g_strfreev (argv); + argv = NULL; + argc = 0; + return OK; +} + +// This was the 2.8 showstopper error +RESULT +test_shell_argv4 () +{ + GError *error; + gint argc; + gchar **argv; + gboolean ret; + char *str = "'/usr/bin/gnome-terminal' -e \"bash -c 'read -p \\\"Press any key to continue...\\\" -n1;'\""; + + argv = NULL; + argc = 0; + error = NULL; + ret = g_shell_parse_argv (str, &argc, &argv, &error); + if (!ret) + return FAILED ("1. It should return TRUE"); + if (argc != 3) + return FAILED ("2. argc was %d", argc); + if (argv == NULL) + return FAILED ("3. argv[0] was NULL"); + if (error != NULL) + return FAILED ("4. error was set"); + + if (strcmp (argv [0], "/usr/bin/gnome-terminal")) + return FAILED ("5. Expected /usr/bin/gnome-terminal got %s", argv [0]); + if (strcmp (argv [1], "-e")) + return FAILED ("6. Expected -e, got: %s", argv [1]); + if (strcmp (argv [2], "bash -c 'read -p \"Press any key to continue...\" -n1;'")) + return FAILED ("7. Got unexpected result: %s\n", argv [2]); + + return OK; +} + +RESULT +test_quote () +{ + if (strcmp (g_shell_quote ("foo"), "'foo'")) + return FAILED ("Should return 'foo'"); + + if (strcmp (g_shell_quote ("foo'bar"), "'foo'\\''bar'")) + return FAILED ("Should return 'foo'\\''bar'"); + + if (strcmp (g_shell_quote ("foo bar"), "'foo bar'")) + return FAILED ("Should return 'foo bar'"); + return OK; +} + +static Test shell_tests [] = { + {"g_shell_parse_argv1", test_shell_argv1}, + {"g_shell_parse_argv2", test_shell_argv2}, + {"g_shell_parse_argv3", test_shell_argv3}, + {"g_shell_parse_argv4", test_shell_argv4}, + {"g_shell_quote", test_quote}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(shell_tests_init, shell_tests) + diff --git a/eglib/test/sizes.c b/eglib/test/sizes.c new file mode 100644 index 0000000000..585cc11377 --- /dev/null +++ b/eglib/test/sizes.c @@ -0,0 +1,108 @@ +/* + * Tests to ensure that our type definitions are correct + * + * These depend on -Werror, -Wall being set to catch the build error. + */ +#include <stdio.h> +#ifndef _MSC_VER +#include <stdint.h> +#endif +#include <string.h> +#include <glib.h> +#include "test.h" + +RESULT +test_formats () +{ + char buffer [1024]; + gsize a = 1; + + sprintf (buffer, "%" G_GSIZE_FORMAT, a); + + return NULL; +} + +RESULT +test_ptrconv () +{ + int iv, iv2; + unsigned int uv, uv2; + gpointer ptr; + + iv = G_MAXINT32; + ptr = GINT_TO_POINTER (iv); + iv2 = GPOINTER_TO_INT (ptr); + if (iv != iv2) + return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2); + + iv = G_MININT32; + ptr = GINT_TO_POINTER (iv); + iv2 = GPOINTER_TO_INT (ptr); + if (iv != iv2) + return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2); + + iv = 1; + ptr = GINT_TO_POINTER (iv); + iv2 = GPOINTER_TO_INT (ptr); + if (iv != iv2) + return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2); + + iv = -1; + ptr = GINT_TO_POINTER (iv); + iv2 = GPOINTER_TO_INT (ptr); + if (iv != iv2) + return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2); + + iv = 0; + ptr = GINT_TO_POINTER (iv); + iv2 = GPOINTER_TO_INT (ptr); + if (iv != iv2) + return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2); + + uv = 0; + ptr = GUINT_TO_POINTER (iv); + uv2 = GPOINTER_TO_UINT (ptr); + if (iv != iv2) + return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2); + + uv = 1; + ptr = GUINT_TO_POINTER (iv); + uv2 = GPOINTER_TO_UINT (ptr); + if (iv != iv2) + return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2); + + uv = UINT32_MAX; + ptr = GUINT_TO_POINTER (iv); + uv2 = GPOINTER_TO_UINT (ptr); + if (iv != iv2) + return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2); + + return NULL; + +} + +typedef struct { + int a; + int b; +} my_struct; + +RESULT +test_offset () +{ + if (G_STRUCT_OFFSET (my_struct, a) != 0) + return FAILED ("offset of a is not zero"); + + if (G_STRUCT_OFFSET (my_struct, b) != 4 && G_STRUCT_OFFSET (my_struct, b) != 8) + return FAILED ("offset of b is 4 or 8, macro might be busted"); + + return OK; +} + +static Test size_tests [] = { + {"formats", test_formats}, + {"ptrconv", test_ptrconv}, + {"g_struct_offset", test_offset}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(size_tests_init, size_tests) diff --git a/eglib/test/slist.c b/eglib/test/slist.c new file mode 100644 index 0000000000..3f8360ecae --- /dev/null +++ b/eglib/test/slist.c @@ -0,0 +1,345 @@ +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "test.h" + + +RESULT +test_slist_nth () +{ + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + GSList *nth, *list; + list = g_slist_prepend (NULL, baz); + list = g_slist_prepend (list, bar); + list = g_slist_prepend (list, foo); + + nth = g_slist_nth (list, 0); + if (nth->data != foo) + return FAILED ("nth failed. #0"); + + nth = g_slist_nth (list, 1); + if (nth->data != bar) + return FAILED ("nth failed. #1"); + + nth = g_slist_nth (list, 2); + if (nth->data != baz) + return FAILED ("nth failed. #2"); + + nth = g_slist_nth (list, 3); + if (nth) + return FAILED ("nth failed. #3: %s", nth->data); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_index () +{ + int i; + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + GSList *list; + list = g_slist_prepend (NULL, baz); + list = g_slist_prepend (list, bar); + list = g_slist_prepend (list, foo); + + i = g_slist_index (list, foo); + if (i != 0) + return FAILED ("index failed. #0: %d", i); + + i = g_slist_index (list, bar); + if (i != 1) + return FAILED ("index failed. #1: %d", i); + + i = g_slist_index (list, baz); + if (i != 2) + return FAILED ("index failed. #2: %d", i); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_append () +{ + GSList *foo; + GSList *list = g_slist_append (NULL, "first"); + if (g_slist_length (list) != 1) + return FAILED ("append(null,...) failed"); + + foo = g_slist_append (list, "second"); + if (foo != list) + return FAILED ("changed list head on non-empty"); + + if (g_slist_length (list) != 2) + return FAILED ("Append failed"); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_concat () +{ + GSList *foo = g_slist_prepend (NULL, "foo"); + GSList *bar = g_slist_prepend (NULL, "bar"); + + GSList *list = g_slist_concat (foo, bar); + + if (g_slist_length (list) != 2) + return FAILED ("Concat failed."); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_find () +{ + GSList *list = g_slist_prepend (NULL, "three"); + GSList *found; + char *data; + + list = g_slist_prepend (list, "two"); + list = g_slist_prepend (list, "one"); + + data = "four"; + list = g_slist_append (list, data); + + found = g_slist_find (list, data); + + if (found->data != data) + return FAILED ("Find failed"); + + g_slist_free (list); + return OK; +} + +static gint +find_custom (gconstpointer a, gconstpointer b) +{ + return(strcmp (a, b)); +} + +RESULT +test_slist_find_custom () +{ + GSList *list = NULL, *found; + char *foo = "foo"; + char *bar = "bar"; + char *baz = "baz"; + + list = g_slist_prepend (list, baz); + list = g_slist_prepend (list, bar); + list = g_slist_prepend (list, foo); + + found = g_slist_find_custom (list, baz, find_custom); + + if (found == NULL) + return FAILED ("Find failed"); + + g_slist_free (list); + + return OK; +} + +RESULT +test_slist_remove () +{ + GSList *list = g_slist_prepend (NULL, "three"); + char *one = "one"; + list = g_slist_prepend (list, "two"); + list = g_slist_prepend (list, one); + + list = g_slist_remove (list, one); + + if (g_slist_length (list) != 2) + return FAILED ("Remove failed"); + + if (strcmp ("two", list->data) != 0) + return FAILED ("Remove failed"); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_remove_link () +{ + GSList *foo = g_slist_prepend (NULL, "a"); + GSList *bar = g_slist_prepend (NULL, "b"); + GSList *baz = g_slist_prepend (NULL, "c"); + GSList *list = foo; + + foo = g_slist_concat (foo, bar); + foo = g_slist_concat (foo, baz); + + list = g_slist_remove_link (list, bar); + + if (g_slist_length (list) != 2) + return FAILED ("remove_link failed #1"); + + if (bar->next != NULL) + return FAILED ("remove_link failed #2"); + + g_slist_free (list); + g_slist_free (bar); + + return OK; +} + +static gint +compare (gconstpointer a, gconstpointer b) +{ + char *foo = (char *) a; + char *bar = (char *) b; + + if (strlen (foo) < strlen (bar)) + return -1; + + return 1; +} + +RESULT +test_slist_insert_sorted () +{ + GSList *list = g_slist_prepend (NULL, "a"); + list = g_slist_append (list, "aaa"); + + /* insert at the middle */ + list = g_slist_insert_sorted (list, "aa", compare); + if (strcmp ("aa", list->next->data)) + return FAILED("insert_sorted failed #1"); + + /* insert at the beginning */ + list = g_slist_insert_sorted (list, "", compare); + if (strcmp ("", list->data)) + return FAILED ("insert_sorted failed #2"); + + /* insert at the end */ + list = g_slist_insert_sorted (list, "aaaa", compare); + if (strcmp ("aaaa", g_slist_last (list)->data)) + return FAILED ("insert_sorted failed #3"); + + g_slist_free (list); + return OK; +} + +RESULT +test_slist_insert_before () +{ + GSList *foo, *bar, *baz; + + foo = g_slist_prepend (NULL, "foo"); + foo = g_slist_insert_before (foo, NULL, "bar"); + bar = g_slist_last (foo); + + if (strcmp (bar->data, "bar")) + return FAILED ("1"); + + baz = g_slist_insert_before (foo, bar, "baz"); + if (foo != baz) + return FAILED ("2"); + + if (strcmp (foo->next->data, "baz")) + return FAILED ("3: %s", foo->next->data); + + g_slist_free (foo); + return OK; +} + +#define N_ELEMS 100 + +static int intcompare (gconstpointer p1, gconstpointer p2) +{ + return GPOINTER_TO_INT (p1) - GPOINTER_TO_INT (p2); +} + +static gboolean verify_sort (GSList *list, int len) +{ + int prev = GPOINTER_TO_INT (list->data); + len--; + for (list = list->next; list; list = list->next) { + int curr = GPOINTER_TO_INT (list->data); + if (prev > curr) + return FALSE; + prev = curr; + + if (len == 0) + return FALSE; + len--; + } + return len == 0; +} + +RESULT +test_slist_sort () +{ + int i, j, mul; + GSList *list = NULL; + + for (i = 0; i < N_ELEMS; ++i) + list = g_slist_prepend (list, GINT_TO_POINTER (i)); + list = g_slist_sort (list, intcompare); + if (!verify_sort (list, N_ELEMS)) + return FAILED ("decreasing list"); + + g_slist_free (list); + + list = NULL; + for (i = 0; i < N_ELEMS; ++i) + list = g_slist_prepend (list, GINT_TO_POINTER (-i)); + list = g_slist_sort (list, intcompare); + if (!verify_sort (list, N_ELEMS)) + return FAILED ("increasing list"); + + g_slist_free (list); + + list = g_slist_prepend (NULL, GINT_TO_POINTER (0)); + for (i = 1; i < N_ELEMS; ++i) { + list = g_slist_prepend (list, GINT_TO_POINTER (-i)); + list = g_slist_prepend (list, GINT_TO_POINTER (i)); + } + list = g_slist_sort (list, intcompare); + if (!verify_sort (list, 2*N_ELEMS-1)) + return FAILED ("alternating list"); + + g_slist_free (list); + + list = NULL; + mul = 1; + for (i = 1; i < N_ELEMS; ++i) { + mul = -mul; + for (j = 0; j < i; ++j) + list = g_slist_prepend (list, GINT_TO_POINTER (mul * j)); + } + list = g_slist_sort (list, intcompare); + if (!verify_sort (list, (N_ELEMS*N_ELEMS - N_ELEMS)/2)) + return FAILED ("wavering list"); + + g_slist_free (list); + + return OK; +} + +static Test slist_tests [] = { + {"nth", test_slist_nth}, + {"index", test_slist_index}, + {"append", test_slist_append}, + {"concat", test_slist_concat}, + {"find", test_slist_find}, + {"find_custom", test_slist_find_custom}, + {"remove", test_slist_remove}, + {"remove_link", test_slist_remove_link}, + {"insert_sorted", test_slist_insert_sorted}, + {"insert_before", test_slist_insert_before}, + {"sort", test_slist_sort}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(slist_tests_init, slist_tests) + diff --git a/eglib/test/spawn.c b/eglib/test/spawn.c new file mode 100644 index 0000000000..ec30fc8641 --- /dev/null +++ b/eglib/test/spawn.c @@ -0,0 +1,82 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdio.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include "test.h" + +#ifdef G_OS_WIN32 +#include <io.h> +#define read _read +#define close _close +#endif + +RESULT +test_spawn_sync () +{ + gchar *out; + gchar *err; + gint status = -1; + GError *error = NULL; + + if (!g_spawn_command_line_sync ("ls", &out, &err, &status, &error)) + return FAILED ("Error executing 'ls'"); + + if (status != 0) + return FAILED ("Status is %d", status); + + if (out == NULL || strlen (out) == 0) + return FAILED ("Didn't get any output from ls!?"); + + g_free (out); + g_free (err); + return OK; +} + +RESULT +test_spawn_async () +{ + /* +gboolean +g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint *standard_input, + gint *standard_output, + gint *standard_error, + GError **error) */ + char *argv [15]; + int stdout_fd = -1; + char buffer [512]; + pid_t child_pid = 0; + + memset (argv, 0, 15 * sizeof (char *)); + argv [0] = "ls"; + if (!g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &child_pid, NULL, &stdout_fd, NULL, NULL)) + return FAILED ("1 Failed to run ls"); + if (child_pid == 0) + return FAILED ("2 child pid not returned"); + if (stdout_fd == -1) + return FAILED ("3 out fd is -1"); + + while (read (stdout_fd, buffer, 512) > 0); + close (stdout_fd); + + return OK; +} + +static Test spawn_tests [] = { + {"g_shell_spawn_sync", test_spawn_sync}, + {"g_shell_spawn_async_with_pipes", test_spawn_async}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(spawn_tests_init, spawn_tests) + + diff --git a/eglib/test/string-util.c b/eglib/test/string-util.c new file mode 100644 index 0000000000..83f711516c --- /dev/null +++ b/eglib/test/string-util.c @@ -0,0 +1,647 @@ +#include <glib.h> +#include <string.h> +#include <stdio.h> +#include "test.h" + +/* This test is just to be used with valgrind */ +RESULT +test_strfreev () +{ + gchar **array = g_new (gchar *, 4); + array [0] = g_strdup ("one"); + array [1] = g_strdup ("two"); + array [2] = g_strdup ("three"); + array [3] = NULL; + + g_strfreev (array); + g_strfreev (NULL); + + return OK; +} + +RESULT +test_concat () +{ + gchar *x = g_strconcat ("Hello", ", ", "world", NULL); + if (strcmp (x, "Hello, world") != 0) + return FAILED("concat failed, got: %s", x); + g_free (x); + return OK; +} + +RESULT +test_split () +{ + const gchar *to_split = "Hello world, how are we doing today?"; + gint i; + gchar **v; + + v= g_strsplit(to_split, " ", 0); + + if(v == NULL) { + return FAILED("split failed, got NULL vector (1)"); + } + + for(i = 0; v[i] != NULL; i++); + if(i != 7) { + return FAILED("split failed, expected 7 tokens, got %d", i); + } + + g_strfreev(v); + + v = g_strsplit(to_split, ":", -1); + if(v == NULL) { + return FAILED("split failed, got NULL vector (2)"); + } + + for(i = 0; v[i] != NULL; i++); + if(i != 1) { + return FAILED("split failed, expected 1 token, got %d", i); + } + + if(strcmp(v[0], to_split) != 0) { + return FAILED("expected vector[0] to be '%s' but it was '%s'", + to_split, v[0]); + } + g_strfreev(v); + + v = g_strsplit ("", ":", 0); + if (v == NULL) + return FAILED ("g_strsplit returned NULL"); + g_strfreev (v); + + v = g_strsplit ("/home/miguel/dingus", "/", 0); + if (v [0][0] != 0) + return FAILED ("Got a non-empty first element"); + g_strfreev (v); + + v = g_strsplit ("appdomain1, Version=0.0.0.0, Culture=neutral", ",", 4); + if (strcmp (v [0], "appdomain1") != 0) + return FAILED ("Invalid value"); + + if (strcmp (v [1], " Version=0.0.0.0") != 0) + return FAILED ("Invalid value"); + + if (strcmp (v [2], " Culture=neutral") != 0) + return FAILED ("Invalid value"); + + if (v [3] != NULL) + return FAILED ("Expected only 3 elements"); + + g_strfreev (v); + + v = g_strsplit ("abcXYdefXghiXYjklYmno", "XY", 4); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 0"); + + if (strcmp (v [1], "defXghi") != 0) + return FAILED ("Invalid value 1"); + + if (strcmp (v [2], "jklYmno") != 0) + return FAILED ("Invalid value 2"); + + if (v [3] != NULL) + return FAILED ("Expected only 3 elements (1)"); + + g_strfreev (v); + + v = g_strsplit ("abcXYdefXghiXYjklYmno", "XY", 2); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 3"); + + if (strcmp (v [1], "defXghiXYjklYmno") != 0) + return FAILED ("Invalid value 4"); + + if (v [2] != NULL) + return FAILED ("Expected only 2 elements (2)"); + + g_strfreev (v); + + v = g_strsplit ("abcXYdefXghiXYjklYmnoXY", "XY", 3); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 5"); + + if (strcmp (v [1], "defXghi") != 0) + return FAILED ("Invalid value 6"); + + if (strcmp (v [2], "jklYmnoXY") != 0) + return FAILED ("Invalid value 7"); + + if (v [3] != NULL) + return FAILED ("Expected only 3 elements (3)"); + + g_strfreev (v); + + v = g_strsplit ("abcXYXYXYdefXY", "XY", -1); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 8"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 9"); + + if (strcmp (v [2], "") != 0) + return FAILED ("Invalid value 10"); + + if (strcmp (v [3], "def") != 0) + return FAILED ("Invalid value 11"); + + if (strcmp (v [4], "") != 0) + return FAILED ("Invalid value 12"); + + if (v [5] != NULL) + return FAILED ("Expected only 5 elements (4)"); + + g_strfreev (v); + + v = g_strsplit ("XYXYXYabcXYdef", "XY", -1); + if (strcmp (v [0], "") != 0) + return FAILED ("Invalid value 13"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 14"); + + if (strcmp (v [2], "") != 0) + return FAILED ("Invalid value 15"); + + if (strcmp (v [3], "abc") != 0) + return FAILED ("Invalid value 16"); + + if (strcmp (v [4], "def") != 0) + return FAILED ("Invalid value 17"); + + if (v [5] != NULL) + return FAILED ("Expected only 5 elements (5)"); + + g_strfreev (v); + + return OK; +} + +RESULT +test_split_set () +{ + gchar **v; + + v = g_strsplit_set ("abcXYdefXghiXYjklYmno", "XY", 6); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 0"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 1"); + + if (strcmp (v [2], "def") != 0) + return FAILED ("Invalid value 2"); + + if (strcmp (v [3], "ghi") != 0) + return FAILED ("Invalid value 3"); + + if (strcmp (v [4], "") != 0) + return FAILED ("Invalid value 4"); + + if (strcmp (v [5], "jklYmno") != 0) + return FAILED ("Invalid value 5"); + + if (v [6] != NULL) + return FAILED ("Expected only 6 elements (1)"); + + g_strfreev (v); + + v = g_strsplit_set ("abcXYdefXghiXYjklYmno", "XY", 3); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 6"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 7"); + + if (strcmp (v [2], "defXghiXYjklYmno") != 0) + return FAILED ("Invalid value 8"); + + if (v [3] != NULL) + return FAILED ("Expected only 3 elements (2)"); + + g_strfreev (v); + + v = g_strsplit_set ("abcXdefYghiXjklYmnoX", "XY", 5); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 9"); + + if (strcmp (v [1], "def") != 0) + return FAILED ("Invalid value 10"); + + if (strcmp (v [2], "ghi") != 0) + return FAILED ("Invalid value 11"); + + if (strcmp (v [3], "jkl") != 0) + return FAILED ("Invalid value 12"); + + if (strcmp (v [4], "mnoX") != 0) + return FAILED ("Invalid value 13"); + + if (v [5] != NULL) + return FAILED ("Expected only 5 elements (5)"); + + g_strfreev (v); + + v = g_strsplit_set ("abcXYXdefXY", "XY", -1); + if (strcmp (v [0], "abc") != 0) + return FAILED ("Invalid value 14"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 15"); + + if (strcmp (v [2], "") != 0) + return FAILED ("Invalid value 16"); + + if (strcmp (v [3], "def") != 0) + return FAILED ("Invalid value 17"); + + if (strcmp (v [4], "") != 0) + return FAILED ("Invalid value 18"); + + if (strcmp (v [5], "") != 0) + return FAILED ("Invalid value 19"); + + if (v [6] != NULL) + return FAILED ("Expected only 6 elements (4)"); + + g_strfreev (v); + + v = g_strsplit_set ("XYXabcXYdef", "XY", -1); + if (strcmp (v [0], "") != 0) + return FAILED ("Invalid value 20"); + + if (strcmp (v [1], "") != 0) + return FAILED ("Invalid value 21"); + + if (strcmp (v [2], "") != 0) + return FAILED ("Invalid value 22"); + + if (strcmp (v [3], "abc") != 0) + return FAILED ("Invalid value 23"); + + if (strcmp (v [4], "") != 0) + return FAILED ("Invalid value 24"); + + if (strcmp (v [5], "def") != 0) + return FAILED ("Invalid value 25"); + + if (v [6] != NULL) + return FAILED ("Expected only 6 elements (5)"); + + g_strfreev (v); + + return OK; +} + +RESULT +test_strreverse () +{ + gchar *a = g_strdup ("onetwothree"); + gchar *a_target = "eerhtowteno"; + gchar *b = g_strdup ("onetwothre"); + gchar *b_target = "erhtowteno"; + + g_strreverse (a); + if (strcmp (a, a_target)) { + g_free (b); + g_free (a); + return FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", a, a_target); + } + + g_strreverse (b); + if (strcmp (b, b_target)) { + g_free (b); + g_free (a); + return FAILED("strreverse failed. Expecting: '%s' and got '%s'\n", b, b_target); + } + g_free (b); + g_free (a); + return OK; +} + +RESULT +test_strjoin () +{ + char *s; + + s = g_strjoin (NULL, "a", "b", NULL); + if (strcmp (s, "ab") != 0) + return FAILED ("Join of two strings with no separator fails"); + g_free (s); + + s = g_strjoin ("", "a", "b", NULL); + if (strcmp (s, "ab") != 0) + return FAILED ("Join of two strings with empty separator fails"); + g_free (s); + + s = g_strjoin ("-", "a", "b", NULL); + if (strcmp (s, "a-b") != 0) + return FAILED ("Join of two strings with separator fails"); + g_free (s); + + s = g_strjoin ("-", "aaaa", "bbbb", "cccc", "dddd", NULL); + if (strcmp (s, "aaaa-bbbb-cccc-dddd") != 0) + return FAILED ("Join of multiple strings fails"); + g_free (s); + + s = g_strjoin ("-", NULL); + if (s == NULL || (strcmp (s, "") != 0)) + return FAILED ("Failed to join empty arguments"); + g_free (s); + + return OK; +} + +RESULT +test_strchug () +{ + char *str = g_strdup (" \t\n hola"); + + g_strchug (str); + if (strcmp ("hola", str)) { + fprintf (stderr, "%s\n", str); + g_free (str); + return FAILED ("Failed."); + } + g_free (str); + return OK; +} + +RESULT +test_strchomp () +{ + char *str = g_strdup ("hola \t"); + + g_strchomp (str); + if (strcmp ("hola", str)) { + fprintf (stderr, "%s\n", str); + g_free (str); + return FAILED ("Failed."); + } + g_free (str); + return OK; +} + +RESULT +test_strstrip () +{ + char *str = g_strdup (" \t hola "); + + g_strstrip (str); + if (strcmp ("hola", str)) { + fprintf (stderr, "%s\n", str); + g_free (str); + return FAILED ("Failed."); + } + g_free (str); + return OK; +} + +#define urit(so,j) do { s = g_filename_to_uri (so, NULL, NULL); if (strcmp (s, j) != 0) return FAILED("Got %s expected %s", s, j); g_free (s); } while (0); + +#define errit(so) do { s = g_filename_to_uri (so, NULL, NULL); if (s != NULL) return FAILED ("got %s, expected NULL", s); } while (0); + +RESULT +test_filename_to_uri () +{ + char *s; + + urit ("/a", "file:///a"); + urit ("/home/miguel", "file:///home/miguel"); + urit ("/home/mig uel", "file:///home/mig%20uel"); + urit ("/\303\241", "file:///%C3%A1"); + urit ("/\303\241/octal", "file:///%C3%A1/octal"); + urit ("/%", "file:///%25"); + urit ("/\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040", "file:///%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20"); + urit ("/!$&'()*+,-./", "file:///!$&'()*+,-./"); + urit ("/\042\043\045", "file:///%22%23%25"); + urit ("/0123456789:=", "file:///0123456789:="); + urit ("/\073\074\076\077", "file:///%3B%3C%3E%3F"); + urit ("/\133\134\135\136_\140\173\174\175", "file:///%5B%5C%5D%5E_%60%7B%7C%7D"); + urit ("/\173\174\175\176\177\200", "file:///%7B%7C%7D~%7F%80"); + urit ("/@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", "file:///@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + errit ("a"); + errit ("./hola"); + + return OK; +} + +#define fileit(so,j) do { s = g_filename_from_uri (so, NULL, NULL); if (strcmp (s, j) != 0) return FAILED("Got %s expected %s", s, j); g_free (s); } while (0); + +#define ferrit(so) do { s = g_filename_from_uri (so, NULL, NULL); if (s != NULL) return FAILED ("got %s, expected NULL", s); } while (0); + +RESULT +test_filename_from_uri () +{ + char *s; + + fileit ("file:///a", "/a"); + fileit ("file:///%41", "/A"); + fileit ("file:///home/miguel", "/home/miguel"); + fileit ("file:///home/mig%20uel", "/home/mig uel"); + ferrit ("/a"); + ferrit ("a"); + ferrit ("file://a"); + ferrit ("file:a"); + ferrit ("file:///%"); + ferrit ("file:///%0"); + ferrit ("file:///%jj"); + + return OK; +} + +RESULT +test_ascii_xdigit_value () +{ + int i; + gchar j; + + i = g_ascii_xdigit_value ('9' + 1); + if (i != -1) + return FAILED ("'9' + 1"); + i = g_ascii_xdigit_value ('0' - 1); + if (i != -1) + return FAILED ("'0' - 1"); + i = g_ascii_xdigit_value ('a' - 1); + if (i != -1) + return FAILED ("'a' - 1"); + i = g_ascii_xdigit_value ('f' + 1); + if (i != -1) + return FAILED ("'f' + 1"); + i = g_ascii_xdigit_value ('A' - 1); + if (i != -1) + return FAILED ("'A' - 1"); + i = g_ascii_xdigit_value ('F' + 1); + if (i != -1) + return FAILED ("'F' + 1"); + + for (j = '0'; j < '9'; j++) { + int c = g_ascii_xdigit_value (j); + if (c != (j - '0')) + return FAILED ("Digits %c -> %d", j, c); + } + for (j = 'a'; j < 'f'; j++) { + int c = g_ascii_xdigit_value (j); + if (c != (j - 'a' + 10)) + return FAILED ("Lower %c -> %d", j, c); + } + for (j = 'A'; j < 'F'; j++) { + int c = g_ascii_xdigit_value (j); + if (c != (j - 'A' + 10)) + return FAILED ("Upper %c -> %d", j, c); + } + return OK; +} + +RESULT +test_strdelimit () +{ + gchar *str; + + str = g_strdup (G_STR_DELIMITERS); + str = g_strdelimit (str, NULL, 'a'); + if (0 != strcmp ("aaaaaaa", str)) + return FAILED ("All delimiters: '%s'", str); + g_free (str); + str = g_strdup ("hola"); + str = g_strdelimit (str, "ha", '+'); + if (0 != strcmp ("+ol+", str)) + return FAILED ("2 delimiters: '%s'", str); + g_free (str); + return OK; +} + +#define NUMBERS "0123456789" + +RESULT +test_strlcpy () +{ + const gchar *src = "onetwothree"; + gchar *dest; + gsize i; + + dest = g_malloc (strlen (src) + 1); + memset (dest, 0, strlen (src) + 1); + i = g_strlcpy (dest, src, (gsize)-1); + if (i != strlen (src)) + return FAILED ("Test1 got %d", i); + + if (0 != strcmp (dest, src)) + return FAILED ("Src and dest not equal"); + + i = g_strlcpy (dest, src, 3); + if (i != strlen (src)) + return FAILED ("Test1 got %d", i); + if (0 != strcmp (dest, "on")) + return FAILED ("Test2"); + + i = g_strlcpy (dest, src, 1); + if (i != strlen (src)) + return FAILED ("Test3 got %d", i); + if (*dest != '\0') + return FAILED ("Test4"); + + i = g_strlcpy (dest, src, 12345); + if (i != strlen (src)) + return FAILED ("Test4 got %d", i); + if (0 != strcmp (dest, src)) + return FAILED ("Src and dest not equal 2"); + g_free (dest); + + /* This is a test for g_filename_from_utf8, even if it does not look like it */ + dest = g_filename_from_utf8 (NUMBERS, strlen (NUMBERS), NULL, NULL, NULL); + if (0 != strcmp (dest, NUMBERS)) + return FAILED ("problem [%s] and [%s]", dest, NUMBERS); + g_free (dest); + + return OK; +} + +RESULT +test_strescape () +{ + gchar *str; + + str = g_strescape ("abc", NULL); + if (strcmp ("abc", str)) + return FAILED ("#1"); + str = g_strescape ("\t\b\f\n\r\\\"abc", NULL); + if (strcmp ("\\t\\b\\f\\n\\r\\\\\\\"abc", str)) + return FAILED ("#2 %s", str); + str = g_strescape ("\001abc", NULL); + if (strcmp ("\\001abc", str)) + return FAILED ("#3 %s", str); + str = g_strescape ("\001abc", "\001"); + if (strcmp ("\001abc", str)) + return FAILED ("#3 %s", str); + return OK; +} + +RESULT +test_ascii_strncasecmp () +{ + int n; + + n = g_ascii_strncasecmp ("123", "123", 1); + if (n != 0) + return FAILED ("Should have been 0"); + + n = g_ascii_strncasecmp ("423", "123", 1); + if (n != 3) + return FAILED ("Should have been 3, got %d", n); + + n = g_ascii_strncasecmp ("123", "423", 1); + if (n != -3) + return FAILED ("Should have been -3, got %d", n); + + n = g_ascii_strncasecmp ("1", "1", 10); + if (n != 0) + return FAILED ("Should have been 0, got %d", n); + return OK; +} + +RESULT +test_ascii_strdown () +{ + const gchar *a = "~09+AaBcDeFzZ$0909EmPAbCdEEEEEZZZZAAA"; + const gchar *b = "~09+aabcdefzz$0909empabcdeeeeezzzzaaa"; + gchar *c; + gint n, l; + + l = (gint)strlen (b); + c = g_ascii_strdown (a, l); + n = g_ascii_strncasecmp (b, c, l); + + if (n != 0) { + g_free (c); + return FAILED ("Should have been 0, got %d", n); + } + + g_free (c); + return OK; +} + +static Test strutil_tests [] = { + {"g_strfreev", test_strfreev}, + {"g_strconcat", test_concat}, + {"g_strsplit", test_split}, + {"g_strsplit_set", test_split_set}, + {"g_strreverse", test_strreverse}, + {"g_strjoin", test_strjoin}, + {"g_strchug", test_strchug}, + {"g_strchomp", test_strchomp}, + {"g_strstrip", test_strstrip}, + {"g_filename_to_uri", test_filename_to_uri}, + {"g_filename_from_uri", test_filename_from_uri}, + {"g_ascii_xdigit_value", test_ascii_xdigit_value}, + {"g_strdelimit", test_strdelimit}, + {"g_strlcpy", test_strlcpy}, + {"g_strescape", test_strescape}, + {"g_ascii_strncasecmp", test_ascii_strncasecmp }, + {"g_ascii_strdown", test_ascii_strdown }, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(strutil_tests_init, strutil_tests) + + diff --git a/eglib/test/string.c b/eglib/test/string.c new file mode 100644 index 0000000000..02ad0ad3ea --- /dev/null +++ b/eglib/test/string.c @@ -0,0 +1,237 @@ +#include <glib.h> +#include <string.h> +#include <stdio.h> +#include "test.h" + +#define sfail(k,p) if (s->str [p] != k) { g_string_free (s,TRUE); return FAILED("Got %s, Failed at %d, expected '%c'", s->str, p, k);} + +RESULT +test_append_speed() +{ + GString *s = g_string_new(""); + gint i; + + for(i = 0; i < 1024; i++) { + g_string_append(s, "x"); + } + + if(strlen (s->str) != 1024) { + return FAILED("Incorrect string size, got: %s %d", + s->str, strlen(s->str)); + } + + g_string_free (s, TRUE); + + return OK; +} + +RESULT +test_append_c_speed() +{ + GString *s = g_string_new(""); + gint i; + + for(i = 0; i < 1024; i++) { + g_string_append_c(s, 'x'); + } + + if(strlen(s->str) != 1024) { + return FAILED("Incorrect string size, got: %s %d", s->str, + strlen(s->str)); + } + + g_string_free(s, TRUE); + + return OK; +} + +RESULT +test_gstring () +{ + GString *s = g_string_new_len ("My stuff", 2); + char *ret; + int i; + + if (strcmp (s->str, "My") != 0) + return "Expected only 'My' on the string"; + g_string_free (s, TRUE); + + s = g_string_new_len ("My\0\0Rest", 6); + if (s->str [2] != 0) + return "Null was not copied"; + if (strcmp (s->str+4, "Re") != 0){ + return "Did not find the 'Re' part"; + } + + g_string_append (s, "lalalalalalalalalalalalalalalalalalalalalalal"); + if (s->str [2] != 0) + return "Null as not copied"; + if (strncmp (s->str+4, "Relala", 6) != 0){ + return FAILED("Did not copy correctly, got: %s", s->str+4); + } + + g_string_free (s, TRUE); + + s = g_string_new (""); + for (i = 0; i < 1024; i++){ + g_string_append_c (s, 'x'); + } + if (strlen (s->str) != 1024){ + return FAILED("Incorrect string size, got: %s %d\n", s->str, strlen (s->str)); + } + g_string_free (s, TRUE); + + s = g_string_new ("hola"); + g_string_sprintfa (s, "%s%d", ", bola", 5); + if (strcmp (s->str, "hola, bola5") != 0){ + return FAILED("Incorrect data, got: %s\n", s->str); + } + g_string_free (s, TRUE); + + s = g_string_new ("Hola"); + g_string_printf (s, "Dingus"); + + /* Test that it does not release it */ + ret = g_string_free (s, FALSE); + g_free (ret); + + s = g_string_new_len ("H" "\000" "H", 3); + g_string_append_len (s, "1" "\000" "2", 3); + sfail ('H', 0); + sfail ( 0, 1); + sfail ('H', 2); + sfail ('1', 3); + sfail ( 0, 4); + sfail ('2', 5); + g_string_free (s, TRUE); + + return OK; +} + +RESULT +test_sized () +{ + GString *s = g_string_sized_new (20); + + if (s->str [0] != 0) + return FAILED ("Expected an empty string"); + if (s->len != 0) + return FAILED ("Expected an empty len"); + + g_string_free (s, TRUE); + + return NULL; +} + +RESULT +test_truncate () +{ + GString *s = g_string_new ("0123456789"); + g_string_truncate (s, 3); + + if (strlen (s->str) != 3) + return FAILED ("size of string should have been 3, instead it is [%s]\n", s->str); + g_string_free (s, TRUE); + + s = g_string_new ("a"); + s = g_string_truncate (s, 10); + if (strlen (s->str) != 1) + return FAILED ("The size is not 1"); + g_string_truncate (s, (gsize)-1); + if (strlen (s->str) != 1) + return FAILED ("The size is not 1"); + g_string_truncate (s, 0); + if (strlen (s->str) != 0) + return FAILED ("The size is not 0"); + + g_string_free (s, TRUE); + + return NULL; +} + +RESULT +test_prepend () +{ + GString *s = g_string_new ("dingus"); + g_string_prepend (s, "one"); + + if (strcmp (s->str, "onedingus") != 0) + return FAILED ("Failed, expected onedingus, got [%s]", s->str); + + g_string_free (s, TRUE); + + /* This is to force the code that where stuff does not fit in the allocated block */ + s = g_string_sized_new (1); + g_string_prepend (s, "one"); + if (strcmp (s->str, "one") != 0) + return FAILED ("Got erroneous result, expected [one] got [%s]", s->str); + g_string_free (s, TRUE); + + /* This is to force the path where things fit */ + s = g_string_new ("123123123123123123123123"); + g_string_truncate (s, 1); + if (strcmp (s->str, "1") != 0) + return FAILED ("Expected [1] string, got [%s]", s->str); + + g_string_prepend (s, "pre"); + if (strcmp (s->str, "pre1") != 0) + return FAILED ("Expected [pre1], got [%s]", s->str); + g_string_free (s, TRUE); + + return NULL; +} + +RESULT +test_appendlen () +{ + GString *s = g_string_new (""); + + g_string_append_len (s, "boo\000x", 0); + if (s->len != 0) + return FAILED ("The length is not zero %d", s->len); + g_string_append_len (s, "boo\000x", 5); + if (s->len != 5) + return FAILED ("The length is not five %d", s->len); + g_string_append_len (s, "ha", -1); + if (s->len != 7) + return FAILED ("The length is not seven %d", s->len); + + g_string_free (s, TRUE); + + return NULL; +} + +RESULT +test_macros () +{ + char *s = g_strdup (G_STRLOC); + char *p = strchr (s + 2, ':'); + int n; + + if (p == NULL) + return FAILED ("Did not find a separator"); + n = atoi (p+1); + if (n <= 0) + return FAILED ("did not find a valid line number"); + + *p = 0; + if (strcmp (s + strlen(s) - 8 , "string.c") != 0) + return FAILED ("This did not store the filename on G_STRLOC"); + + g_free (s); + return NULL; +} + +static Test string_tests [] = { + {"append-speed", test_append_speed}, + {"append_c-speed", test_append_c_speed}, + {"ctor+append", test_gstring }, + {"ctor+sized", test_sized }, + {"truncate", test_truncate }, + {"prepend", test_prepend }, + {"append_len", test_appendlen }, + {"macros", test_macros }, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(string_tests_init, string_tests) diff --git a/eglib/test/test.c b/eglib/test/test.c new file mode 100644 index 0000000000..6dd7bf4746 --- /dev/null +++ b/eglib/test/test.c @@ -0,0 +1,282 @@ +/* + * EGLib Unit Group/Test Runners + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include <config.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdarg.h> +#include <glib.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifdef G_OS_WIN32 +#include <winsock2.h> +#endif + +#include "test.h" + +extern gint global_passed, global_tests; + +#ifndef HAVE_VASPRINTF + /* systen does not provide a vasprintf function, use the one + provided within eglib itself */ +extern int vasprintf(char **ret, const char *format, va_list ap); +#endif + +static gchar *last_result = NULL; + +gboolean +run_test(Test *test, gchar **result_out) +{ + gchar *result; + + if((result = test->handler()) == NULL) { + *result_out = NULL; + return TRUE; + } else { + *result_out = result; + return FALSE; + } +} + +gboolean +run_group(Group *group, gint iterations, gboolean quiet, + gboolean time, gchar *tests_to_run_s) +{ + Test *tests = group->handler(); + gint i, j, passed = 0, total = 0; + gdouble start_time_group, start_time_test; + gchar **tests_to_run = NULL; + + if(!quiet) { + if(iterations > 1) { + printf("[%s] (%dx)\n", group->name, iterations); + } else { + printf("[%s]\n", group->name); + } + } + + if(tests_to_run_s != NULL) { + tests_to_run = eg_strsplit(tests_to_run_s, ",", -1); + } + + start_time_group = get_timestamp(); + + for(i = 0; tests[i].name != NULL; i++) { + gchar *result = ""; + gboolean iter_pass, run; + + iter_pass = FALSE; + if(tests_to_run != NULL) { + gint j; + run = FALSE; + for(j = 0; tests_to_run[j] != NULL; j++) { + if(strcmp(tests_to_run[j], tests[i].name) == 0) { + run = TRUE; + break; + } + } + } else { + run = TRUE; + } + + if(!run) { + continue; + } + + total++; + + if(!quiet) { + printf(" %s: ", tests[i].name); + } + + start_time_test = get_timestamp(); + + for(j = 0; j < iterations; j++) { + iter_pass = run_test(&(tests[i]), &result); + if(!iter_pass) { + break; + } + } + + if(iter_pass) { + passed++; + if(!quiet) { + if(time) { + printf("OK (%g)\n", get_timestamp() - start_time_test); + } else { + printf("OK\n"); + } + } + } else { + if(!quiet) { + printf("FAILED (%s)\n", result); + } + + if(last_result == result) { + last_result = NULL; + g_free(result); + } + } + } + + global_passed += passed; + global_tests += total; + + if(!quiet) { + gdouble pass_percentage = ((gdouble)passed / (gdouble)total) * 100.0; + if(time) { + printf(" %d / %d (%g%%, %g)\n", passed, total, + pass_percentage, get_timestamp() - start_time_group); + } else { + printf(" %d / %d (%g%%)\n", passed, total, pass_percentage); + } + } + + if(tests_to_run != NULL) { + eg_strfreev(tests_to_run); + } + + return passed == total; +} + +RESULT +FAILED(const gchar *format, ...) +{ + gchar *ret; + va_list args; + gint n; + +#if !defined(HAVE_VASPRINTF) && !defined(_EGLIB_MAJOR) + /* We are linked against the real glib, no vasprintf */ + g_assert_not_reached (); + return NULL; +#else + va_start(args, format); + n = vasprintf(&ret, format, args); + va_end(args); + + if(n == -1) { + last_result = NULL; + return NULL; + } + + last_result = ret; + return ret; +#endif +} + +gdouble +get_timestamp() +{ + /* FIXME: We should use g_get_current_time here */ + GTimeVal res; + g_get_current_time (&res); + return res.tv_sec + (1.e-6) * res.tv_usec; +} + +/* + * Duplicating code here from EGlib to avoid g_strsplit skew between + * EGLib and GLib + */ + +gchar ** +eg_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens) +{ + gchar *string_c; + gchar *strtok_save, **vector; + gchar *token, *token_c; + gint size = 1; + size_t token_length; + + g_return_val_if_fail(string != NULL, NULL); + g_return_val_if_fail(delimiter != NULL, NULL); + g_return_val_if_fail(delimiter[0] != 0, NULL); + + token_length = strlen(string); + string_c = (gchar *)g_malloc(token_length + 1); + memcpy(string_c, string, token_length); + string_c[token_length] = 0; + + vector = NULL; + token = (gchar *)strtok_r(string_c, delimiter, &strtok_save); + + while(token != NULL) { + token_length = strlen(token); + token_c = (gchar *)g_malloc(token_length + 1); + memcpy(token_c, token, token_length); + token_c[token_length] = 0; + + vector = vector == NULL ? + (gchar **)g_malloc(2 * sizeof(vector)) : + (gchar **)g_realloc(vector, (size + 1) * sizeof(vector)); + + vector[size - 1] = token_c; + size++; + + if(max_tokens > 0 && size >= max_tokens) { + if(size > max_tokens) { + break; + } + + token = strtok_save; + } else { + token = (gchar *)strtok_r(NULL, delimiter, &strtok_save); + } + } + + if(vector != NULL && size > 0) { + vector[size - 1] = NULL; + } + + g_free(string_c); + string_c = NULL; + + return vector; +} + +void +eg_strfreev (gchar **str_array) +{ + gchar **orig = str_array; + if (str_array == NULL) + return; + while (*str_array != NULL){ + g_free (*str_array); + str_array++; + } + g_free (orig); +} + + + diff --git a/eglib/test/test.h b/eglib/test/test.h new file mode 100644 index 0000000000..5c7275e007 --- /dev/null +++ b/eglib/test/test.h @@ -0,0 +1,82 @@ +/* + * EGLib Unit Group/Test Runners + * + * Author: + * Aaron Bockover (abockover@novell.com) + * + * (C) 2006 Novell, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef _TEST_H +#define _TEST_H + +#include <config.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <glib.h> + +#ifdef _MSC_VER +/* disable the following warnings + * C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. + * C4127: conditional expression is constant (test macros produce a lot of these) +*/ +#pragma warning(disable:4100 4127) +#endif + +typedef gchar * RESULT; + +typedef struct _Test Test; +typedef struct _Group Group; + +typedef gchar * (* RunTestHandler)(); +typedef Test * (* LoadGroupHandler)(); + +struct _Test { + const gchar *name; + RunTestHandler handler; +}; + +struct _Group { + const gchar *name; + LoadGroupHandler handler; +}; + +gboolean run_group(Group *group, gint iterations, gboolean quiet, + gboolean time, gchar *tests); +#undef FAILED +RESULT FAILED(const gchar *format, ...); +gdouble get_timestamp(); +gchar ** eg_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens); +void eg_strfreev (gchar **str_array); + +#define OK NULL + +#define DEFINE_TEST_GROUP_INIT(name, table) \ + Test * (name)() { return table; } + +#define DEFINE_TEST_GROUP_INIT_H(name) \ + Test * (name)(); + +#endif /* _TEST_H */ + + diff --git a/eglib/test/tests.h b/eglib/test/tests.h new file mode 100644 index 0000000000..fdca395724 --- /dev/null +++ b/eglib/test/tests.h @@ -0,0 +1,57 @@ +#include "test.h" + +DEFINE_TEST_GROUP_INIT_H(string_tests_init); +DEFINE_TEST_GROUP_INIT_H(strutil_tests_init); +DEFINE_TEST_GROUP_INIT_H(slist_tests_init); +DEFINE_TEST_GROUP_INIT_H(list_tests_init); +DEFINE_TEST_GROUP_INIT_H(hashtable_tests_init); +DEFINE_TEST_GROUP_INIT_H(ptrarray_tests_init); +DEFINE_TEST_GROUP_INIT_H(size_tests_init); +DEFINE_TEST_GROUP_INIT_H(fake_tests_init); +DEFINE_TEST_GROUP_INIT_H(array_tests_init); +DEFINE_TEST_GROUP_INIT_H(queue_tests_init); +DEFINE_TEST_GROUP_INIT_H(path_tests_init); +DEFINE_TEST_GROUP_INIT_H(shell_tests_init); +DEFINE_TEST_GROUP_INIT_H(spawn_tests_init); +DEFINE_TEST_GROUP_INIT_H(timer_tests_init); +DEFINE_TEST_GROUP_INIT_H(file_tests_init); +DEFINE_TEST_GROUP_INIT_H(pattern_tests_init); +DEFINE_TEST_GROUP_INIT_H(dir_tests_init); +DEFINE_TEST_GROUP_INIT_H(markup_tests_init); +DEFINE_TEST_GROUP_INIT_H(unicode_tests_init); +DEFINE_TEST_GROUP_INIT_H(utf8_tests_init); +DEFINE_TEST_GROUP_INIT_H(endian_tests_init); +DEFINE_TEST_GROUP_INIT_H(module_tests_init); +DEFINE_TEST_GROUP_INIT_H(memory_tests_init); + +static Group test_groups [] = { + {"string", string_tests_init}, + {"strutil", strutil_tests_init}, + {"ptrarray", ptrarray_tests_init}, + {"slist", slist_tests_init}, + {"list", list_tests_init}, + {"hashtable", hashtable_tests_init}, + {"sizes", size_tests_init}, + {"fake", fake_tests_init}, + {"array", array_tests_init}, + {"queue", queue_tests_init}, + {"path", path_tests_init}, + {"shell", shell_tests_init}, + {"markup", markup_tests_init}, +#if !DISABLE_PROCESS_TESTS + {"spawn", spawn_tests_init}, + {"module", module_tests_init}, +#endif +#if !DISABLE_FILESYSTEM_TESTS + {"file", file_tests_init}, +#endif + {"timer", timer_tests_init}, + {"pattern", pattern_tests_init}, + {"dir", dir_tests_init}, + {"unicode", unicode_tests_init}, + {"utf8", utf8_tests_init}, + {"endian", endian_tests_init}, + {"memory", memory_tests_init}, + {NULL, NULL} +}; + diff --git a/eglib/test/timer.c b/eglib/test/timer.c new file mode 100644 index 0000000000..7b41f8004c --- /dev/null +++ b/eglib/test/timer.c @@ -0,0 +1,55 @@ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <math.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <stdlib.h> +#include <stdio.h> + +#ifdef G_OS_WIN32 +#include <windows.h> +#define sleep(t) Sleep((t) * 1000) +#endif + +#include "test.h" + +RESULT +test_timer () +{ + GTimer *timer; + gdouble elapsed1, elapsed2; + gulong usec = 0; + + timer = g_timer_new (); + sleep (1); + elapsed1 = g_timer_elapsed (timer, NULL); + if ((elapsed1 + 0.1) < 1.0) + return FAILED ("Elapsed time should be around 1s and was %f", elapsed1); + + g_timer_stop (timer); + elapsed1 = g_timer_elapsed (timer, NULL); + elapsed2 = g_timer_elapsed (timer, &usec); + if (fabs (elapsed1 - elapsed2) > 0.000001) + return FAILED ("The elapsed times are not equal %f - %f.", elapsed1, elapsed2); + + elapsed2 *= 1000000; + while (elapsed2 > 1000000) + elapsed2 -= 1000000; + + if (fabs (usec - elapsed2) > 100.0) + return FAILED ("usecs are wrong."); + + g_timer_destroy (timer); + return OK; +} + +static Test timer_tests [] = { + {"g_timer", test_timer}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(timer_tests_init, timer_tests) + + diff --git a/eglib/test/unicode.c b/eglib/test/unicode.c new file mode 100644 index 0000000000..c1c3402ba8 --- /dev/null +++ b/eglib/test/unicode.c @@ -0,0 +1,99 @@ +#include "test.h" + +/* + * g_unichar_type + */ +RESULT +test_g_unichar_type () +{ + if (g_unichar_type ('A') != G_UNICODE_UPPERCASE_LETTER) + return FAILED ("#1"); + if (g_unichar_type ('a') != G_UNICODE_LOWERCASE_LETTER) + return FAILED ("#2"); + if (g_unichar_type ('1') != G_UNICODE_DECIMAL_NUMBER) + return FAILED ("#3"); + if (g_unichar_type (0xA3) != G_UNICODE_CURRENCY_SYMBOL) + return FAILED ("#4"); + return NULL; +} + +/* + * g_unichar_toupper + */ +RESULT +test_g_unichar_toupper () +{ + if (g_unichar_toupper (0) != 0) + return FAILED ("#0"); + if (g_unichar_toupper ('a') != 'A') + return FAILED ("#1"); + if (g_unichar_toupper ('1') != '1') + return FAILED ("#2"); + if (g_unichar_toupper (0x1C4) != 0x1C4) + return FAILED ("#3"); + if (g_unichar_toupper (0x1F2) != 0x1F1) + return FAILED ("#4"); + if (g_unichar_toupper (0x1F3) != 0x1F1) + return FAILED ("#5"); + if (g_unichar_toupper (0xFFFF) != 0xFFFF) + return FAILED ("#6"); + if (g_unichar_toupper (0x10428) != 0x10400) + return FAILED ("#7"); + return NULL; +} + +/* + * g_unichar_tolower + */ +RESULT +test_g_unichar_tolower () +{ + if (g_unichar_tolower (0) != 0) + return FAILED ("#0"); + if (g_unichar_tolower ('A') != 'a') + return FAILED ("#1"); + if (g_unichar_tolower ('1') != '1') + return FAILED ("#2"); + if (g_unichar_tolower (0x1C5) != 0x1C6) + return FAILED ("#3"); + if (g_unichar_tolower (0x1F1) != 0x1F3) + return FAILED ("#4"); + if (g_unichar_tolower (0x1F2) != 0x1F3) + return FAILED ("#5"); + if (g_unichar_tolower (0xFFFF) != 0xFFFF) + return FAILED ("#6"); + return NULL; +} + +/* + * g_unichar_totitle + */ +RESULT +test_g_unichar_totitle () +{ + if (g_unichar_toupper (0) != 0) + return FAILED ("#0"); + if (g_unichar_totitle ('a') != 'A') + return FAILED ("#1"); + if (g_unichar_totitle ('1') != '1') + return FAILED ("#2"); + if (g_unichar_totitle (0x1C4) != 0x1C5) + return FAILED ("#3"); + if (g_unichar_totitle (0x1F2) != 0x1F2) + return FAILED ("#4"); + if (g_unichar_totitle (0x1F3) != 0x1F2) + return FAILED ("#5"); + if (g_unichar_toupper (0xFFFF) != 0xFFFF) + return FAILED ("#6"); + return NULL; +} + +static Test unicode_tests [] = { + {"g_unichar_type", test_g_unichar_type}, + {"g_unichar_toupper", test_g_unichar_toupper}, + {"g_unichar_tolower", test_g_unichar_tolower}, + {"g_unichar_totitle", test_g_unichar_totitle}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(unicode_tests_init, unicode_tests) diff --git a/eglib/test/utf8.c b/eglib/test/utf8.c new file mode 100644 index 0000000000..e7f04059d5 --- /dev/null +++ b/eglib/test/utf8.c @@ -0,0 +1,791 @@ +#include "test.h" + +/* + * g_utf16_to_utf8 + */ + +glong +compare_strings_utf8_pos (const gchar *expected, const gchar *actual, glong size) +{ + int i; + for (i = 0; i < size; i++) + if (expected [i] != actual [i]) + return i; + return -1; +} + +RESULT +compare_strings_utf8_RESULT (const gchar *expected, const gchar *actual, glong size) +{ + glong ret; + + ret = compare_strings_utf8_pos (expected, actual, size); + if (ret < 0) + return OK; + return FAILED ("Incorrect output: expected '%s' but was '%s', differ at %d\n", expected, actual, ret); +} + +void +gchar_to_gunichar2 (gunichar2 ret[], const gchar *src) +{ + int i; + + for (i = 0; src [i]; i++) + ret [i] = src [i]; + ret [i] = 0; +} + +RESULT +compare_utf16_to_utf8_explicit (const gchar *expected, const gunichar2 *utf16, glong len_in, glong len_out, glong size_spec) +{ + GError *error; + gchar* ret; + RESULT result; + glong in_read, out_read; + + result = NULL; + + error = NULL; + ret = g_utf16_to_utf8 (utf16, size_spec, &in_read, &out_read, &error); + if (error) { + result = FAILED ("The error is %d %s\n", (error)->code, (error)->message); + g_error_free (error); + if (ret) + g_free (ret); + return result; + } + if (in_read != len_in) + result = FAILED ("Read size is incorrect: expected %d but was %d\n", len_in, in_read); + else if (out_read != len_out) + result = FAILED ("Converted size is incorrect: expected %d but was %d\n", len_out, out_read); + else + result = compare_strings_utf8_RESULT (expected, ret, len_out); + + g_free (ret); + if (result) + return result; + + return OK; +} + +RESULT +compare_utf16_to_utf8 (const gchar *expected, const gunichar2 *utf16, glong len_in, glong len_out) +{ + RESULT result; + + result = compare_utf16_to_utf8_explicit (expected, utf16, len_in, len_out, -1); + if (result != OK) + return result; + return compare_utf16_to_utf8_explicit (expected, utf16, len_in, len_out, len_in); +} + +RESULT +test_utf16_to_utf8 () +{ + const gchar *src0 = "", *src1 = "ABCDE", *src2 = "\xE5\xB9\xB4\x27", *src3 = "\xEF\xBC\xA1", *src4 = "\xEF\xBD\x81", *src5 = "\xF0\x90\x90\x80"; + gunichar2 str0 [] = {0}, str1 [6], str2 [] = {0x5E74, 39, 0}, str3 [] = {0xFF21, 0}, str4 [] = {0xFF41, 0}, str5 [] = {0xD801, 0xDC00, 0}; + RESULT result; + + gchar_to_gunichar2 (str1, src1); + + /* empty string */ + result = compare_utf16_to_utf8 (src0, str0, 0, 0); + if (result != OK) + return result; + + result = compare_utf16_to_utf8 (src1, str1, 5, 5); + if (result != OK) + return result; + result = compare_utf16_to_utf8 (src2, str2, 2, 4); + if (result != OK) + return result; + result = compare_utf16_to_utf8 (src3, str3, 1, 3); + if (result != OK) + return result; + result = compare_utf16_to_utf8 (src4, str4, 1, 3); + if (result != OK) + return result; + result = compare_utf16_to_utf8 (src5, str5, 2, 4); + if (result != OK) + return result; + + return OK; +} + +/* + * g_utf8_to_utf16 + */ + +glong +compare_strings_utf16_pos (const gunichar2 *expected, const gunichar2 *actual, glong size) +{ + int i; + for (i = 0; i < size; i++) + if (expected [i] != actual [i]) + return i; + return -1; +} + +RESULT +compare_strings_utf16_RESULT (const gunichar2 *expected, const gunichar2 *actual, glong size) +{ + glong ret; + + ret = compare_strings_utf16_pos (expected, actual, size); + if (ret < 0) + return OK; + return FAILED ("Incorrect output: expected '%s' but was '%s'\n", expected, actual); +} + +RESULT +compare_utf8_to_utf16_explicit (const gunichar2 *expected, const gchar *utf8, glong len_in, glong len_out, glong size_spec) +{ + GError *error; + gunichar2* ret; + RESULT result; + glong in_read, out_read; + + result = NULL; + + error = NULL; + ret = g_utf8_to_utf16 (utf8, size_spec, &in_read, &out_read, &error); + if (error) { + result = FAILED ("The error is %d %s\n", (error)->code, (error)->message); + g_error_free (error); + if (ret) + g_free (ret); + return result; + } + if (in_read != len_in) + result = FAILED ("Read size is incorrect: expected %d but was %d\n", len_in, in_read); + else if (out_read != len_out) + result = FAILED ("Converted size is incorrect: expected %d but was %d\n", len_out, out_read); + else + result = compare_strings_utf16_RESULT (expected, ret, len_out); + + g_free (ret); + if (result) + return result; + + return OK; +} + + +RESULT +compare_utf8_to_utf16 (const gunichar2 *expected, const gchar *utf8, glong len_in, glong len_out) +{ + RESULT result; + + result = compare_utf8_to_utf16_explicit (expected, utf8, len_in, len_out, -1); + if (result != OK) + return result; + return compare_utf8_to_utf16_explicit (expected, utf8, len_in, len_out, len_in); +} + +RESULT +test_utf8_seq () +{ + const gchar *src = "\xE5\xB9\xB4\x27"; + glong in_read, out_read; + //gunichar2 expected [6]; + GError *error = NULL; + gunichar2 *dst; + + printf ("got: %s\n", src); + dst = g_utf8_to_utf16 (src, (glong)strlen (src), &in_read, &out_read, &error); + if (error != NULL){ + return error->message; + } + + if (in_read != 4) { + return FAILED ("in_read is expected to be 4 but was %d\n", in_read); + } + if (out_read != 2) { + return FAILED ("out_read is expected to be 2 but was %d\n", out_read); + } + g_free (dst); + + return OK; +} + +RESULT +test_utf8_to_utf16 () +{ + const gchar *src0 = "", *src1 = "ABCDE", *src2 = "\xE5\xB9\xB4\x27", *src3 = "\xEF\xBC\xA1", *src4 = "\xEF\xBD\x81"; + gunichar2 str0 [] = {0}, str1 [6], str2 [] = {0x5E74, 39, 0}, str3 [] = {0xFF21, 0}, str4 [] = {0xFF41, 0}; + RESULT result; + + gchar_to_gunichar2 (str1, src1); + + /* empty string */ + result = compare_utf8_to_utf16 (str0, src0, 0, 0); + if (result != OK) + return result; + + result = compare_utf8_to_utf16 (str1, src1, 5, 5); + if (result != OK) + return result; + result = compare_utf8_to_utf16 (str2, src2, 4, 2); + if (result != OK) + return result; + result = compare_utf8_to_utf16 (str3, src3, 3, 1); + if (result != OK) + return result; + result = compare_utf8_to_utf16 (str4, src4, 3, 1); + if (result != OK) + return result; + + return OK; +} + +RESULT +test_convert () +{ + gsize n; + char *s = g_convert ("\242\241\243\242\241\243\242\241\243\242\241\243", -1, "UTF-8", "ISO-8859-1", NULL, &n, NULL); + guchar *u = (guchar *) s; + + if (!s) + return FAILED ("Expected 24 bytes, got: NULL"); + + if (strlen (s) != 24) + return FAILED ("Expected 24 bytes, got: %d", strlen (s)); + + if (u [1] != 162 || u [2] != 194 || + u [3] != 161 || u [4] != 194 || + u [5] != 163 || u [6] != 194) + return FAILED ("Incorrect conversion"); + + g_free (s); + + return OK; +} + + +RESULT +test_xdigit () +{ + static char test_chars[] = { + '0', '1', '2', '3', '4', + '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'A', 'B', 'C', 'D', 'E', 'F', 'G'}; + static gint32 test_values[] = { + 0, 1, 2, 3, 4, + 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, -1, + 10, 11, 12, 13, 14, 15, -1}; + + int i =0; + + for (i = 0; i < sizeof(test_chars); i++) + if (g_unichar_xdigit_value ((gunichar)test_chars[i]) != test_values[i]) + return FAILED("Incorrect value %d at index %d", test_values[i], i); + + return OK; +} + +static RESULT +ucs4_to_utf16_check_result (const gunichar2 *result_str, const gunichar2 *expected_str, + glong result_items_read, glong expected_items_read, + glong result_items_written, glong expected_items_written, + GError* result_error, gboolean expect_error) +{ + glong i; + if (result_items_read != expected_items_read) + return FAILED("Incorrect number of items read %d", result_items_read); + if (result_items_written != expected_items_written) + return FAILED("Incorrect number of items written %d", result_items_written); + if (result_error && !expect_error) + return FAILED("There should not be an error code."); + if (!result_error && expect_error) + return FAILED("Unexpected error object."); + if (expect_error && result_str) + return FAILED("NULL should be returned when an error occurs."); + if (!expect_error && !result_str) + return FAILED("When no error occurs NULL should not be returned."); + for (i=0; i<expected_items_written;i++) { + if (result_str [i] != expected_str [i]) + return FAILED("Incorrect value %d at index %d", result_str [i], i); + } + if (result_str && result_str[expected_items_written] != '\0') + return FAILED("Null termination not found at the end of the string."); + + return OK; +} + +RESULT +test_ucs4_to_utf16 () +{ + static gunichar str1[12] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; + static gunichar2 exp1[12] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; + static gunichar str2[3] = {'h',0x80000000,'\0'}; + static gunichar2 exp2[2] = {'h','\0'}; + static gunichar str3[3] = {'h',0xDA00,'\0'}; + static gunichar str4[3] = {'h',0x10FFFF,'\0'}; + static gunichar2 exp4[4] = {'h',0xdbff,0xdfff,'\0'}; + static gunichar str5[7] = {0xD7FF,0xD800,0xDFFF,0xE000,0x110000,0x10FFFF,'\0'}; + static gunichar2 exp5[5] = {0xD7FF,0xE000,0xdbff,0xdfff,'\0'}; + static gunichar str6[2] = {0x10400, '\0'}; + static gunichar2 exp6[3] = {0xD801, 0xDC00, '\0'}; + static glong read_write[12] = {1,1,0,0,0,0,1,1,0,0,1,2}; + gunichar2* res; + glong items_read, items_written, current_write_index; + GError* err=0; + RESULT check_result; + glong i; + + res = g_ucs4_to_utf16 (str1, 12, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, exp1, items_read, 11, items_written, 11, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_ucs4_to_utf16 (str2, 0, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, exp2, items_read, 0, items_written, 0, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_ucs4_to_utf16 (str2, 1, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, exp2, items_read, 1, items_written, 1, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_ucs4_to_utf16 (str2, 2, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, 0, items_read, 1, items_written, 0, err, TRUE); + g_free (res); + if (check_result) return check_result; + + items_read = items_written = 0; + err = 0; + res = g_ucs4_to_utf16 (str3, 2, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, 0, items_read, 1, items_written, 0, err, TRUE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + err = 0; + res = g_ucs4_to_utf16 (str4, 5, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, exp4, items_read, 2, items_written, 3, err, FALSE); + if (check_result) return check_result; + g_free (res); + + // This loop tests the bounds of the conversion algorithm + current_write_index = 0; + for (i=0;i<6;i++) { + items_read = items_written = 0; + err = 0; + res = g_ucs4_to_utf16 (&str5[i], 1, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, &exp5[current_write_index], + items_read, read_write[i*2], items_written, read_write[(i*2)+1], err, !read_write[(i*2)+1]); + if (check_result) return check_result; + g_free (res); + current_write_index += items_written; + } + + items_read = items_written = 0; + err = 0; + res = g_ucs4_to_utf16 (str6, 1, &items_read, &items_written, &err); + check_result = ucs4_to_utf16_check_result (res, exp6, items_read, 1, items_written, 2, err, FALSE); + if (check_result) return check_result; + g_free (res); + + return OK; +} + +static RESULT +utf16_to_ucs4_check_result (const gunichar *result_str, const gunichar *expected_str, + glong result_items_read, glong expected_items_read, + glong result_items_written, glong expected_items_written, + GError* result_error, gboolean expect_error) +{ + glong i; + if (result_items_read != expected_items_read) + return FAILED("Incorrect number of items read %d", result_items_read); + if (result_items_written != expected_items_written) + return FAILED("Incorrect number of items written %d", result_items_written); + if (result_error && !expect_error) + return FAILED("There should not be an error code."); + if (!result_error && expect_error) + return FAILED("Unexpected error object."); + if (expect_error && result_str) + return FAILED("NULL should be returned when an error occurs."); + if (!expect_error && !result_str) + return FAILED("When no error occurs NULL should not be returned."); + for (i=0; i<expected_items_written;i++) { + if (result_str [i] != expected_str [i]) + return FAILED("Incorrect value %d at index %d", result_str [i], i); + } + if (result_str && result_str[expected_items_written] != '\0') + return FAILED("Null termination not found at the end of the string."); + + return OK; +} + +RESULT +test_utf16_to_ucs4 () +{ + static gunichar2 str1[12] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; + static gunichar exp1[12] = {'H','e','l','l','o',' ','W','o','r','l','d','\0'}; + static gunichar2 str2[7] = {'H', 0xD800, 0xDC01,0xD800,0xDBFF,'l','\0'}; + static gunichar exp2[3] = {'H',0x00010001,'\0'}; + static gunichar2 str3[4] = {'H', 0xDC00 ,'l','\0'}; + static gunichar exp3[2] = {'H','\0'}; + static gunichar2 str4[20] = {0xDC00,0xDFFF,0xDFF,0xD800,0xDBFF,0xD800,0xDC00,0xD800,0xDFFF, + 0xD800,0xE000,0xDBFF,0xDBFF,0xDBFF,0xDC00,0xDBFF,0xDFFF,0xDBFF,0xE000,'\0'}; + static gunichar exp4[6] = {0xDFF,0x10000,0x103ff,0x10fc00,0x10FFFF,'\0'}; + static gunichar2 str5[3] = {0xD801, 0xDC00, 0}; + static gunichar exp5[2] = {0x10400, 0}; + static glong read_write[33] = {1,0,0,1,0,0,1,1,1,2,1,0,2,2,1,2,2,1,2,1,0,2,1,0,2,2,1,2,2,1,2,1,0}; + gunichar* res; + glong items_read, items_written, current_read_index,current_write_index; + GError* err=0; + RESULT check_result; + glong i; + + res = g_utf16_to_ucs4 (str1, 12, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp1, items_read, 11, items_written, 11, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 0, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 0, items_written, 0, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 1, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 1, items_written, 1, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 2, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 1, items_written, 1, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 3, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 3, items_written, 2, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 4, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 3, items_written, 2, err, FALSE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + res = g_utf16_to_ucs4 (str2, 5, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp2, items_read, 4, items_written, 0, err, TRUE); + if (check_result) return check_result; + g_free (res); + + items_read = items_written = 0; + err = 0; + res = g_utf16_to_ucs4 (str3, 5, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp3, items_read, 1, items_written, 0, err, TRUE); + if (check_result) return check_result; + g_free (res); + + // This loop tests the bounds of the conversion algorithm + current_read_index = current_write_index = 0; + for (i=0;i<11;i++) { + items_read = items_written = 0; + err = 0; + res = g_utf16_to_ucs4 (&str4[current_read_index], read_write[i*3], &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, &exp4[current_write_index], items_read, + read_write[(i*3)+1], items_written, read_write[(i*3)+2], err, + !read_write[(i*3)+2]); + if (check_result) return check_result; + g_free (res); + current_read_index += read_write[i*3]; + current_write_index += items_written; + } + + items_read = items_written = 0; + err = 0; + res = g_utf16_to_ucs4 (str5, 2, &items_read, &items_written, &err); + check_result = utf16_to_ucs4_check_result (res, exp5, items_read, 2, items_written, 1, err, FALSE); + if (check_result) return check_result; + g_free (res); + + return OK; +} +RESULT +test_utf8_strlen () +{ + gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'};//Valid, len = 5 + gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'};//Valid, len = 5 + gchar word3 [] = {'h','e',0xC2, 0x82,0x45,'\0'}; //Valid, len = 4 + gchar word4 [] = {0x62,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5 + + glong len = 0; + + //Test word1 + len = g_utf8_strlen (word1,-1); + if (len != 5) + return FAILED ("Word1 expected length of 5, but was %i", len); + //Do tests with different values for max parameter. + len = g_utf8_strlen (word1,1); + if (len != 0) + return FAILED ("Word1, max = 1, expected length of 0, but was %i", len); + len = g_utf8_strlen (word1,2); + if (len != 1) + return FAILED ("Word1, max = 1, expected length of 1, but was %i", len); + len = g_utf8_strlen (word1,3); + if (len != 2) + return FAILED ("Word1, max = 2, expected length of 2, but was %i", len); + + //Test word2 + len = g_utf8_strlen (word2,-1); + if (len != 5) + return FAILED ("Word2 expected length of 5, but was %i", len); + + //Test word3 + len = g_utf8_strlen (word3,-1); + if (len != 4) + return FAILED ("Word3 expected length of 4, but was %i", len); + + //Test word4 + len = g_utf8_strlen (word4,-1); + if (len != 5) + return FAILED ("Word4 expected length of 5, but was %i", len); + + //Test null case + len = g_utf8_strlen(NULL,0); + if (len != 0) + return FAILED ("Expected passing null to result in a length of 0"); + return OK; +} + +RESULT +test_utf8_get_char() +{ + gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5 + + gunichar value = g_utf8_get_char (&word1 [0]); + if (value != 0x82UL) + return FAILED ("Expected value of 0x82, but was %x", value); + value = g_utf8_get_char (&word1 [2]); + if (value != 0x45UL) + return FAILED ("Expected value of 0x45, but was %x", value); + value = g_utf8_get_char (&word1 [3]); + if (value != 0x1043UL) + return FAILED ("Expected value of 0x1043, but was %x", value); + value = g_utf8_get_char (&word1 [6]); + if (value != 0x58UL) + return FAILED ("Expected value of 0x58, but was %x", value); + value = g_utf8_get_char (&word1 [7]); + if (value != 0x42082UL) + return FAILED ("Expected value of 0x42082, but was %x", value); + + return OK; +} + +RESULT +test_utf8_next_char() +{ + gchar word1 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid, len = 5 + gchar word2 [] = {0xF1, 0x82, 0x82, 0x82,0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Valid, len = 5 + gchar word1ExpectedValues [] = {0xC2, 0x45,0xE1, 0x58, 0xF1}; + gchar word2ExpectedValues [] = {0xF1, 0xC2, 0x45, 0xE1, 0x58}; + + gchar* ptr = word1; + gint count = 0; + //Test word1 + while (*ptr != 0) { + if (count > 4) + return FAILED ("Word1 has gone past its expected length"); + if (*ptr != word1ExpectedValues[count]) + return FAILED ("Word1 has an incorrect next_char at index %i", count); + ptr = g_utf8_next_char (ptr); + count++; + } + + //Test word2 + count = 0; + ptr = word2; + while (*ptr != 0) { + if (count > 4) + return FAILED ("Word2 has gone past its expected length"); + if (*ptr != word2ExpectedValues[count]) + return FAILED ("Word2 has an incorrect next_char at index %i", count); + ptr = g_utf8_next_char (ptr); + count++; + } + + return OK; +} + +RESULT +test_utf8_validate() +{ + gchar invalidWord1 [] = {0xC3, 0x82, 0xC1,0x90,'\0'}; //Invalid, 1nd oct Can't be 0xC0 or 0xC1 + gchar invalidWord2 [] = {0xC1, 0x89, 0x60, '\0'}; //Invalid, 1st oct can not be 0xC1 + gchar invalidWord3 [] = {0xC2, 0x45,0xE1, 0x81, 0x83,0x58,'\0'}; //Invalid, oct after 0xC2 must be > 0x80 + + gchar validWord1 [] = {0xC2, 0x82, 0xC3,0xA0,'\0'}; //Valid + gchar validWord2 [] = {0xC2, 0x82,0x45,0xE1, 0x81, 0x83,0x58,0xF1, 0x82, 0x82, 0x82,'\0'}; //Valid + + const gchar* end; + gboolean retVal = g_utf8_validate (invalidWord1, -1, &end); + if (retVal != FALSE) + return FAILED ("Expected invalidWord1 to be invalid"); + if (end != &invalidWord1 [2]) + return FAILED ("Expected end parameter to be pointing to invalidWord1[2]"); + + end = NULL; + retVal = g_utf8_validate (invalidWord2, -1, &end); + if (retVal != FALSE) + return FAILED ("Expected invalidWord2 to be invalid"); + if (end != &invalidWord2 [0]) + return FAILED ("Expected end parameter to be pointing to invalidWord2[0]"); + + end = NULL; + retVal = g_utf8_validate (invalidWord3, -1, &end); + if (retVal != FALSE) + return FAILED ("Expected invalidWord3 to be invalid"); + if (end != &invalidWord3 [0]) + return FAILED ("Expected end parameter to be pointing to invalidWord3[1]"); + + end = NULL; + retVal = g_utf8_validate (validWord1, -1, &end); + if (retVal != TRUE) + return FAILED ("Expected validWord1 to be valid"); + if (end != &validWord1 [4]) + return FAILED ("Expected end parameter to be pointing to validWord1[4]"); + + end = NULL; + retVal = g_utf8_validate (validWord2, -1, &end); + if (retVal != TRUE) + return FAILED ("Expected validWord2 to be valid"); + if (end != &validWord2 [11]) + return FAILED ("Expected end parameter to be pointing to validWord2[11]"); + return OK; +} + +glong +utf8_byteslen (const gchar *src) +{ + int i = 0; + do { + if (src [i] == '\0') + return i; + i++; + } while (TRUE); +} + +RESULT +test_utf8_strcase_each (const gchar *src, const gchar *expected, gboolean strup) +{ + gchar *tmp; + glong len, len2; + RESULT r; + + len = utf8_byteslen (src); + tmp = strup ? g_utf8_strup (src, len) : g_utf8_strdown (src, len); + len2 = utf8_byteslen (tmp); + r = compare_strings_utf8_RESULT (expected, tmp, len < len2 ? len2 : len); + g_free (tmp); + return r; +} + +RESULT +test_utf8_strup_each (const gchar *src, const gchar *expected) +{ + return test_utf8_strcase_each (src, expected, TRUE); +} + +RESULT +test_utf8_strdown_each (const gchar *src, const gchar *expected) +{ + return test_utf8_strcase_each (src, expected, FALSE); +} + +/* + * g_utf8_strup + */ +RESULT +test_utf8_strup () +{ + RESULT r; + + if ((r = test_utf8_strup_each ("aBc", "ABC")) != OK) + return r; + if ((r = test_utf8_strup_each ("x86-64", "X86-64")) != OK) + return r; + // U+3B1 U+392 -> U+391 U+392 + if ((r = test_utf8_strup_each ("\xCE\xB1\xCE\x92", "\xCE\x91\xCE\x92")) != OK) + return r; + // U+FF21 -> U+FF21 + if ((r = test_utf8_strup_each ("\xEF\xBC\xA1", "\xEF\xBC\xA1")) != OK) + return r; + // U+FF41 -> U+FF21 + if ((r = test_utf8_strup_each ("\xEF\xBD\x81", "\xEF\xBC\xA1")) != OK) + return r; + // U+10428 -> U+10400 + if ((r = test_utf8_strup_each ("\xF0\x90\x90\xA8", "\xF0\x90\x90\x80")) != OK) + return r; + + return OK; +} + +/* + * g_utf8_strdown + */ +RESULT +test_utf8_strdown () +{ + RESULT r; + + if ((r = test_utf8_strdown_each ("aBc", "abc")) != OK) + return r; + if ((r = test_utf8_strdown_each ("X86-64", "x86-64")) != OK) + return r; + // U+391 U+3B2 -> U+3B1 U+3B2 + if ((r = test_utf8_strdown_each ("\xCE\x91\xCE\xB2", "\xCE\xB1\xCE\xB2")) != OK) + return r; +/* + // U+FF41 -> U+FF41 + if ((r = test_utf8_strdown_each ("\xEF\xBC\x81", "\xEF\xBC\x81")) != OK) + return r; + // U+FF21 -> U+FF41 + if ((r = test_utf8_strdown_each ("\xEF\xBC\xA1", "\xEF\xBD\x81")) != OK) + return r; + // U+10400 -> U+10428 + if ((r = test_utf8_strdown_each ("\xF0\x90\x90\x80", "\xF0\x90\x90\xA8")) != OK) + return r; +*/ + return OK; +} + +/* + * test initialization + */ + +static Test utf8_tests [] = { + {"g_utf16_to_utf8", test_utf16_to_utf8}, + {"g_utf8_to_utf16", test_utf8_to_utf16}, + {"g_utf8_seq", test_utf8_seq}, + {"g_convert", test_convert }, + {"g_unichar_xdigit_value", test_xdigit }, + {"g_ucs4_to_utf16", test_ucs4_to_utf16 }, + {"g_utf16_to_ucs4", test_utf16_to_ucs4 }, + {"g_utf8_strlen", test_utf8_strlen }, + {"g_utf8_get_char", test_utf8_get_char }, + {"g_utf8_next_char", test_utf8_next_char }, + {"g_utf8_validate", test_utf8_validate }, + {"g_utf8_strup", test_utf8_strup}, + {"g_utf8_strdown", test_utf8_strdown}, + {NULL, NULL} +}; + +DEFINE_TEST_GROUP_INIT(utf8_tests_init, utf8_tests) + + |