aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-07 10:15:41 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-07 10:15:41 +0000
commitcb467898be6270f34892aab862db49cc3bb169cb (patch)
tree45b71714f019bc4e375501faa00ced22625ddf83
parent654ac10fea60f352a7f79955f93ea8da75517638 (diff)
downloadlcd4linux-cb467898be6270f34892aab862db49cc3bb169cb.tar.gz
[lcd4linux @ 2004-01-07 10:15:41 by reinelt]
small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@295 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r--cfg.c67
-rw-r--r--config.h.in394
-rw-r--r--evaluator.c9
-rwxr-xr-xlibtool150
4 files changed, 436 insertions, 184 deletions
diff --git a/cfg.c b/cfg.c
index 1fc5830..7f73c77 100644
--- a/cfg.c
+++ b/cfg.c
@@ -1,4 +1,4 @@
-/* $Id: cfg.c,v 1.19 2003/12/19 05:35:14 reinelt Exp $^
+/* $Id: cfg.c,v 1.20 2004/01/07 10:15:41 reinelt Exp $^
*
* config file stuff
*
@@ -22,6 +22,11 @@
*
*
* $Log: cfg.c,v $
+ * Revision 1.20 2004/01/07 10:15:41 reinelt
+ * small glitch in evaluator fixed
+ * made config table sorted and access with bsearch(),
+ * which should be much faster
+ *
* Revision 1.19 2003/12/19 05:35:14 reinelt
* renamed 'client' to 'plugin'
*
@@ -159,6 +164,26 @@ static ENTRY *Config=NULL;
static int nConfig=0;
+// bsearch compare function for config entries
+static int c_lookup (const void *a, const void *b)
+{
+ char *key=(char*)a;
+ ENTRY *entry=(ENTRY*)b;
+
+ return strcasecmp(key, entry->key);
+}
+
+
+// qsort compare function for variables
+static int c_sort (const void *a, const void *b)
+{
+ ENTRY *ea=(ENTRY*)a;
+ ENTRY *eb=(ENTRY*)b;
+
+ return strcasecmp(ea->key, eb->key);
+}
+
+
static char *strip (char *s, int strip_comments)
{
char *p;
@@ -196,21 +221,25 @@ static char *dequote (char *string)
static void cfg_add (char *key, char *val, int lock)
{
- int i;
-
- for (i=0; i<nConfig; i++) {
- if (strcasecmp(Config[i].key, key)==0) {
- if (Config[i].lock>lock) return;
- if (Config[i].val) free (Config[i].val);
- Config[i].val=dequote(strdup(val));
- return;
- }
+ ENTRY *entry;
+
+ entry=bsearch(key, Config, nConfig, sizeof(ENTRY), c_lookup);
+
+ if (entry!=NULL) {
+ if (entry->lock>lock) return;
+ if (entry->val) free (entry->val);
+ entry->val=dequote(strdup(val));
+ return;
}
+
nConfig++;
Config=realloc(Config, nConfig*sizeof(ENTRY));
- Config[i].key=strdup(key);
- Config[i].val=dequote(strdup(val));
- Config[i].lock=lock;
+ Config[nConfig-1].key=strdup(key);
+ Config[nConfig-1].val=dequote(strdup(val));
+ Config[nConfig-1].lock=lock;
+
+ qsort(Config, nConfig, sizeof(ENTRY), c_sort);
+
}
@@ -235,13 +264,13 @@ int l4l_cfg_cmd (char *arg)
char *l4l_cfg_get (char *key, char *defval)
{
- int i;
+ ENTRY *entry;
+
+ entry=bsearch(key, Config, nConfig, sizeof(ENTRY), c_lookup);
+
+ if (entry!=NULL)
+ return entry->val;
- for (i=0; i<nConfig; i++) {
- if (strcasecmp(Config[i].key, key)==0) {
- return Config[i].val;
- }
- }
return defval;
}
diff --git a/config.h.in b/config.h.in
index 73af4ed..8247105 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,316 +1,496 @@
/* config.h.in. Generated from configure.in by autoheader. */
-/* Found some version of curses that we're going to use */
+/*
+ Found some version of curses that we're going
+ to use */
#undef HAS_CURSES
-/* Define to 1 if you have the <asm/io.h> header file. */
+/*
+ Define to 1 if you have the <asm/io.h>
+ header file. */
#undef HAVE_ASM_IO_H
-/* Define to 1 if you have the <asm/msr.h> header file. */
+/*
+ Define to 1 if you have the <asm/msr.h>
+ header file. */
#undef HAVE_ASM_MSR_H
-/* Define to 1 if you have the `atexit' function. */
+/*
+ Define to 1 if you have the `atexit'
+ function. */
#undef HAVE_ATEXIT
-/* Define to 1 if you have the <dlfcn.h> header file. */
+/*
+ Define to 1 if you have the <dlfcn.h>
+ header file. */
#undef HAVE_DLFCN_H
-/* Define to 1 if you have the `dup2' function. */
+/*
+ Define to 1 if you have the `dup2'
+ function. */
#undef HAVE_DUP2
-/* Define to 1 if you have the <fcntl.h> header file. */
+/*
+ Define to 1 if you have the <fcntl.h>
+ header file. */
#undef HAVE_FCNTL_H
-/* Define to 1 if you have the `fork' function. */
+/*
+ Define to 1 if you have the `fork'
+ function. */
#undef HAVE_FORK
-/* Define to 1 if you have the <gd/gd.h> header file. */
+/*
+ Define to 1 if you have the <gd/gd.h>
+ header file. */
#undef HAVE_GD_GD_H
-/* Define to 1 if you have the <gd.h> header file. */
+/*
+ Define to 1 if you have the <gd.h>
+ header file. */
#undef HAVE_GD_H
-/* Define to 1 if you have the `gethostbyname' function. */
+/*
+ Define to 1 if you have the `gethostbyname'
+ function. */
#undef HAVE_GETHOSTBYNAME
-/* Define to 1 if you have the `gettimeofday' function. */
+/*
+ Define to 1 if you have the `gettimeofday'
+ function. */
#undef HAVE_GETTIMEOFDAY
-/* Define to 1 if you have the <inttypes.h> header file. */
+/*
+ Define to 1 if you have the <inttypes.h>
+ header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the `m' library (-lm). */
+/*
+ Define to 1 if you have the `m'
+ library (-lm). */
#undef HAVE_LIBM
-/* Define to 1 if you have the <linux/dvb/frontend.h> header file. */
+/*
+ Define to 1 if you have the <linux/dvb/frontend.h>
+ header file. */
#undef HAVE_LINUX_DVB_FRONTEND_H
-/* Define to 1 if you have the <linux/parport.h> header file. */
+/*
+ Define to 1 if you have the <linux/parport.h>
+ header file. */
#undef HAVE_LINUX_PARPORT_H
-/* Define to 1 if you have the <linux/ppdev.h> header file. */
+/*
+ Define to 1 if you have the <linux/ppdev.h>
+ header file. */
#undef HAVE_LINUX_PPDEV_H
-/* Define to 1 if you have the <malloc.h> header file. */
+/*
+ Define to 1 if you have the <malloc.h>
+ header file. */
#undef HAVE_MALLOC_H
-/* Define to 1 if you have the `memmove' function. */
+/*
+ Define to 1 if you have the `memmove'
+ function. */
#undef HAVE_MEMMOVE
-/* Define to 1 if you have the <memory.h> header file. */
+/*
+ Define to 1 if you have the <memory.h>
+ header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have the `memset' function. */
+/*
+ Define to 1 if you have the `memset'
+ function. */
#undef HAVE_MEMSET
-/* Define to 1 if you have the <netdb.h> header file. */
+/*
+ Define to 1 if you have the <netdb.h>
+ header file. */
#undef HAVE_NETDB_H
-/* Define to 1 if you have the <netinet/in.h> header file. */
+/*
+ Define to 1 if you have the <netinet/in.h>
+ header file. */
#undef HAVE_NETINET_IN_H
-/* Define to 1 if you have the <net/if_ppp.h> header file. */
+/*
+ Define to 1 if you have the <net/if_ppp.h>
+ header file. */
#undef HAVE_NET_IF_PPP_H
-/* Define to 1 if you have the `pow' function. */
+/*
+ Define to 1 if you have the `pow'
+ function. */
#undef HAVE_POW
-/* Define to 1 if you have the `putenv' function. */
+/*
+ Define to 1 if you have the `putenv'
+ function. */
#undef HAVE_PUTENV
-/* Define to 1 if you have the `select' function. */
+/*
+ Define to 1 if you have the `select'
+ function. */
#undef HAVE_SELECT
-/* Define to 1 if you have the `socket' function. */
+/*
+ Define to 1 if you have the `socket'
+ function. */
#undef HAVE_SOCKET
-/* Define to 1 if you have the `sqrt' function. */
+/*
+ Define to 1 if you have the `sqrt'
+ function. */
#undef HAVE_SQRT
-/* Define to 1 if `stat' has the bug that it succeeds when given the
- zero-length file name argument. */
+/*
+ Define to 1 if `stat' has the bug
+ that it succeeds when given the zero-length file name
+ argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
-/* Define to 1 if you have the <stdint.h> header file. */
+/*
+ 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. */
+/*
+ Define to 1 if you have the <stdlib.h>
+ header file. */
#undef HAVE_STDLIB_H
-/* Define to 1 if you have the `strcasecmp' function. */
+/*
+ Define to 1 if you have the `strcasecmp'
+ function. */
#undef HAVE_STRCASECMP
-/* Define to 1 if you have the `strchr' function. */
+/*
+ Define to 1 if you have the `strchr'
+ function. */
#undef HAVE_STRCHR
-/* Define to 1 if you have the `strdup' function. */
+/*
+ Define to 1 if you have the `strdup'
+ function. */
#undef HAVE_STRDUP
-/* Define to 1 if you have the `strerror' function. */
+/*
+ Define to 1 if you have the `strerror'
+ function. */
#undef HAVE_STRERROR
-/* Define to 1 if you have the <strings.h> header file. */
+/*
+ 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. */
+/*
+ Define to 1 if you have the <string.h>
+ header file. */
#undef HAVE_STRING_H
-/* Define to 1 if you have the `strncasecmp' function. */
+/*
+ Define to 1 if you have the `strncasecmp'
+ function. */
#undef HAVE_STRNCASECMP
-/* Define to 1 if you have the `strndup' function. */
+/*
+ Define to 1 if you have the `strndup'
+ function. */
#undef HAVE_STRNDUP
-/* Define to 1 if you have the `strpbrk' function. */
+/*
+ Define to 1 if you have the `strpbrk'
+ function. */
#undef HAVE_STRPBRK
-/* Define to 1 if you have the `strstr' function. */
+/*
+ Define to 1 if you have the `strstr'
+ function. */
#undef HAVE_STRSTR
-/* Define to 1 if you have the `strtol' function. */
+/*
+ Define to 1 if you have the `strtol'
+ function. */
#undef HAVE_STRTOL
-/* Define to 1 if you have the <syslog.h> header file. */
+/*
+ Define to 1 if you have the <syslog.h>
+ header file. */
#undef HAVE_SYSLOG_H
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/*
+ Define to 1 if you have the <sys/ioctl.h>
+ header file. */
#undef HAVE_SYS_IOCTL_H
-/* Define to 1 if you have the <sys/io.h> header file. */
+/*
+ Define to 1 if you have the <sys/io.h>
+ header file. */
#undef HAVE_SYS_IO_H
-/* Define to 1 if you have the <sys/param.h> header file. */
+/*
+ Define to 1 if you have the <sys/param.h>
+ header file. */
#undef HAVE_SYS_PARAM_H
-/* Define to 1 if you have the <sys/select.h> header file. */
+/*
+ Define to 1 if you have the <sys/select.h>
+ header file. */
#undef HAVE_SYS_SELECT_H
-/* Define to 1 if you have the <sys/socket.h> header file. */
+/*
+ Define to 1 if you have the <sys/socket.h>
+ header file. */
#undef HAVE_SYS_SOCKET_H
-/* Define to 1 if you have the <sys/stat.h> header file. */
+/*
+ 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. */
+/*
+ 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. */
+/*
+ Define to 1 if you have the <sys/types.h>
+ header file. */
#undef HAVE_SYS_TYPES_H
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+/*
+ Define to 1 if you have <sys/wait.h> that
+ is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
-/* Define to 1 if you have the <termios.h> header file. */
+/*
+ Define to 1 if you have the <termios.h>
+ header file. */
#undef HAVE_TERMIOS_H
-/* Define to 1 if you have the `uname' function. */
+/*
+ Define to 1 if you have the `uname'
+ function. */
#undef HAVE_UNAME
-/* Define to 1 if you have the <unistd.h> header file. */
+/*
+ Define to 1 if you have the <unistd.h>
+ header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the `vfork' function. */
+/*
+ Define to 1 if you have the `vfork'
+ function. */
#undef HAVE_VFORK
-/* Define to 1 if you have the <vfork.h> header file. */
+/*
+ Define to 1 if you have the <vfork.h>
+ header file. */
#undef HAVE_VFORK_H
-/* Define to 1 if `fork' works. */
+/*
+ Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
-/* Define to 1 if `vfork' works. */
+/*
+ Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
- slash. */
+/*
+ Define to 1 if `lstat' dereferences a symlink
+ specified with a trailing slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
-/* Set to reflect version of ncurses */
+/*
+ Set to reflect version of ncurses */
#undef NCURSES_970530
-/* If you Curses does not have color define this one */
+/*
+ If you Curses does not have color define
+ this one */
#undef NO_COLOR_CURSES
-/* Name of package */
+/*
+ Name of package */
#undef PACKAGE
-/* Define to the address where bug reports for this package should be sent. */
+/*
+ Define to the address where bug reports for
+ this package should be sent. */
#undef PACKAGE_BUGREPORT
-/* Define to the full name of this package. */
+/*
+ Define to the full name of this package.
+ */
#undef PACKAGE_NAME
-/* Define to the full name and version of this package. */
+/*
+ Define to the full name and version of
+ this package. */
#undef PACKAGE_STRING
-/* Define to the one symbol short name of this package. */
+/*
+ Define to the one symbol short name of
+ this package. */
#undef PACKAGE_TARNAME
-/* Define to the version of this package. */
+/*
+ Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define as the return type of signal handlers (`int' or `void'). */
+/*
+ Define as the return type of signal handlers
+ (`int' or `void'). */
#undef RETSIGTYPE
-/* Define if you want to turn on SCO-specific code */
+/*
+ Define if you want to turn on SCO-specific
+ code */
#undef SCO_FLAVOR
-/* Define to the type of arg 1 for `select'. */
+/*
+ Define to the type of arg 1 for
+ `select'. */
#undef SELECT_TYPE_ARG1
-/* Define to the type of args 2, 3 and 4 for `select'. */
+/*
+ Define to the type of args 2, 3
+ and 4 for `select'. */
#undef SELECT_TYPE_ARG234
-/* Define to the type of arg 5 for `select'. */
+/*
+ Define to the type of arg 5 for
+ `select'. */
#undef SELECT_TYPE_ARG5
-/* Define to 1 if you have the ANSI C header files. */
+/*
+ Define to 1 if you have the ANSI
+ C header files. */
#undef STDC_HEADERS
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/*
+ Define to 1 if you can safely include
+ both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
-/* Use Ncurses? */
+/*
+ Use Ncurses? */
#undef USE_NCURSES
-/* Use SunOS SysV curses? */
+/*
+ Use SunOS SysV curses? */
#undef USE_SUNOS_CURSES
-/* Use SystemV curses? */
+/*
+ Use SystemV curses? */
#undef USE_SYSV_CURSES
-/* Version number of package */
+/*
+ Version number of package */
#undef VERSION
-/* junk */
+/*
+ junk */
#undef WITH_BECKMANNEGLE
-/* junk */
+/*
+ junk */
#undef WITH_CRYSTALFONTZ
-/* junk */
+/*
+ junk */
#undef WITH_CWLINUX
-/* junk */
+/*
+ junk */
#undef WITH_HD44780
-/* junk */
+/*
+ junk */
#undef WITH_M50530
-/* junk */
+/*
+ junk */
#undef WITH_MATRIXORBITAL
-/* junk */
+/*
+ junk */
#undef WITH_MILINST
-/* junk */
+/*
+ junk */
#undef WITH_PALMPILOT
-/* junk */
+/*
+ junk */
#undef WITH_PNG
-/* junk */
+/*
+ junk */
#undef WITH_PPM
-/* junk */
+/*
+ junk */
#undef WITH_SIN
-/* junk */
+/*
+ junk */
#undef WITH_SKELETON
-/* junk */
+/*
+ junk */
#undef WITH_T6963
-/* junk */
+/*
+ junk */
#undef WITH_TEXT
-/* junk */
+/*
+ junk */
#undef WITH_USBLCD
-/* junk */
+/*
+ junk */
#undef WITH_X11
-/* Define to 1 if the X Window System is missing or not being used. */
+/*
+ Define to 1 if the X Window System
+ is missing or not being used. */
#undef X_DISPLAY_MISSING
-/* Define to empty if `const' does not conform to ANSI C. */
+/*
+ Define to empty if `const' does not conform
+ to ANSI C. */
#undef const
-/* Define to `int' if <sys/types.h> doesn't define. */
+/*
+ Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
#undef inline
+#endif
-/* Define to `int' if <sys/types.h> does not define. */
+/*
+ Define to `int' if <sys/types.h> does not define.
+ */
#undef pid_t
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/*
+ Define to `unsigned' if <sys/types.h> does not define.
+ */
#undef size_t
-/* Define to `int' if <sys/types.h> doesn't define. */
+/*
+ Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
-/* Define as `fork' if `vfork' does not work. */
+/*
+ Define as `fork' if `vfork' does not work.
+ */
#undef vfork
diff --git a/evaluator.c b/evaluator.c
index c7d4248..2b84dd6 100644
--- a/evaluator.c
+++ b/evaluator.c
@@ -1,4 +1,4 @@
-/* $Id: evaluator.c,v 1.6 2004/01/06 23:01:37 reinelt Exp $
+/* $Id: evaluator.c,v 1.7 2004/01/07 10:15:41 reinelt Exp $
*
* expression evaluation
*
@@ -10,6 +10,11 @@
* FIXME: GPL or not GPL????
*
* $Log: evaluator.c,v $
+ * Revision 1.7 2004/01/07 10:15:41 reinelt
+ * small glitch in evaluator fixed
+ * made config table sorted and access with bsearch(),
+ * which should be much faster
+ *
* Revision 1.6 2004/01/06 23:01:37 reinelt
* more copyright issues
*
@@ -302,7 +307,7 @@ static int v_lookup (const void *a, const void *b)
// qsort compare function for variables
static int v_sort (const void *a, const void *b)
{
- VARIABLE *va=(VARIABLE*)b;
+ VARIABLE *va=(VARIABLE*)a;
VARIABLE *vb=(VARIABLE*)b;
return strcmp(va->name, vb->name);
diff --git a/libtool b/libtool
index 040c6ce..53475fc 100755
--- a/libtool
+++ b/libtool
@@ -319,7 +319,8 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/local/lib"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -399,7 +400,7 @@ modename="$progname"
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.0a
-TIMESTAMP=" (1.1220.2.25 2003/08/01 19:08:35) Debian$Rev: 49 $"
+TIMESTAMP=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 159 $"
default_mode=
help="Try \`$progname --help' for more information."
@@ -520,6 +521,7 @@ do
;;
tag)
tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters
case $tagname in
@@ -582,6 +584,7 @@ do
--debug)
$echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -612,6 +615,7 @@ do
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
;;
--tag) prevopt="--tag" prev=tag ;;
@@ -619,6 +623,7 @@ do
set tag "$optarg" ${1+"$@"}
shift
prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -713,9 +718,11 @@ if test -z "$show_help"; then
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
+ later=
for arg
do
@@ -744,18 +751,13 @@ if test -z "$show_help"; then
continue
;;
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
continue
;;
- -prefer-non-pic)
- pic_mode=no
+ -no-suppress)
+ suppress_opt=no
continue
;;
@@ -900,6 +902,25 @@ if test -z "$show_help"; then
esac
fi
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -1066,7 +1087,9 @@ pic_object='$objdir/$objname'
EOF
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
else
# No PIC object so indicate it doesn't exist in the libtool
# object file.
@@ -1224,6 +1247,47 @@ EOF
vinfo=
vinfo_number=no
+ # Infer tagged configuration to use if any are available and
+ # if one wasn't chosen via the "--tag" command line option.
+ # Only attempt this if the compiler in the base link
+ # command doesn't match the default compiler.
+ if test -n "$available_tags" && test -z "$tagname"; then
+ case "$base_compile " in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+ case "$base_compile " in
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+ # The compiler in $compile_command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit 1
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+
# We need to know -static, to get the right output filenames.
for arg
do
@@ -1631,6 +1695,11 @@ EOF
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -1963,47 +2032,6 @@ EOF
exit 1
fi
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base link
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
- # The compiler in $compile_command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
@@ -2146,6 +2174,15 @@ EOF
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
@@ -5403,7 +5440,7 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@@ -6028,7 +6065,7 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
else
exit 0
fi
@@ -6937,7 +6974,8 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/local/lib"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""