mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-24 14:24:59 +08:00
* cdemo/configure.in: renamed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL
* demo/configure.in: likewise * depdemo/configure.in: likewise * libltdl/configure.in: likewise * mdemo/configure.in: likewise * libltdl/ltdl.c: in find_module() check whether libdir is defined, tryall_dlopen(): move deallocation of an already opened handle to lt_dlopen(), allocate the directory in lt_dlopen() dynamically, minor cleanups, fixed memory leak (name) * libtool.m4: renamed all AM_ macros to AC_ and added aliases for compatibilty, updated AC_SYS_NM_PARSE (no undefined symbols, don't count the symbols) * ltconfig.in: added thread_safe_flag_spec (not used yet), added generic variable for linker options "linkopts" in all archive_cmds * ltmain.in: added -thread-safe flag (unused)
This commit is contained in:
parent
880755c68b
commit
a5f6b87d4a
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
1999-01-27 Thomas Tanner <tanner@gmx.de>
|
||||
|
||||
* cdemo/configure.in: renamed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL
|
||||
* demo/configure.in: likewise
|
||||
* depdemo/configure.in: likewise
|
||||
* libltdl/configure.in: likewise
|
||||
* mdemo/configure.in: likewise
|
||||
* libltdl/ltdl.c: in find_module() check whether libdir is defined,
|
||||
tryall_dlopen(): move deallocation of an already opened handle
|
||||
to lt_dlopen(), allocate the directory in lt_dlopen() dynamically,
|
||||
minor cleanups, fixed memory leak (name)
|
||||
* libtool.m4: renamed all AM_ macros to AC_ and added aliases for
|
||||
compatibilty, updated AC_SYS_NM_PARSE (no undefined symbols,
|
||||
don't count the symbols)
|
||||
* ltconfig.in: added thread_safe_flag_spec (not used yet),
|
||||
added generic variable for linker options "linkopts" in
|
||||
all archive_cmds
|
||||
* ltmain.in: added -thread-safe flag (unused)
|
||||
|
||||
1999-01-26 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
|
||||
* ltconfig.in (LTCONFIG_VERSION): damn!, adding TIMESTAMP doesn't
|
||||
|
@ -4,7 +4,7 @@ AM_INIT_AUTOMAKE(cdemo,0.1)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_EXEEXT
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(math.h)
|
||||
|
||||
|
@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE(hell,1.0)
|
||||
AC_PROG_CC
|
||||
AC_C_CONST
|
||||
AC_EXEEXT
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
|
||||
STATIC=-static
|
||||
|
@ -4,7 +4,7 @@ AM_INIT_AUTOMAKE(depdemo,0.1)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_EXEEXT
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(math.h)
|
||||
|
||||
|
@ -21,7 +21,7 @@ AC_SUBST(NOINSTLIBS)
|
||||
AC_PROG_CC
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
AC_CACHE_CHECK([which extension is used for shared libraries],
|
||||
@ -112,7 +112,7 @@ if test "$test_dlerror" = yes; then
|
||||
LIBS="$LIBS_SAVE"
|
||||
fi
|
||||
|
||||
AM_SYS_SYMBOL_UNDERSCORE
|
||||
AC_SYS_SYMBOL_UNDERSCORE
|
||||
if test x"$USE_SYMBOL_UNDERSCORE" = xyes; then
|
||||
if test x"$ac_cv_func_dlopen" = xyes ||
|
||||
test x"$ac_cv_lib_dl_dlopen" = xyes ; then
|
||||
|
116
libltdl/ltdl.c
116
libltdl/ltdl.c
@ -114,7 +114,7 @@ typedef struct lt_dlhandle_t {
|
||||
char *name; /* module name */
|
||||
int usage; /* usage */
|
||||
int depcount; /* number of dependencies */
|
||||
lt_dlhandle *deps; /* dependencies */
|
||||
lt_dlhandle *deplibs; /* dependencies */
|
||||
lt_ptr_t handle; /* system handle */
|
||||
lt_ptr_t system; /* system specific data */
|
||||
} lt_dlhandle_t;
|
||||
@ -769,7 +769,6 @@ tryall_dlopen (handle, filename)
|
||||
cur = cur->next;
|
||||
if (cur) {
|
||||
cur->usage++;
|
||||
free(*handle);
|
||||
*handle = cur;
|
||||
return 0;
|
||||
}
|
||||
@ -813,7 +812,7 @@ find_module (handle, dir, libdir, dlname, old_name, installed)
|
||||
/* try to open the dynamic library */
|
||||
if (dlname) {
|
||||
/* try to open the installed module */
|
||||
if (installed &&
|
||||
if (installed && libdir &&
|
||||
strlen(libdir)+1+strlen(dlname) < LTDL_FILENAME_MAX) {
|
||||
strcpy(filename, libdir);
|
||||
strcat(filename, "/");
|
||||
@ -847,7 +846,7 @@ static lt_ptr_t
|
||||
find_file (basename, search_path, pdir, handle)
|
||||
const char *basename;
|
||||
const char *search_path;
|
||||
char *pdir;
|
||||
char **pdir;
|
||||
lt_dlhandle *handle;
|
||||
{
|
||||
/* when handle != NULL search a library, otherwise a file */
|
||||
@ -896,8 +895,16 @@ find_file (basename, search_path, pdir, handle)
|
||||
} else {
|
||||
file = fopen(filename, LTDL_READTEXT_MODE);
|
||||
if (file) {
|
||||
if (*pdir)
|
||||
free(*pdir);
|
||||
filename[lendir] = '\0';
|
||||
strcpy(pdir, filename);
|
||||
*pdir = (char*) malloc(lendir + 1);
|
||||
if (!*pdir) {
|
||||
fclose(file);
|
||||
last_error = memory_error;
|
||||
return 0;
|
||||
}
|
||||
strcpy(*pdir, filename);
|
||||
return (lt_ptr_t) file;
|
||||
}
|
||||
}
|
||||
@ -914,7 +921,7 @@ load_deplibs(handle, deplibs)
|
||||
{
|
||||
/* FIXME: load deplibs */
|
||||
handle->depcount = 0;
|
||||
handle->deps = 0;
|
||||
handle->deplibs = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -952,12 +959,16 @@ trim (dest, s)
|
||||
}
|
||||
|
||||
static int
|
||||
free_vars(dlname, oldname, libdir, deplibs)
|
||||
free_vars(dir, name, dlname, oldname, libdir, deplibs)
|
||||
char *dir;
|
||||
char *name;
|
||||
char *dlname;
|
||||
char *oldname;
|
||||
char *libdir;
|
||||
char *deplibs;
|
||||
{
|
||||
free(dir);
|
||||
free(name);
|
||||
if (dlname)
|
||||
free(dlname);
|
||||
if (oldname)
|
||||
@ -969,16 +980,14 @@ free_vars(dlname, oldname, libdir, deplibs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
lt_dlhandle
|
||||
lt_dlopen (filename)
|
||||
const char *filename;
|
||||
{
|
||||
lt_dlhandle handle;
|
||||
char dir[LTDL_FILENAME_MAX];
|
||||
lt_dlhandle handle, newhandle;
|
||||
const char *basename, *ext;
|
||||
const char *saved_error = last_error;
|
||||
char *name = 0;
|
||||
char *dir = 0, *name = 0;
|
||||
|
||||
if (!filename) {
|
||||
last_error = file_not_found_error;
|
||||
@ -989,8 +998,9 @@ lt_dlopen (filename)
|
||||
basename++;
|
||||
else
|
||||
basename = filename;
|
||||
if (basename - filename >= LTDL_FILENAME_MAX) {
|
||||
last_error = buffer_overflow_error;
|
||||
dir = (char*) malloc(basename - filename + 1);
|
||||
if (!dir) {
|
||||
last_error = memory_error;
|
||||
return 0;
|
||||
}
|
||||
strncpy(dir, filename, basename - filename);
|
||||
@ -999,7 +1009,6 @@ lt_dlopen (filename)
|
||||
ext = strrchr(basename, '.');
|
||||
if (ext && strcmp(ext, ".la") == 0) {
|
||||
/* this seems to be a libtool module */
|
||||
char tmp[LTDL_FILENAME_MAX];
|
||||
FILE *file;
|
||||
int i;
|
||||
char *dlname = 0, *old_name = 0;
|
||||
@ -1011,22 +1020,19 @@ lt_dlopen (filename)
|
||||
int installed = 1;
|
||||
|
||||
/* extract the module name from the file name */
|
||||
if (strlen(basename) >= sizeof(tmp)) {
|
||||
last_error = buffer_overflow_error;
|
||||
name = (char*) malloc(basename - ext + 1);
|
||||
if (!name) {
|
||||
last_error = memory_error;
|
||||
free(dir);
|
||||
return 0;
|
||||
}
|
||||
/* canonicalize the module name */
|
||||
for (i = 0; i < ext - basename; i++)
|
||||
if (isalnum(basename[i]))
|
||||
tmp[i] = basename[i];
|
||||
name[i] = basename[i];
|
||||
else
|
||||
tmp[i] = '_';
|
||||
tmp[ext - basename] = '\0';
|
||||
name = strdup(tmp);
|
||||
if (!name) {
|
||||
last_error = memory_error;
|
||||
return 0;
|
||||
}
|
||||
name[i] = '_';
|
||||
name[ext - basename] = '\0';
|
||||
/* now try to open the .la file */
|
||||
file = fopen(filename, LTDL_READTEXT_MODE);
|
||||
if (!file)
|
||||
@ -1035,44 +1041,47 @@ lt_dlopen (filename)
|
||||
/* try other directories */
|
||||
file = (FILE*) find_file(basename,
|
||||
user_search_path,
|
||||
dir, 0);
|
||||
&dir, 0);
|
||||
if (!file)
|
||||
file = (FILE*) find_file(basename,
|
||||
getenv("LTDL_LIBRARY_PATH"),
|
||||
dir, 0);
|
||||
&dir, 0);
|
||||
#ifdef LTDL_SHLIBPATH_VAR
|
||||
if (!file)
|
||||
file = (FILE*) find_file(basename,
|
||||
getenv(LTDL_SHLIBPATH_VAR),
|
||||
dir, 0);
|
||||
&dir, 0);
|
||||
#endif
|
||||
}
|
||||
if (!file) {
|
||||
free(name);
|
||||
free(dir);
|
||||
return 0;
|
||||
}
|
||||
/* read the .la file */
|
||||
while (!feof(file)) {
|
||||
if (!fgets(tmp, sizeof(tmp), file))
|
||||
char line[LTDL_FILENAME_MAX];
|
||||
|
||||
if (!fgets(line, sizeof(line), file))
|
||||
break;
|
||||
if (tmp[0] == '\n' || tmp[0] == '#')
|
||||
if (line[0] == '\n' || line[0] == '#')
|
||||
continue;
|
||||
if (strncmp(tmp, "dlname=", 7) == 0)
|
||||
error = trim(&dlname, &tmp[7]);
|
||||
if (strncmp(line, "dlname=", 7) == 0)
|
||||
error = trim(&dlname, &line[7]);
|
||||
else
|
||||
if (strncmp(tmp, "old_library=", 12) == 0)
|
||||
error = trim(&old_name, &tmp[12]);
|
||||
if (strncmp(line, "old_library=", 12) == 0)
|
||||
error = trim(&old_name, &line[12]);
|
||||
else
|
||||
if (strncmp(tmp, "libdir=", 7) == 0)
|
||||
error = trim(&libdir, &tmp[7]);
|
||||
if (strncmp(line, "libdir=", 7) == 0)
|
||||
error = trim(&libdir, &line[7]);
|
||||
else
|
||||
if (strncmp(tmp, "dl_dependency_libs=", 20) == 0)
|
||||
error = trim(&deplibs, &tmp[20]);
|
||||
if (strncmp(line, "dl_dependency_libs=", 20) == 0)
|
||||
error = trim(&deplibs, &line[20]);
|
||||
else
|
||||
if (strcmp(tmp, "installed=yes\n") == 0)
|
||||
if (strcmp(line, "installed=yes\n") == 0)
|
||||
installed = 1;
|
||||
else
|
||||
if (strcmp(tmp, "installed=no\n") == 0)
|
||||
if (strcmp(line, "installed=no\n") == 0)
|
||||
installed = 0;
|
||||
if (error)
|
||||
break;
|
||||
@ -1085,13 +1094,14 @@ lt_dlopen (filename)
|
||||
free(handle);
|
||||
if (!error)
|
||||
last_error = memory_error;
|
||||
free_vars(dlname, old_name, libdir, deplibs);
|
||||
free(name);
|
||||
free_vars(name, dir, dlname, old_name, libdir, deplibs);
|
||||
return 0;
|
||||
}
|
||||
handle->usage = 0;
|
||||
if (load_deplibs(handle, deplibs) == 0) {
|
||||
if (find_module(&handle, dir, libdir,
|
||||
newhandle = handle;
|
||||
/* find_module may replace newhandle */
|
||||
if (find_module(&newhandle, dir, libdir,
|
||||
dlname, old_name, installed)) {
|
||||
unload_deplibs(handle);
|
||||
error = 1;
|
||||
@ -1100,18 +1110,27 @@ lt_dlopen (filename)
|
||||
error = 1;
|
||||
if (error) {
|
||||
free(handle);
|
||||
free_vars(dlname, old_name, libdir, deplibs);
|
||||
free(name);
|
||||
free_vars(name, dir, dlname, old_name, libdir, deplibs);
|
||||
return 0;
|
||||
}
|
||||
if (handle != newhandle) {
|
||||
unload_deplibs(handle);
|
||||
free(handle);
|
||||
handle = newhandle;
|
||||
}
|
||||
} else {
|
||||
/* not a libtool module */
|
||||
handle = (lt_dlhandle) malloc(sizeof(lt_dlhandle_t));
|
||||
if (!handle) {
|
||||
last_error = memory_error;
|
||||
free(dir);
|
||||
return 0;
|
||||
}
|
||||
handle->usage = 0;
|
||||
/* non-libtool modules don't have dependencies */
|
||||
handle->depcount = 0;
|
||||
handle->deplibs = 0;
|
||||
newhandle = handle;
|
||||
if (tryall_dlopen(&handle, filename) && (!*dir
|
||||
|| (find_file(basename, user_search_path, 0, &handle)
|
||||
&& find_file(basename, getenv("LTDL_LIBRARY_PATH"),
|
||||
@ -1122,15 +1141,22 @@ lt_dlopen (filename)
|
||||
#endif
|
||||
))) {
|
||||
free(handle);
|
||||
free(dir);
|
||||
return 0;
|
||||
}
|
||||
if (handle != newhandle) {
|
||||
free(handle);
|
||||
handle = newhandle;
|
||||
}
|
||||
}
|
||||
if (!handle->usage) {
|
||||
handle->usage = 1;
|
||||
handle->name = name;
|
||||
handle->next = handles;
|
||||
handles = handle;
|
||||
}
|
||||
} else if (name)
|
||||
free(name);
|
||||
free(dir);
|
||||
last_error = saved_error;
|
||||
return handle;
|
||||
}
|
||||
|
136
libtool.m4
vendored
136
libtool.m4
vendored
@ -21,19 +21,19 @@
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 30 AM_PROG_LIBTOOL
|
||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||
# serial 30 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_PREREQ(2.12.2)dnl
|
||||
AC_REQUIRE([AM_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AM_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AM_PROG_LD])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_REQUIRE([AM_SYS_SYMBOL_UNDERSCORE])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_SYS_NM_PARSE])dnl
|
||||
AC_REQUIRE([AC_SYS_SYMBOL_UNDERSCORE])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
# Always use our own libtool.
|
||||
@ -83,7 +83,7 @@ case "$host" in
|
||||
;;
|
||||
|
||||
*-*-cygwin32*)
|
||||
AM_SYS_LIBTOOL_CYGWIN32
|
||||
AC_SYS_LIBTOOL_CYGWIN32
|
||||
;;
|
||||
|
||||
esac
|
||||
@ -116,15 +116,15 @@ LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
# AM_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_SHARED,
|
||||
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_SHARED,
|
||||
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@ -142,26 +142,26 @@ no) enable_shared=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AM_DISABLE_SHARED,
|
||||
[AM_ENABLE_SHARED(no)])
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED,
|
||||
[AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AM_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AM_DISABLE_STATIC,
|
||||
[AM_ENABLE_STATIC(no)])
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC,
|
||||
[AC_ENABLE_STATIC(no)])
|
||||
|
||||
# AM_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AM_ENABLE_STATIC,
|
||||
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_DEFUN(AC_ENABLE_STATIC,
|
||||
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
@ -179,12 +179,12 @@ no) enable_static=no ;;
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AM_PROG_LD,
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
@ -284,10 +284,10 @@ else
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AM_PROG_LD_GNU
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_PROG_LD_GNU,
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
@ -297,8 +297,8 @@ else
|
||||
fi])
|
||||
])
|
||||
|
||||
# AM_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AM_PROG_NM,
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
@ -332,11 +332,11 @@ AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AM_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
|
||||
# AC_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
|
||||
# by C symbol name from nm.
|
||||
AC_DEFUN(AM_SYS_NM_PARSE,
|
||||
AC_DEFUN(AC_SYS_NM_PARSE,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
# Check for command to grab the raw symbol name followed by C symbol from nm.
|
||||
AC_MSG_CHECKING([command to parse $NM output])
|
||||
AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
@ -345,7 +345,7 @@ AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
|
||||
changequote(,)dnl
|
||||
# Character class describing NM global symbol codes.
|
||||
ac_symcode='[BCDEGRSTU]'
|
||||
ac_symcode='[BCDEGRST]'
|
||||
|
||||
# Regexp to match symbols that can be accessed directly from C.
|
||||
ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
@ -356,29 +356,23 @@ ac_symxfrm='\1 \1'
|
||||
# Define system-specific variables.
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
ac_symcode='[BCDTU]'
|
||||
ac_symcode='[BCDT]'
|
||||
;;
|
||||
cygwin32* | mingw32*)
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
irix*)
|
||||
# Cannot use undefined symbols on IRIX because inlined functions mess us up.
|
||||
ac_symcode='[BCDEGRST]'
|
||||
;;
|
||||
solaris*)
|
||||
ac_symcode='[BDTU]'
|
||||
ac_symcode='[BDT]'
|
||||
;;
|
||||
esac
|
||||
|
||||
# If we're using GNU nm, then use its standard symbol codes.
|
||||
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
ac_symcode='[ABCDGISTUW]'
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
cygwin32* | mingw32*)
|
||||
# We do not want undefined symbols on cygwin32. The user must
|
||||
# arrange to define them via -l arguments.
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Try without a prefix undercore, then with it.
|
||||
@ -386,11 +380,12 @@ for ac_symprfx in "" "_"; do
|
||||
|
||||
# Write the raw and C identifiers.
|
||||
# Unlike in ltconfig.in, we need $ac_symprfx before $ac_symxfrm here,
|
||||
# otherwise AM_SYS_SYMBOL_UNDERSCORE will always be false
|
||||
# otherwise AC_SYS_SYMBOL_UNDERSCORE will always be false
|
||||
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_symprfx$ac_sympat$/$ac_symprfx$ac_symxfrm/p'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
ac_pipe_works=no
|
||||
rm -f conftest.$ac_ext
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -402,6 +397,7 @@ void nm_test_func(){}
|
||||
#endif
|
||||
int main(){nm_test_var='a';nm_test_func;return 0;}
|
||||
EOF
|
||||
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
@ -411,14 +407,8 @@ EOF
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
|
||||
mv -f "$ac_nlist"T "$ac_nlist"
|
||||
ac_wcout=`wc "$ac_nlist" 2>/dev/null`
|
||||
changequote(,)dnl
|
||||
ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
|
||||
changequote([,])dnl
|
||||
(test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
|
||||
else
|
||||
rm -f "$ac_nlist"T
|
||||
ac_count=-1
|
||||
fi
|
||||
|
||||
# Make sure that we snagged all the symbols we need.
|
||||
@ -438,18 +428,16 @@ EOF
|
||||
# define lt_ptr_t void *
|
||||
#else
|
||||
# define lt_ptr_t char *
|
||||
# define const
|
||||
#endif
|
||||
|
||||
/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
|
||||
int dld_preloaded_symbol_count = $ac_count;
|
||||
|
||||
/* The mapping between symbol names and symbols. */
|
||||
struct {
|
||||
char *name;
|
||||
const struct {
|
||||
const char *name;
|
||||
lt_ptr_t address;
|
||||
}
|
||||
changequote(,)dnl
|
||||
dld_preloaded_symbols[] =
|
||||
lt_preloaded_symbols[] =
|
||||
changequote([,])dnl
|
||||
{
|
||||
EOF
|
||||
@ -512,17 +500,17 @@ fi
|
||||
AC_MSG_RESULT($ac_result)
|
||||
])
|
||||
|
||||
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
|
||||
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
|
||||
# AC_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
|
||||
AC_DEFUN(AC_SYS_LIBTOOL_CYGWIN32,
|
||||
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
])
|
||||
|
||||
# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
|
||||
# AC_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
|
||||
# with an underscore?
|
||||
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
|
||||
[AC_REQUIRE([AM_PROG_NM])dnl
|
||||
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
|
||||
AC_DEFUN(AC_SYS_SYMBOL_UNDERSCORE,
|
||||
[AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_SYS_NM_PARSE])dnl
|
||||
AC_MSG_CHECKING([for _ prefix in compiled symbols])
|
||||
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
|
||||
[ac_cv_sys_symbol_underscore=no
|
||||
@ -557,3 +545,15 @@ AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
|
||||
USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
|
||||
AC_SUBST(USE_SYMBOL_UNDERSCORE)dnl
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
AC_DEFUN(AM_SYS_NM_PARSE, [indir([AC_SYS_NM_PARSE])])dnl
|
||||
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE, [indir([AC_SYS_SYMBOL_UNDERSCORE])])dnl
|
||||
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32, [indir([AC_SYS_LIBTOOL_CYGWIN32])])dnl
|
||||
|
99
ltconfig.in
99
ltconfig.in
@ -1004,6 +1004,7 @@ archive_sym_cmds=
|
||||
old_archive_from_new_cmds=
|
||||
export_dynamic_flag_spec=
|
||||
whole_archive_flag_spec=
|
||||
thread_safe_flag_spec=
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
@ -1032,7 +1033,7 @@ if test "$with_gnu_ld" = yes; then
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
|
||||
wlarc=
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
@ -1041,7 +1042,7 @@ if test "$with_gnu_ld" = yes; then
|
||||
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -nostart ${wl}-soname $wl$soname -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$CC -nostart ${wl}-soname $wl$soname -o $lib $libobjs $deplibs $linkopts'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
@ -1060,22 +1061,22 @@ if test "$with_gnu_ld" = yes; then
|
||||
(cd $objdir && $CC -c $soname-ltdll.c)~
|
||||
echo EXPORTS > $objdir/$soname-def~
|
||||
$DLLTOOL --export-all --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs'
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
||||
|
||||
archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~
|
||||
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
|
||||
(cd $objdir && $CC -c $soname-ltdll.c)~
|
||||
echo EXPORTS > $objdir/$soname-def~
|
||||
cat "$export_symbols" >> $objdir/$soname-def~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs'
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
||||
|
||||
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
|
||||
else
|
||||
@ -1089,7 +1090,7 @@ if test "$with_gnu_ld" = yes; then
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
libext=lib
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $lib $libobjs `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
|
||||
archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -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.
|
||||
@ -1100,8 +1101,8 @@ if test "$with_gnu_ld" = yes; then
|
||||
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib $libobjs $deplibs'
|
||||
archive_sym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib $libobjs $deplibs $linkopts'
|
||||
archive_sym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib $libobjs $deplibs $linkopts'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
@ -1120,8 +1121,8 @@ else
|
||||
aix3*)
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp~
|
||||
$LD -o $objdir/$soname $libobjs $deplibs -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
|
||||
archive_sym_cmds='$LD -o $objdir/$soname $libobjs $deplibs -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
|
||||
$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
|
||||
archive_sym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
@ -1144,11 +1145,11 @@ else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
|
||||
else
|
||||
archive_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp~
|
||||
$CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry'
|
||||
archive_sym_cmds='$CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
|
||||
$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry'
|
||||
archive_sym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
|
||||
hardcode_direct=yes
|
||||
fi
|
||||
hardcode_minus_L=yes
|
||||
@ -1178,22 +1179,22 @@ else
|
||||
(cd $objdir && $CC -c $soname-ltdll.c)~
|
||||
echo EXPORTS > $objdir/$soname-def~
|
||||
$DLLTOOL --export-all --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs'
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
||||
|
||||
archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~
|
||||
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
|
||||
(cd $objdir && $CC -c $soname-ltdll.c)~
|
||||
echo EXPORTS > $objdir/$soname-def~
|
||||
cat "$export_symbols" >> $objdir/$soname-def~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs~
|
||||
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
|
||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs'
|
||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
||||
|
||||
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
|
||||
else
|
||||
@ -1206,7 +1207,7 @@ else
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
libext=lib
|
||||
# FIXME: Setting linknames here is a bad hack.
|
||||
archive_cmds='$CC -o $lib $libobjs `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
|
||||
archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -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.
|
||||
@ -1225,7 +1226,7 @@ else
|
||||
# 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 /usr/lib/c++rt0.o'
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no # verified on 2.2.6
|
||||
@ -1234,7 +1235,7 @@ else
|
||||
|
||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||
freebsd2*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
hardcode_shlibpath_var=no
|
||||
@ -1242,7 +1243,7 @@ else
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd*)
|
||||
archive_cmds='$CC -shared -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
@ -1250,7 +1251,7 @@ else
|
||||
;;
|
||||
|
||||
hpux9*)
|
||||
archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
|
||||
archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
@ -1258,7 +1259,7 @@ else
|
||||
;;
|
||||
|
||||
hpux10* | hpux11*)
|
||||
archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
@ -1267,18 +1268,18 @@ else
|
||||
|
||||
irix5* | irix6*)
|
||||
if test "$with_gcc" = yes; then
|
||||
archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs $linkopts'
|
||||
else
|
||||
archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring $libobjs $deplibs'
|
||||
archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring $libobjs $deplibs $linkopts'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs' # a.out
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
|
||||
else
|
||||
archive_cmds='$LD -shared -o $lib $libobjs $deplibs' # ELF
|
||||
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
hardcode_direct=yes
|
||||
@ -1286,7 +1287,7 @@ else
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
@ -1296,24 +1297,24 @@ else
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
allow_undefined_flag=unsupported
|
||||
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $objdir/$libname.def'
|
||||
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
|
||||
old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
|
||||
;;
|
||||
|
||||
osf3* | osf4*)
|
||||
if test "$with_gcc" = yes; then
|
||||
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring $libobjs $deplibs $linkopts'
|
||||
else
|
||||
allow_undefined_flag=' -expect_unresolved \*'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring $libobjs $deplibs'
|
||||
archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring $libobjs $deplibs $linkopts'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
archive_cmds='$LD -G -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
|
||||
@ -1321,9 +1322,9 @@ else
|
||||
no_undefined_flag=' -z text'
|
||||
# $CC -shared without GNU ld will not create a library from C++
|
||||
# object files and a static libstdc++, better avoid it by now
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
archive_sym_cmds='$echo "{ global:" > $lib.exp~sed $export_symbols -e "s/.*/\1;/" >> $lib.exp~$echo "local: * }" >> $lib.exp~
|
||||
$LD -G${allow_undefined_flag} -M $export_symbols -h $soname -o $lib $libobjs $deplibs~$rm $lib.exp'
|
||||
$LD -G${allow_undefined_flag} -M $export_symbols -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
@ -1332,9 +1333,9 @@ else
|
||||
# Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
|
||||
if test "$with_gcc" = yes; then
|
||||
# Use -fPIC here because libgcc is multilibbed
|
||||
archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
|
||||
else
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
|
||||
fi
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
@ -1343,7 +1344,7 @@ else
|
||||
;;
|
||||
|
||||
sysv4.3*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
hardcode_shlibpath_var=no
|
||||
@ -1351,7 +1352,7 @@ else
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
@ -1359,7 +1360,7 @@ else
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
|
||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
@ -1905,12 +1906,13 @@ case "$ltmain" in
|
||||
old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
|
||||
reload_flag reload_cmds wl \
|
||||
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
|
||||
whole_archive_flag_spec libname_spec library_names_spec soname_spec \
|
||||
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
|
||||
library_names_spec soname_spec \
|
||||
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
|
||||
old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \
|
||||
file_magic_command deplibs_check_method allow_undefined_flag no_undefined_flag \
|
||||
finish_cmds finish_eval global_symbol_pipe \
|
||||
hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path_spec \
|
||||
finish_cmds finish_eval global_symbol_pipe hardcode_libdir_flag_spec \
|
||||
hardcode_libdir_separator sys_lib_search_path_spec \
|
||||
compiler_c_o compiler_o_lo need_locks; do
|
||||
|
||||
case "$var" in
|
||||
@ -2095,6 +2097,9 @@ export_dynamic_flag_spec=$export_dynamic_flag_spec
|
||||
# Compiler flag to generate shared objects directly from archives.
|
||||
whole_archive_flag_spec=$whole_archive_flag_spec
|
||||
|
||||
# Compiler flag to generate thread-safe objects.
|
||||
thread_safe_flag_spec=$thread_safe_flag_spec
|
||||
|
||||
# Library versioning type.
|
||||
version_type=$version_type
|
||||
|
||||
|
@ -656,6 +656,7 @@ compiler."
|
||||
convenience=
|
||||
old_convenience=
|
||||
deplibs=
|
||||
linkopts=
|
||||
|
||||
if test -n "$shlibpath_var"; then
|
||||
# get the directories listed in $shlibpath_var
|
||||
@ -688,6 +689,7 @@ compiler."
|
||||
perm_rpath=
|
||||
temp_rpath=
|
||||
finalize_rpath=
|
||||
thread_safe=no
|
||||
vinfo=
|
||||
|
||||
# We need to know -static, to get the right output filenames.
|
||||
@ -905,6 +907,11 @@ compiler."
|
||||
continue
|
||||
;;
|
||||
|
||||
-thread-safe)
|
||||
thread_safe=yes
|
||||
continue
|
||||
;;
|
||||
|
||||
-version-info)
|
||||
prev=vinfo
|
||||
continue
|
||||
|
@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE(mdemo,0.1)
|
||||
AC_PROG_CC
|
||||
AC_C_CONST
|
||||
AC_EXEEXT
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
|
||||
STATIC=-static
|
||||
|
Loading…
Reference in New Issue
Block a user