git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3663 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
70996f09eb
commit
5c6923139d
|
@ -3,9 +3,9 @@ SUBDIRS =
|
|||
AUTOMAKE_OPTS= gnu
|
||||
NAME=libilbc
|
||||
|
||||
AM_CC=gcc
|
||||
AM_CFLAGS = -Wall -O3 -funroll-loops
|
||||
AM_CFLAGS = $(new_AM_CFLAGS) -I./src/include
|
||||
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||
AM_LDFLAGS = $(new_AM_LDFLAGS) -lm
|
||||
|
||||
lib_LTLIBRARIES = libilbc.la
|
||||
libilbc_la_SOURCES = src/anaFilter.c\
|
||||
|
|
|
@ -40,11 +40,18 @@ host_triplet = @host@
|
|||
DIST_COMMON = README $(am__configure_deps) $(library_include_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
compile config.guess config.sub depcomp install-sh ltmain.sh \
|
||||
missing
|
||||
build/compile build/config.guess build/config.sub \
|
||||
build/depcomp build/install-sh build/ltmain.sh build/missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/build/config/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/build/config/ax_cflags_warn_all_ansi.m4 \
|
||||
$(top_srcdir)/build/config/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/build/config/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/build/config/ac_gcc_archflag.m4 \
|
||||
$(top_srcdir)/build/config/ac_gcc_x86_cpuid.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
|
@ -76,7 +83,7 @@ am_libilbc_la_OBJECTS = libilbc_la-anaFilter.lo \
|
|||
libilbc_la-iCBConstruct.lo libilbc_la-lsf.lo
|
||||
libilbc_la_OBJECTS = $(am_libilbc_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
depcomp = $(SHELL) $(top_srcdir)/build/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
@ -131,6 +138,7 @@ CXXFLAGS = @CXXFLAGS@
|
|||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
|
@ -158,11 +166,15 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
|||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PRTDIAG = @PRTDIAG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SOLINK = @SOLINK@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
|
||||
WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
|
@ -199,6 +211,8 @@ libexecdir = @libexecdir@
|
|||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
new_AM_CFLAGS = @new_AM_CFLAGS@
|
||||
new_AM_LDFLAGS = @new_AM_LDFLAGS@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
|
@ -210,9 +224,9 @@ EXTRA_DIST =
|
|||
SUBDIRS =
|
||||
AUTOMAKE_OPTS = gnu
|
||||
NAME = libilbc
|
||||
AM_CC = gcc
|
||||
AM_CFLAGS = -Wall -O3 -funroll-loops
|
||||
AM_CFLAGS = $(new_AM_CFLAGS) -I./src/include
|
||||
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||
AM_LDFLAGS = $(new_AM_LDFLAGS) -lm
|
||||
lib_LTLIBRARIES = libilbc.la
|
||||
libilbc_la_SOURCES = src/anaFilter.c\
|
||||
src/iCBSearch.c \
|
||||
|
@ -683,7 +697,7 @@ distclean-tags:
|
|||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/src
|
||||
$(mkdir_p) $(distdir)/build $(distdir)/build/config $(distdir)/src
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
m4_include([build/config/ax_compiler_vendor.m4])
|
||||
m4_include([build/config/ax_cflags_warn_all_ansi.m4])
|
||||
m4_include([build/config/ax_cc_maxopt.m4])
|
||||
m4_include([build/config/ax_check_compiler_flags.m4])
|
||||
m4_include([build/config/ac_gcc_archflag.m4])
|
||||
m4_include([build/config/ac_gcc_x86_cpuid.m4])
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-08-03'
|
||||
timestamp='2005-07-08'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -794,7 +794,7 @@ EOF
|
|||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
exit ;;
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
amd64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit ;;
|
||||
p*:CYGWIN*:*)
|
||||
|
@ -873,9 +873,6 @@ EOF
|
|||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit ;;
|
|
@ -0,0 +1,142 @@
|
|||
AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_OLD], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CXX
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
|
||||
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_NEW], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CXX
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
|
||||
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
|
||||
[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
|
||||
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
AC_DEFUN([AX_CFLAGS_SUN_OPTION_OLD], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_sun_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for sun/cc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "+xstrconst % -xc99=all m4_ifval($2,$2,-option)" dnl Solaris C
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION_OLD], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_sun_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for sun/cc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CXX
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "+xstrconst % -xc99=all m4_ifval($2,$2,-option)" dnl Solaris C
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl -----------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_SUN_OPTION_NEW], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_sun_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for sun/cc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "+xstrconst % -xc99=all m4_ifval($1,$1,-option)" dnl Solaris C
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
|
||||
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION_NEW], [dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_sun_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for sun/cc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CXX
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "+xstrconst % -xc99=all m4_ifval($1,$1,-option)" dnl Solaris C
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
|
||||
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CFLAGS_SUN_OPTION],[ifelse(m4_regexp([$2],[-]),-1,
|
||||
[AX_CFLAGS_SUN_OPTION_NEW($@)],[AX_CFLAGS_SUN_OPTION_OLD($@)])])
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION],[ifelse(m4_regexp([$2],[-]),-1,
|
||||
[AX_CXXFLAGS_SUN_OPTION_NEW($@)],[AX_CXXFLAGS_SUN_OPTION_OLD($@)])])
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
AC_DEFUN([AX_GCC_ARCHFLAG],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
|
||||
AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
|
||||
ax_gcc_arch=$withval, ax_gcc_arch=yes)
|
||||
|
||||
AC_MSG_CHECKING([for gcc architecture flag])
|
||||
AC_MSG_RESULT([])
|
||||
AC_CACHE_VAL(ax_cv_gcc_archflag,
|
||||
[
|
||||
ax_cv_gcc_archflag="unknown"
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
|
||||
if test "x$ax_gcc_arch" = xyes; then
|
||||
ax_gcc_arch=""
|
||||
if test "$cross_compiling" = no; then
|
||||
case $host_cpu in
|
||||
i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
|
||||
AX_GCC_X86_CPUID(0)
|
||||
AX_GCC_X86_CPUID(1)
|
||||
case $ax_cv_gcc_x86_cpuid_0 in
|
||||
*:756e6547:*:*) # Intel
|
||||
case $ax_cv_gcc_x86_cpuid_1 in
|
||||
*5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
|
||||
*5??:*:*:*) ax_gcc_arch=pentium ;;
|
||||
*6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
|
||||
*6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
|
||||
*6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
|
||||
*6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
|
||||
*6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
|
||||
*6??:*:*:*) ax_gcc_arch=pentiumpro ;;
|
||||
*f3[[347]]:*:*:*|*f4[1347]:*:*:*)
|
||||
case $host_cpu in
|
||||
x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
|
||||
*) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
|
||||
esac ;;
|
||||
*f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
|
||||
esac ;;
|
||||
*:68747541:*:*) # AMD
|
||||
case $ax_cv_gcc_x86_cpuid_1 in
|
||||
*5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
|
||||
*5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
|
||||
*5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
|
||||
*60?:*:*:*) ax_gcc_arch=k7 ;;
|
||||
*6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
|
||||
*6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
|
||||
*67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
|
||||
*6[[68a]]?:*:*:*)
|
||||
AX_GCC_X86_CPUID(0x80000006) # L2 cache size
|
||||
case $ax_cv_gcc_x86_cpuid_0x80000006 in
|
||||
*:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
|
||||
ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
|
||||
*) ax_gcc_arch="athlon-4 athlon k7" ;;
|
||||
esac ;;
|
||||
*f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
|
||||
*f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
|
||||
*f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
|
||||
*f??:*:*:*) ax_gcc_arch="k8" ;;
|
||||
esac ;;
|
||||
*:746e6543:*:*) # IDT
|
||||
case $ax_cv_gcc_x86_cpuid_1 in
|
||||
*54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
|
||||
*58?:*:*:*) ax_gcc_arch=winchip2 ;;
|
||||
*6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
|
||||
*69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
|
||||
esac ;;
|
||||
esac
|
||||
if test x"$ax_gcc_arch" = x; then # fallback
|
||||
case $host_cpu in
|
||||
i586*) ax_gcc_arch=pentium ;;
|
||||
i686*) ax_gcc_arch=pentiumpro ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
sparc*)
|
||||
AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
|
||||
cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
|
||||
cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
|
||||
case $cputype in
|
||||
*ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
|
||||
*ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
|
||||
*ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
|
||||
*supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
|
||||
*hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
|
||||
*cypress*) ax_gcc_arch=cypress ;;
|
||||
esac ;;
|
||||
|
||||
alphaev5) ax_gcc_arch=ev5 ;;
|
||||
alphaev56) ax_gcc_arch=ev56 ;;
|
||||
alphapca56) ax_gcc_arch="pca56 ev56" ;;
|
||||
alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
|
||||
alphaev6) ax_gcc_arch=ev6 ;;
|
||||
alphaev67) ax_gcc_arch=ev67 ;;
|
||||
alphaev68) ax_gcc_arch="ev68 ev67" ;;
|
||||
alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
|
||||
alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
|
||||
alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
|
||||
|
||||
powerpc*)
|
||||
cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
|
||||
cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
|
||||
case $cputype in
|
||||
*750*) ax_gcc_arch="750 G3" ;;
|
||||
*740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
|
||||
*74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
|
||||
*74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
|
||||
*970*) ax_gcc_arch="970 G5 power4";;
|
||||
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
|
||||
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
|
||||
603ev|8240) ax_gcc_arch="$cputype 603e 603";;
|
||||
*) ax_gcc_arch=$cputype ;;
|
||||
esac
|
||||
ax_gcc_arch="$ax_gcc_arch powerpc"
|
||||
;;
|
||||
esac
|
||||
fi # not cross-compiling
|
||||
fi # guess arch
|
||||
|
||||
if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
|
||||
for arch in $ax_gcc_arch; do
|
||||
if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
|
||||
flags="-mtune=$arch"
|
||||
# -mcpu=$arch and m$arch generate nonportable code on every arch except
|
||||
# x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
|
||||
case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
|
||||
else
|
||||
flags="-march=$arch -mcpu=$arch -m$arch"
|
||||
fi
|
||||
for flag in $flags; do
|
||||
AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
|
||||
done
|
||||
test "x$ax_cv_gcc_archflag" = xunknown || break
|
||||
done
|
||||
fi
|
||||
|
||||
fi # $GCC=yes
|
||||
])
|
||||
AC_MSG_CHECKING([for gcc architecture flag])
|
||||
AC_MSG_RESULT($ax_cv_gcc_archflag)
|
||||
if test "x$ax_cv_gcc_archflag" = xunknown; then
|
||||
m4_default([$3],:)
|
||||
else
|
||||
m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
|
||||
fi
|
||||
])
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
AC_DEFUN([AX_GCC_X86_CPUID],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_LANG_PUSH([C])
|
||||
AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
|
||||
int op = $1, eax, ebx, ecx, edx;
|
||||
FILE *f;
|
||||
__asm__("cpuid"
|
||||
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
|
||||
: "a" (op));
|
||||
f = fopen("conftest_cpuid", "w"); if (!f) return 1;
|
||||
fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
|
||||
fclose(f);
|
||||
return 0;
|
||||
])],
|
||||
[ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
|
||||
[ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
|
||||
[ax_cv_gcc_x86_cpuid_$1=unknown])])
|
||||
AC_LANG_POP([C])
|
||||
])
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
AC_DEFUN([AC_PROG_GZIP],[
|
||||
AC_CHECK_PROGS(gzip,[gzip],no)
|
||||
export gzip;
|
||||
if test $gzip = "no" ;
|
||||
then
|
||||
AC_MSG_ERROR([Unable to find the gzip application]);
|
||||
fi
|
||||
AC_SUBST(gzip)
|
||||
])
|
|
@ -0,0 +1,9 @@
|
|||
AC_DEFUN([AC_PROG_WGET],[
|
||||
AC_CHECK_PROGS(wget,[wget],no)
|
||||
export wget;
|
||||
if test $wget = "no" ;
|
||||
then
|
||||
AC_MSG_ERROR([Unable to find the wget application]);
|
||||
fi
|
||||
AC_SUBST(wget)
|
||||
])
|
|
@ -0,0 +1,120 @@
|
|||
AC_DEFUN([AX_CC_MAXOPT],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AX_COMPILER_VENDOR])
|
||||
|
||||
AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
|
||||
acx_maxopt_portable=$withval, acx_maxopt_portable=no)
|
||||
|
||||
# Try to determine "good" native compiler flags if none specified via CFLAGS
|
||||
if test "$ac_test_CFLAGS" != "set"; then
|
||||
CFLAGS=""
|
||||
case $ax_cv_c_compiler_vendor in
|
||||
dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
|
||||
if test "x$acx_maxopt_portable" = xno; then
|
||||
CFLAGS="$CFLAGS -arch host"
|
||||
fi;;
|
||||
|
||||
sun) CFLAGS="-native -fast -xO5 -dalign -xc99=all"
|
||||
if test "x$acx_maxopt_portable" = xyes; then
|
||||
CFLAGS="$CFLAGS -xarch=generic"
|
||||
fi;;
|
||||
|
||||
hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
|
||||
if test "x$acx_maxopt_portable" = xyes; then
|
||||
CFLAGS="$CFLAGS +DAportable"
|
||||
fi;;
|
||||
|
||||
ibm) if test "x$acx_maxopt_portable" = xno; then
|
||||
xlc_opt="-qarch=auto -qtune=auto"
|
||||
else
|
||||
xlc_opt="-qtune=auto"
|
||||
fi
|
||||
AX_CHECK_COMPILER_FLAGS($xlc_opt,
|
||||
CFLAGS="-O3 -qansialias -w $xlc_opt",
|
||||
[CFLAGS="-O3 -qansialias -w"
|
||||
echo "******************************************************"
|
||||
echo "* You seem to have the IBM C compiler. It is *"
|
||||
echo "* recommended for best performance that you use: *"
|
||||
echo "* *"
|
||||
echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
|
||||
echo "* ^^^ ^^^ *"
|
||||
echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
|
||||
echo "* CPU you have. (Set the CFLAGS environment var. *"
|
||||
echo "* and re-run configure.) For more info, man cc. *"
|
||||
echo "******************************************************"])
|
||||
;;
|
||||
|
||||
intel) CFLAGS="-O3 -ansi_alias"
|
||||
if test "x$acx_maxopt_portable" = xno; then
|
||||
icc_archflag=unknown
|
||||
icc_flags=""
|
||||
case $host_cpu in
|
||||
i686*|x86_64*)
|
||||
# icc accepts gcc assembly syntax, so these should work:
|
||||
AX_GCC_X86_CPUID(0)
|
||||
AX_GCC_X86_CPUID(1)
|
||||
case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
|
||||
*:756e6547:*:*) # Intel
|
||||
case $ax_cv_gcc_x86_cpuid_1 in
|
||||
*6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
|
||||
*f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
|
||||
*f??:*:*:*) icc_flags="-xN -xW -xK";;
|
||||
esac ;;
|
||||
esac ;;
|
||||
esac
|
||||
if test "x$icc_flags" != x; then
|
||||
for flag in $icc_flags; do
|
||||
AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
|
||||
done
|
||||
fi
|
||||
AC_MSG_CHECKING([for icc architecture flag])
|
||||
AC_MSG_RESULT($icc_archflag)
|
||||
if test "x$icc_archflag" != xunknown; then
|
||||
CFLAGS="$CFLAGS $icc_archflag"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
gnu)
|
||||
# default optimization flags for gcc on all systems
|
||||
CFLAGS="-O3 -fomit-frame-pointer"
|
||||
|
||||
# -malign-double for x86 systems
|
||||
AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
|
||||
|
||||
# -fstrict-aliasing for gcc-2.95+
|
||||
AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
|
||||
CFLAGS="$CFLAGS -fstrict-aliasing")
|
||||
|
||||
# note that we enable "unsafe" fp optimization with other compilers, too
|
||||
AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
|
||||
|
||||
AX_GCC_ARCHFLAG($acx_maxopt_portable)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$CFLAGS"; then
|
||||
echo ""
|
||||
echo "********************************************************"
|
||||
echo "* WARNING: Don't know the best CFLAGS for this system *"
|
||||
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
||||
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
|
||||
echo "********************************************************"
|
||||
echo ""
|
||||
CFLAGS="-O3"
|
||||
fi
|
||||
|
||||
AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
|
||||
echo ""
|
||||
echo "********************************************************"
|
||||
echo "* WARNING: The guessed CFLAGS don't seem to work with *"
|
||||
echo "* your compiler. *"
|
||||
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
||||
echo "********************************************************"
|
||||
echo ""
|
||||
CFLAGS=""
|
||||
])
|
||||
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,94 @@
|
|||
AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
# IRIX C compiler:
|
||||
# -use_readonly_const is the default for IRIX C,
|
||||
# puts them into .rodata, but they are copied later.
|
||||
# need to be "-G0 -rdatashared" for strictmode but
|
||||
# I am not sure what effect that has really. - guidod
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall -std=c99 -pedantic" dnl GCC
|
||||
"-xstrconst % -v -xc99=all" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
|
||||
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
" % -ansi -ansiE -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1 -Aa" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
||||
dnl the only difference - the LANG selection... and the default FLAGS
|
||||
|
||||
AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
|
||||
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
|
||||
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CXX
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
# IRIX C compiler:
|
||||
# -use_readonly_const is the default for IRIX C,
|
||||
# puts them into .rodata, but they are copied later.
|
||||
# need to be "-G0 -rdatashared" for strictmode but
|
||||
# I am not sure what effect that has really. - guidod
|
||||
for ac_arg dnl
|
||||
in "-pedantic % -Wall -ansi -pedantic" dnl GCC
|
||||
"-xstrconst % -v -Xc" dnl Solaris C
|
||||
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
|
||||
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
|
||||
" % -ansi -ansiE -fullwarn" dnl IRIX
|
||||
"+ESlit % +w1 -Aa" dnl HP-UX C
|
||||
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
|
||||
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
case ".$VAR" in
|
||||
.ok|.ok,*) m4_ifvaln($3,$3) ;;
|
||||
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
|
||||
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
|
||||
*) m4_ifvaln($3,$3,[
|
||||
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
|
||||
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
|
||||
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
|
||||
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
|
||||
fi ]) ;;
|
||||
esac
|
||||
AS_VAR_POPDEF([VAR])dnl
|
||||
AS_VAR_POPDEF([FLAGS])dnl
|
||||
])
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
|
||||
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
|
||||
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
|
||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
|
||||
AS_LITERAL_IF([$1],
|
||||
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
|
||||
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
|
||||
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
|
||||
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
|
||||
AC_MSG_RESULT($ax_check_compiler_flags)
|
||||
if test "x$ax_check_compiler_flags" = xyes; then
|
||||
m4_default([$2], :)
|
||||
else
|
||||
m4_default([$3], :)
|
||||
fi
|
||||
])dnl AX_CHECK_COMPILER_FLAG
|
|
@ -0,0 +1,15 @@
|
|||
AC_DEFUN([AX_COMPILER_VENDOR],
|
||||
[
|
||||
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
|
||||
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
|
||||
# note: don't check for gcc first since some other compilers define __GNUC__
|
||||
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
|
||||
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
|
||||
#if !($vencpp)
|
||||
thisisanerror;
|
||||
#endif
|
||||
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
|
||||
done
|
||||
])
|
||||
])
|
|
@ -43,8 +43,8 @@ EXIT_FAILURE=1
|
|||
|
||||
PROGRAM=ltmain.sh
|
||||
PACKAGE=libtool
|
||||
VERSION=1.5.20
|
||||
TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
|
||||
VERSION=1.5.22
|
||||
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
|
||||
|
||||
# See if we are running on zsh, and set the options which allow our
|
||||
# commands through without removal of \ escapes.
|
||||
|
@ -132,6 +132,8 @@ run=
|
|||
show="$echo"
|
||||
show_help=
|
||||
execute_dlfiles=
|
||||
duplicate_deps=no
|
||||
preserve_args=
|
||||
lo2o="s/\\.lo\$/.${objext}/"
|
||||
o2lo="s/\\.${objext}\$/.lo/"
|
||||
|
||||
|
@ -139,6 +141,43 @@ o2lo="s/\\.${objext}\$/.lo/"
|
|||
# Shell function definitions:
|
||||
# This seems to be the best place for them
|
||||
|
||||
# func_mktempdir [string]
|
||||
# Make a temporary directory that won't clash with other running
|
||||
# libtool processes, and avoids race conditions if possible. If
|
||||
# given, STRING is the basename for that directory.
|
||||
func_mktempdir ()
|
||||
{
|
||||
my_template="${TMPDIR-/tmp}/${1-$progname}"
|
||||
|
||||
if test "$run" = ":"; then
|
||||
# Return a directory name, but don't create it in dry-run mode
|
||||
my_tmpdir="${my_template}-$$"
|
||||
else
|
||||
|
||||
# If mktemp works, use that first and foremost
|
||||
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
|
||||
|
||||
if test ! -d "$my_tmpdir"; then
|
||||
# Failing that, at least try and use $RANDOM to avoid a race
|
||||
my_tmpdir="${my_template}-${RANDOM-0}$$"
|
||||
|
||||
save_mktempdir_umask=`umask`
|
||||
umask 0077
|
||||
$mkdir "$my_tmpdir"
|
||||
umask $save_mktempdir_umask
|
||||
fi
|
||||
|
||||
# If we're not in dry-run mode, bomb out on failure
|
||||
test -d "$my_tmpdir" || {
|
||||
$echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
|
||||
exit $EXIT_FAILURE
|
||||
}
|
||||
fi
|
||||
|
||||
$echo "X$my_tmpdir" | $Xsed
|
||||
}
|
||||
|
||||
|
||||
# func_win32_libid arg
|
||||
# return the library type of file 'arg'
|
||||
#
|
||||
|
@ -157,12 +196,11 @@ func_win32_libid ()
|
|||
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
|
||||
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
|
||||
win32_nmres=`eval $NM -f posix -A $1 | \
|
||||
sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
|
||||
if test "X$win32_nmres" = "Ximport" ; then
|
||||
win32_libid_type="x86 archive import"
|
||||
else
|
||||
win32_libid_type="x86 archive static"
|
||||
fi
|
||||
$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
|
||||
case $win32_nmres in
|
||||
import*) win32_libid_type="x86 archive import";;
|
||||
*) win32_libid_type="x86 archive static";;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*DLL*)
|
||||
|
@ -295,9 +333,9 @@ func_extract_archives ()
|
|||
$run ${rm}r "$my_xdir"
|
||||
$show "$mkdir $my_xdir"
|
||||
$run $mkdir "$my_xdir"
|
||||
status=$?
|
||||
if test "$status" -ne 0 && test ! -d "$my_xdir"; then
|
||||
exit $status
|
||||
exit_status=$?
|
||||
if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
|
||||
exit $exit_status
|
||||
fi
|
||||
case $host in
|
||||
*-darwin*)
|
||||
|
@ -352,6 +390,8 @@ func_extract_archives ()
|
|||
# Darwin sucks
|
||||
eval std_shrext=\"$shrext_cmds\"
|
||||
|
||||
disable_libs=no
|
||||
|
||||
# Parse our command line options once, thoroughly.
|
||||
while test "$#" -gt 0
|
||||
do
|
||||
|
@ -468,7 +508,11 @@ do
|
|||
preserve_args="$preserve_args $arg"
|
||||
;;
|
||||
|
||||
--tag) prevopt="--tag" prev=tag ;;
|
||||
--tag)
|
||||
prevopt="--tag"
|
||||
prev=tag
|
||||
preserve_args="$preserve_args --tag"
|
||||
;;
|
||||
--tag=*)
|
||||
set tag "$optarg" ${1+"$@"}
|
||||
shift
|
||||
|
@ -500,6 +544,18 @@ if test -n "$prevopt"; then
|
|||
exit $EXIT_FAILURE
|
||||
fi
|
||||
|
||||
case $disable_libs in
|
||||
no)
|
||||
;;
|
||||
shared)
|
||||
build_libtool_libs=no
|
||||
build_old_libs=yes
|
||||
;;
|
||||
static)
|
||||
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
|
||||
;;
|
||||
esac
|
||||
|
||||
# If this variable is set in any of the actions, the command in it
|
||||
# will be execed at the end. This prevents here-documents from being
|
||||
# left over by shells.
|
||||
|
@ -856,9 +912,9 @@ EOF
|
|||
if test ! -d "${xdir}$objdir"; then
|
||||
$show "$mkdir ${xdir}$objdir"
|
||||
$run $mkdir ${xdir}$objdir
|
||||
status=$?
|
||||
if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
|
||||
exit $status
|
||||
exit_status=$?
|
||||
if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
|
||||
exit $exit_status
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1061,6 +1117,7 @@ EOF
|
|||
no_install=no
|
||||
objs=
|
||||
non_pic_objects=
|
||||
notinst_path= # paths that contain not-installed libtool libraries
|
||||
precious_files_regex=
|
||||
prefer_static_libs=no
|
||||
preload=no
|
||||
|
@ -1089,14 +1146,15 @@ EOF
|
|||
if test -n "$link_static_flag"; then
|
||||
dlopen_self=$dlopen_self_static
|
||||
fi
|
||||
prefer_static_libs=yes
|
||||
else
|
||||
if test -z "$pic_flag" && test -n "$link_static_flag"; then
|
||||
dlopen_self=$dlopen_self_static
|
||||
fi
|
||||
prefer_static_libs=built
|
||||
fi
|
||||
build_libtool_libs=no
|
||||
build_old_libs=yes
|
||||
prefer_static_libs=yes
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
@ -1271,6 +1329,11 @@ EOF
|
|||
if test -z "$pic_object" || test "$pic_object" = none ; then
|
||||
arg="$non_pic_object"
|
||||
fi
|
||||
else
|
||||
# If the PIC object exists, use it instead.
|
||||
# $xdir was prepended to $pic_object above.
|
||||
non_pic_object="$pic_object"
|
||||
non_pic_objects="$non_pic_objects $non_pic_object"
|
||||
fi
|
||||
else
|
||||
# Only an error if not doing a dry-run.
|
||||
|
@ -1354,8 +1417,8 @@ EOF
|
|||
prev=
|
||||
continue
|
||||
;;
|
||||
darwin_framework)
|
||||
compiler_flags="$compiler_flags $arg"
|
||||
darwin_framework|darwin_framework_skip)
|
||||
test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
|
||||
compile_command="$compile_command $arg"
|
||||
finalize_command="$finalize_command $arg"
|
||||
prev=
|
||||
|
@ -1419,9 +1482,13 @@ EOF
|
|||
continue
|
||||
;;
|
||||
|
||||
-framework|-arch)
|
||||
prev=darwin_framework
|
||||
compiler_flags="$compiler_flags $arg"
|
||||
-framework|-arch|-isysroot)
|
||||
case " $CC " in
|
||||
*" ${arg} ${1} "* | *" ${arg} ${1} "*)
|
||||
prev=darwin_framework_skip ;;
|
||||
*) compiler_flags="$compiler_flags $arg"
|
||||
prev=darwin_framework ;;
|
||||
esac
|
||||
compile_command="$compile_command $arg"
|
||||
finalize_command="$finalize_command $arg"
|
||||
continue
|
||||
|
@ -1453,7 +1520,8 @@ EOF
|
|||
absdir=`cd "$dir" && pwd`
|
||||
if test -z "$absdir"; then
|
||||
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
|
||||
exit $EXIT_FAILURE
|
||||
absdir="$dir"
|
||||
notinst_path="$notinst_path $dir"
|
||||
fi
|
||||
dir="$absdir"
|
||||
;;
|
||||
|
@ -1467,10 +1535,15 @@ EOF
|
|||
esac
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
|
||||
testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$dir:"*) ;;
|
||||
*) dllsearchpath="$dllsearchpath:$dir";;
|
||||
esac
|
||||
case :$dllsearchpath: in
|
||||
*":$testbindir:"*) ;;
|
||||
*) dllsearchpath="$dllsearchpath:$testbindir";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
continue
|
||||
|
@ -1479,11 +1552,11 @@ EOF
|
|||
-l*)
|
||||
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-pw32* | *-*-beos*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
|
||||
# These systems don't actually have a C or math library (as such)
|
||||
continue
|
||||
;;
|
||||
*-*-mingw* | *-*-os2*)
|
||||
*-*-os2*)
|
||||
# These systems don't actually have a C library (as such)
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
|
@ -1495,6 +1568,15 @@ EOF
|
|||
# Rhapsody C and math libraries are in the System framework
|
||||
deplibs="$deplibs -framework System"
|
||||
continue
|
||||
;;
|
||||
*-*-sco3.2v5* | *-*-sco5v6*)
|
||||
# Causes problems with __ctype
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
|
||||
# Compiler inserts libc in the correct place for threads to work
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
esac
|
||||
elif test "X$arg" = "X-lc_r"; then
|
||||
case $host in
|
||||
|
@ -1536,7 +1618,12 @@ EOF
|
|||
# +DA*, +DD* enable 64-bit mode on the HP compiler
|
||||
# -q* pass through compiler args for the IBM compiler
|
||||
# -m* pass through architecture-specific compiler args for GCC
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
|
||||
# -m*, -t[45]*, -txscale* pass through architecture-specific
|
||||
# compiler args for GCC
|
||||
# -pg pass through profiling flag for GCC
|
||||
# @file GCC response files
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
|
||||
-t[45]*|-txscale*|@*)
|
||||
|
||||
# Unknown arguments in both finalize_command and compile_command need
|
||||
# to be aesthetically quoted because they are evaled later.
|
||||
|
@ -1548,9 +1635,7 @@ EOF
|
|||
esac
|
||||
compile_command="$compile_command $arg"
|
||||
finalize_command="$finalize_command $arg"
|
||||
if test "$with_gcc" = "yes" ; then
|
||||
compiler_flags="$compiler_flags $arg"
|
||||
fi
|
||||
continue
|
||||
;;
|
||||
|
||||
|
@ -1788,6 +1873,11 @@ EOF
|
|||
if test -z "$pic_object" || test "$pic_object" = none ; then
|
||||
arg="$non_pic_object"
|
||||
fi
|
||||
else
|
||||
# If the PIC object exists, use it instead.
|
||||
# $xdir was prepended to $pic_object above.
|
||||
non_pic_object="$pic_object"
|
||||
non_pic_objects="$non_pic_objects $non_pic_object"
|
||||
fi
|
||||
else
|
||||
# Only an error if not doing a dry-run.
|
||||
|
@ -1893,9 +1983,9 @@ EOF
|
|||
if test ! -d "$output_objdir"; then
|
||||
$show "$mkdir $output_objdir"
|
||||
$run $mkdir $output_objdir
|
||||
status=$?
|
||||
if test "$status" -ne 0 && test ! -d "$output_objdir"; then
|
||||
exit $status
|
||||
exit_status=$?
|
||||
if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
|
||||
exit $exit_status
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1958,7 +2048,6 @@ EOF
|
|||
newlib_search_path=
|
||||
need_relink=no # whether we're linking any uninstalled libtool libraries
|
||||
notinst_deplibs= # not-installed libtool libraries
|
||||
notinst_path= # paths that contain not-installed libtool libraries
|
||||
case $linkmode in
|
||||
lib)
|
||||
passes="conv link"
|
||||
|
@ -2194,7 +2283,7 @@ EOF
|
|||
esac # case $deplib
|
||||
if test "$found" = yes || test -f "$lib"; then :
|
||||
else
|
||||
$echo "$modename: cannot find the library \`$lib'" 1>&2
|
||||
$echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
|
||||
|
@ -2445,8 +2534,12 @@ EOF
|
|||
fi
|
||||
|
||||
link_static=no # Whether the deplib will be linked statically
|
||||
use_static_libs=$prefer_static_libs
|
||||
if test "$use_static_libs" = built && test "$installed" = yes ; then
|
||||
use_static_libs=no
|
||||
fi
|
||||
if test -n "$library_names" &&
|
||||
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
|
||||
{ test "$use_static_libs" = no || test -z "$old_library"; }; then
|
||||
if test "$installed" = no; then
|
||||
notinst_deplibs="$notinst_deplibs $lib"
|
||||
need_relink=yes
|
||||
|
@ -2559,11 +2652,15 @@ EOF
|
|||
if test "$hardcode_direct" = no; then
|
||||
add="$dir/$linklib"
|
||||
case $host in
|
||||
*-*-sco3.2v5* ) add_dir="-L$dir" ;;
|
||||
*-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
|
||||
*-*-sysv4*uw2*) add_dir="-L$dir" ;;
|
||||
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
|
||||
*-*-unixware7*) add_dir="-L$dir" ;;
|
||||
*-*-darwin* )
|
||||
# if the lib is a module then we can not link against
|
||||
# it, someone is ignoring the new warnings I added
|
||||
if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
|
||||
if /usr/bin/file -L $add 2> /dev/null |
|
||||
$EGREP ": [^:]* bundle" >/dev/null ; then
|
||||
$echo "** Warning, lib $linklib is a module, not a shared library"
|
||||
if test -z "$old_library" ; then
|
||||
$echo
|
||||
|
@ -3314,9 +3411,9 @@ EOF
|
|||
|
||||
# Eliminate all temporary directories.
|
||||
for path in $notinst_path; do
|
||||
lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
|
||||
deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
|
||||
dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
|
||||
lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
|
||||
deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
|
||||
dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
|
||||
done
|
||||
|
||||
if test -n "$xrpath"; then
|
||||
|
@ -3369,7 +3466,12 @@ EOF
|
|||
;;
|
||||
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
|
||||
# Do not include libc due to us having libc/libc_r.
|
||||
test "X$arg" = "X-lc" && continue
|
||||
;;
|
||||
*-*-sco3.2v5* | *-*-sco5v6*)
|
||||
# Causes problems with __ctype
|
||||
;;
|
||||
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
|
||||
# Compiler inserts libc in the correct place for threads to work
|
||||
;;
|
||||
*)
|
||||
# Add libc to deplibs on all other systems if necessary.
|
||||
|
@ -3413,7 +3515,7 @@ EOF
|
|||
int main() { return 0; }
|
||||
EOF
|
||||
$rm conftest
|
||||
$LTCC -o conftest conftest.c $deplibs
|
||||
$LTCC $LTCFLAGS -o conftest conftest.c $deplibs
|
||||
if test "$?" -eq 0 ; then
|
||||
ldd_output=`ldd conftest`
|
||||
for i in $deplibs; do
|
||||
|
@ -3458,7 +3560,7 @@ EOF
|
|||
# If $name is empty we are operating on a -L argument.
|
||||
if test "$name" != "" && test "$name" != "0"; then
|
||||
$rm conftest
|
||||
$LTCC -o conftest conftest.c $i
|
||||
$LTCC $LTCFLAGS -o conftest conftest.c $i
|
||||
# Did it work?
|
||||
if test "$?" -eq 0 ; then
|
||||
ldd_output=`ldd conftest`
|
||||
|
@ -3705,6 +3807,35 @@ EOF
|
|||
deplibs=$newdeplibs
|
||||
fi
|
||||
|
||||
|
||||
# move library search paths that coincide with paths to not yet
|
||||
# installed libraries to the beginning of the library search list
|
||||
new_libs=
|
||||
for path in $notinst_path; do
|
||||
case " $new_libs " in
|
||||
*" -L$path/$objdir "*) ;;
|
||||
*)
|
||||
case " $deplibs " in
|
||||
*" -L$path/$objdir "*)
|
||||
new_libs="$new_libs -L$path/$objdir" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for deplib in $deplibs; do
|
||||
case $deplib in
|
||||
-L*)
|
||||
case " $new_libs " in
|
||||
*" $deplib "*) ;;
|
||||
*) new_libs="$new_libs $deplib" ;;
|
||||
esac
|
||||
;;
|
||||
*) new_libs="$new_libs $deplib" ;;
|
||||
esac
|
||||
done
|
||||
deplibs="$new_libs"
|
||||
|
||||
|
||||
# All the library-specific variables (install_libdir is set above).
|
||||
library_names=
|
||||
old_library=
|
||||
|
@ -3788,6 +3919,7 @@ EOF
|
|||
fi
|
||||
|
||||
lib="$output_objdir/$realname"
|
||||
linknames=
|
||||
for link
|
||||
do
|
||||
linknames="$linknames $link"
|
||||
|
@ -4219,6 +4351,35 @@ EOF
|
|||
;;
|
||||
esac
|
||||
|
||||
|
||||
# move library search paths that coincide with paths to not yet
|
||||
# installed libraries to the beginning of the library search list
|
||||
new_libs=
|
||||
for path in $notinst_path; do
|
||||
case " $new_libs " in
|
||||
*" -L$path/$objdir "*) ;;
|
||||
*)
|
||||
case " $compile_deplibs " in
|
||||
*" -L$path/$objdir "*)
|
||||
new_libs="$new_libs -L$path/$objdir" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for deplib in $compile_deplibs; do
|
||||
case $deplib in
|
||||
-L*)
|
||||
case " $new_libs " in
|
||||
*" $deplib "*) ;;
|
||||
*) new_libs="$new_libs $deplib" ;;
|
||||
esac
|
||||
;;
|
||||
*) new_libs="$new_libs $deplib" ;;
|
||||
esac
|
||||
done
|
||||
compile_deplibs="$new_libs"
|
||||
|
||||
|
||||
compile_command="$compile_command $compile_deplibs"
|
||||
finalize_command="$finalize_command $finalize_deplibs"
|
||||
|
||||
|
@ -4263,10 +4424,15 @@ EOF
|
|||
fi
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
|
||||
testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
|
||||
case :$dllsearchpath: in
|
||||
*":$libdir:"*) ;;
|
||||
*) dllsearchpath="$dllsearchpath:$libdir";;
|
||||
esac
|
||||
case :$dllsearchpath: in
|
||||
*":$testbindir:"*) ;;
|
||||
*) dllsearchpath="$dllsearchpath:$testbindir";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -4383,10 +4549,22 @@ extern \"C\" {
|
|||
export_symbols="$output_objdir/$outputname.exp"
|
||||
$run $rm $export_symbols
|
||||
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
$run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
|
||||
$run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
|
||||
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
|
||||
$run eval 'mv "$nlist"T "$nlist"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
|
||||
$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -4503,16 +4681,29 @@ static const void *lt_preloaded_setup() {
|
|||
esac
|
||||
|
||||
# Now compile the dynamic symbol file.
|
||||
$show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
|
||||
$run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
|
||||
$show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
|
||||
$run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
|
||||
|
||||
# Clean up the generated files.
|
||||
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
|
||||
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
|
||||
|
||||
# Transform the symbol file into the correct name.
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
if test -f "$output_objdir/${outputname}.def" ; then
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
|
||||
else
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
|
||||
|
@ -4537,7 +4728,7 @@ static const void *lt_preloaded_setup() {
|
|||
# We have no uninstalled library dependencies, so finalize right now.
|
||||
$show "$link_command"
|
||||
$run eval "$link_command"
|
||||
status=$?
|
||||
exit_status=$?
|
||||
|
||||
# Delete the generated files.
|
||||
if test -n "$dlsyms"; then
|
||||
|
@ -4545,7 +4736,7 @@ static const void *lt_preloaded_setup() {
|
|||
$run $rm "$output_objdir/${outputname}S.${objext}"
|
||||
fi
|
||||
|
||||
exit $status
|
||||
exit $exit_status
|
||||
fi
|
||||
|
||||
if test -n "$shlibpath_var"; then
|
||||
|
@ -4685,8 +4876,10 @@ static const void *lt_preloaded_setup() {
|
|||
esac
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
|
||||
cwrapper=`$echo ${output}.exe`
|
||||
output_name=`basename $output`
|
||||
output_path=`dirname $output`
|
||||
cwrappersource="$output_path/$objdir/lt-$output_name.c"
|
||||
cwrapper="$output_path/$output_name.exe"
|
||||
$rm $cwrappersource $cwrapper
|
||||
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
|
||||
|
||||
|
@ -4713,6 +4906,9 @@ EOF
|
|||
#include <malloc.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(PATH_MAX)
|
||||
# define LT_PATHMAX PATH_MAX
|
||||
|
@ -4723,15 +4919,19 @@ EOF
|
|||
#endif
|
||||
|
||||
#ifndef DIR_SEPARATOR
|
||||
#define DIR_SEPARATOR '/'
|
||||
# define DIR_SEPARATOR '/'
|
||||
# define PATH_SEPARATOR ':'
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
|
||||
defined (__OS2__)
|
||||
#define HAVE_DOS_BASED_FILE_SYSTEM
|
||||
#ifndef DIR_SEPARATOR_2
|
||||
#define DIR_SEPARATOR_2 '\\'
|
||||
#endif
|
||||
# define HAVE_DOS_BASED_FILE_SYSTEM
|
||||
# ifndef DIR_SEPARATOR_2
|
||||
# define DIR_SEPARATOR_2 '\\'
|
||||
# endif
|
||||
# ifndef PATH_SEPARATOR_2
|
||||
# define PATH_SEPARATOR_2 ';'
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef DIR_SEPARATOR_2
|
||||
|
@ -4741,17 +4941,32 @@ EOF
|
|||
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
|
||||
#endif /* DIR_SEPARATOR_2 */
|
||||
|
||||
#ifndef PATH_SEPARATOR_2
|
||||
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
|
||||
#else /* PATH_SEPARATOR_2 */
|
||||
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
|
||||
#endif /* PATH_SEPARATOR_2 */
|
||||
|
||||
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
|
||||
#define XFREE(stale) do { \
|
||||
if (stale) { free ((void *) stale); stale = 0; } \
|
||||
} while (0)
|
||||
|
||||
/* -DDEBUG is fairly common in CFLAGS. */
|
||||
#undef DEBUG
|
||||
#if defined DEBUGWRAPPER
|
||||
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
|
||||
#else
|
||||
# define DEBUG(format, ...)
|
||||
#endif
|
||||
|
||||
const char *program_name = NULL;
|
||||
|
||||
void * xmalloc (size_t num);
|
||||
char * xstrdup (const char *string);
|
||||
char * basename (const char *name);
|
||||
char * fnqualify(const char *path);
|
||||
const char * base_name (const char *name);
|
||||
char * find_executable(const char *wrapper);
|
||||
int check_executable(const char *path);
|
||||
char * strendzap(char *str, const char *pat);
|
||||
void lt_fatal (const char *message, ...);
|
||||
|
||||
|
@ -4761,27 +4976,48 @@ main (int argc, char *argv[])
|
|||
char **newargz;
|
||||
int i;
|
||||
|
||||
program_name = (char *) xstrdup ((char *) basename (argv[0]));
|
||||
program_name = (char *) xstrdup (base_name (argv[0]));
|
||||
DEBUG("(main) argv[0] : %s\n",argv[0]);
|
||||
DEBUG("(main) program_name : %s\n",program_name);
|
||||
newargz = XMALLOC(char *, argc+2);
|
||||
EOF
|
||||
|
||||
cat >> $cwrappersource <<EOF
|
||||
newargz[0] = "$SHELL";
|
||||
newargz[0] = (char *) xstrdup("$SHELL");
|
||||
EOF
|
||||
|
||||
cat >> $cwrappersource <<"EOF"
|
||||
newargz[1] = fnqualify(argv[0]);
|
||||
newargz[1] = find_executable(argv[0]);
|
||||
if (newargz[1] == NULL)
|
||||
lt_fatal("Couldn't find %s", argv[0]);
|
||||
DEBUG("(main) found exe at : %s\n",newargz[1]);
|
||||
/* we know the script has the same name, without the .exe */
|
||||
/* so make sure newargz[1] doesn't end in .exe */
|
||||
strendzap(newargz[1],".exe");
|
||||
for (i = 1; i < argc; i++)
|
||||
newargz[i+1] = xstrdup(argv[i]);
|
||||
newargz[argc+1] = NULL;
|
||||
|
||||
for (i=0; i<argc+1; i++)
|
||||
{
|
||||
DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
|
||||
;
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
case $host_os in
|
||||
mingw*)
|
||||
cat >> $cwrappersource <<EOF
|
||||
execv("$SHELL",(char const **)newargz);
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
cat >> $cwrappersource <<EOF
|
||||
execv("$SHELL",newargz);
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
cat >> $cwrappersource <<"EOF"
|
||||
return 127;
|
||||
|
@ -4804,48 +5040,148 @@ xstrdup (const char *string)
|
|||
;
|
||||
}
|
||||
|
||||
char *
|
||||
basename (const char *name)
|
||||
const char *
|
||||
base_name (const char *name)
|
||||
{
|
||||
const char *base;
|
||||
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
/* Skip over the disk name in MSDOS pathnames. */
|
||||
if (isalpha (name[0]) && name[1] == ':')
|
||||
if (isalpha ((unsigned char)name[0]) && name[1] == ':')
|
||||
name += 2;
|
||||
#endif
|
||||
|
||||
for (base = name; *name; name++)
|
||||
if (IS_DIR_SEPARATOR (*name))
|
||||
base = name + 1;
|
||||
return (char *) base;
|
||||
return base;
|
||||
}
|
||||
|
||||
char *
|
||||
fnqualify(const char *path)
|
||||
int
|
||||
check_executable(const char * path)
|
||||
{
|
||||
size_t size;
|
||||
char *p;
|
||||
char tmp[LT_PATHMAX + 1];
|
||||
struct stat st;
|
||||
|
||||
assert(path != NULL);
|
||||
DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
|
||||
if ((!path) || (!*path))
|
||||
return 0;
|
||||
|
||||
/* Is it qualified already? */
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
if (isalpha (path[0]) && path[1] == ':')
|
||||
return xstrdup (path);
|
||||
if ((stat (path, &st) >= 0) &&
|
||||
(
|
||||
/* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
|
||||
#if defined (S_IXOTH)
|
||||
((st.st_mode & S_IXOTH) == S_IXOTH) ||
|
||||
#endif
|
||||
if (IS_DIR_SEPARATOR (path[0]))
|
||||
return xstrdup (path);
|
||||
#if defined (S_IXGRP)
|
||||
((st.st_mode & S_IXGRP) == S_IXGRP) ||
|
||||
#endif
|
||||
((st.st_mode & S_IXUSR) == S_IXUSR))
|
||||
)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* prepend the current directory */
|
||||
/* doesn't handle '~' */
|
||||
/* Searches for the full path of the wrapper. Returns
|
||||
newly allocated full path name if found, NULL otherwise */
|
||||
char *
|
||||
find_executable (const char* wrapper)
|
||||
{
|
||||
int has_slash = 0;
|
||||
const char* p;
|
||||
const char* p_next;
|
||||
/* static buffer for getcwd */
|
||||
char tmp[LT_PATHMAX + 1];
|
||||
int tmp_len;
|
||||
char* concat_name;
|
||||
|
||||
DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
|
||||
|
||||
if ((wrapper == NULL) || (*wrapper == '\0'))
|
||||
return NULL;
|
||||
|
||||
/* Absolute path? */
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
|
||||
{
|
||||
concat_name = xstrdup (wrapper);
|
||||
if (check_executable(concat_name))
|
||||
return concat_name;
|
||||
XFREE(concat_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
if (IS_DIR_SEPARATOR (wrapper[0]))
|
||||
{
|
||||
concat_name = xstrdup (wrapper);
|
||||
if (check_executable(concat_name))
|
||||
return concat_name;
|
||||
XFREE(concat_name);
|
||||
}
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
}
|
||||
#endif
|
||||
|
||||
for (p = wrapper; *p; p++)
|
||||
if (*p == '/')
|
||||
{
|
||||
has_slash = 1;
|
||||
break;
|
||||
}
|
||||
if (!has_slash)
|
||||
{
|
||||
/* no slashes; search PATH */
|
||||
const char* path = getenv ("PATH");
|
||||
if (path != NULL)
|
||||
{
|
||||
for (p = path; *p; p = p_next)
|
||||
{
|
||||
const char* q;
|
||||
size_t p_len;
|
||||
for (q = p; *q; q++)
|
||||
if (IS_PATH_SEPARATOR(*q))
|
||||
break;
|
||||
p_len = q - p;
|
||||
p_next = (*q == '\0' ? q : q + 1);
|
||||
if (p_len == 0)
|
||||
{
|
||||
/* empty path: current directory */
|
||||
if (getcwd (tmp, LT_PATHMAX) == NULL)
|
||||
lt_fatal ("getcwd failed");
|
||||
size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
|
||||
p = XMALLOC(char, size);
|
||||
sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
|
||||
return p;
|
||||
tmp_len = strlen(tmp);
|
||||
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
|
||||
memcpy (concat_name, tmp, tmp_len);
|
||||
concat_name[tmp_len] = '/';
|
||||
strcpy (concat_name + tmp_len + 1, wrapper);
|
||||
}
|
||||
else
|
||||
{
|
||||
concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
|
||||
memcpy (concat_name, p, p_len);
|
||||
concat_name[p_len] = '/';
|
||||
strcpy (concat_name + p_len + 1, wrapper);
|
||||
}
|
||||
if (check_executable(concat_name))
|
||||
return concat_name;
|
||||
XFREE(concat_name);
|
||||
}
|
||||
}
|
||||
/* not found in PATH; assume curdir */
|
||||
}
|
||||
/* Relative path | not found in path: prepend cwd */
|
||||
if (getcwd (tmp, LT_PATHMAX) == NULL)
|
||||
lt_fatal ("getcwd failed");
|
||||
tmp_len = strlen(tmp);
|
||||
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
|
||||
memcpy (concat_name, tmp, tmp_len);
|
||||
concat_name[tmp_len] = '/';
|
||||
strcpy (concat_name + tmp_len + 1, wrapper);
|
||||
|
||||
if (check_executable(concat_name))
|
||||
return concat_name;
|
||||
XFREE(concat_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -4894,7 +5230,7 @@ EOF
|
|||
# are only useful if you want to execute the "real" binary.
|
||||
# Since the "real" binary is built for $host, then this
|
||||
# wrapper might as well be built for $host, too.
|
||||
$run $LTCC -s -o $cwrapper $cwrappersource
|
||||
$run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
|
||||
;;
|
||||
esac
|
||||
$rm $output
|
||||
|
@ -5128,9 +5464,9 @@ fi\
|
|||
$run ${rm}r "$gentop"
|
||||
$show "$mkdir $gentop"
|
||||
$run $mkdir "$gentop"
|
||||
status=$?
|
||||
if test "$status" -ne 0 && test ! -d "$gentop"; then
|
||||
exit $status
|
||||
exit_status=$?
|
||||
if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
|
||||
exit $exit_status
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -5797,18 +6133,7 @@ relink_command=\"$relink_command\""
|
|||
outputname=
|
||||
if test "$fast_install" = no && test -n "$relink_command"; then
|
||||
if test "$finalize" = yes && test -z "$run"; then
|
||||
tmpdir="/tmp"
|
||||
test -n "$TMPDIR" && tmpdir="$TMPDIR"
|
||||
tmpdir="$tmpdir/libtool-$$"
|
||||
save_umask=`umask`
|
||||
umask 0077
|
||||
if $mkdir "$tmpdir"; then
|
||||
umask $save_umask
|
||||
else
|
||||
umask $save_umask
|
||||
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
|
||||
continue
|
||||
fi
|
||||
tmpdir=`func_mktempdir`
|
||||
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
|
||||
outputname="$tmpdir/$file"
|
||||
# Replace the output file specification.
|
||||
|
@ -5932,7 +6257,7 @@ relink_command=\"$relink_command\""
|
|||
# Exit here if they wanted silent mode.
|
||||
test "$show" = : && exit $EXIT_SUCCESS
|
||||
|
||||
$echo "----------------------------------------------------------------------"
|
||||
$echo "X----------------------------------------------------------------------" | $Xsed
|
||||
$echo "Libraries have been installed in:"
|
||||
for libdir in $libdirs; do
|
||||
$echo " $libdir"
|
||||
|
@ -5965,7 +6290,7 @@ relink_command=\"$relink_command\""
|
|||
$echo
|
||||
$echo "See any operating system documentation about shared libraries for"
|
||||
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
|
||||
$echo "----------------------------------------------------------------------"
|
||||
$echo "X----------------------------------------------------------------------" | $Xsed
|
||||
exit $EXIT_SUCCESS
|
||||
;;
|
||||
|
||||
|
@ -6182,9 +6507,17 @@ relink_command=\"$relink_command\""
|
|||
rmfiles="$rmfiles $objdir/$n"
|
||||
done
|
||||
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
|
||||
test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
|
||||
|
||||
if test "$mode" = uninstall; then
|
||||
case "$mode" in
|
||||
clean)
|
||||
case " $library_names " in
|
||||
# " " in the beginning catches empty $dlname
|
||||
*" $dlname "*) ;;
|
||||
*) rmfiles="$rmfiles $objdir/$dlname" ;;
|
||||
esac
|
||||
test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
|
||||
;;
|
||||
uninstall)
|
||||
if test -n "$library_names"; then
|
||||
# Do each command in the postuninstall commands.
|
||||
cmds=$postuninstall_cmds
|
||||
|
@ -6217,7 +6550,8 @@ relink_command=\"$relink_command\""
|
|||
IFS="$save_ifs"
|
||||
fi
|
||||
# FIXME: should reinstall the best remaining shared library.
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -6516,12 +6850,11 @@ exit $?
|
|||
# configuration. But we'll never go from static-only to shared-only.
|
||||
|
||||
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
|
||||
build_libtool_libs=no
|
||||
build_old_libs=yes
|
||||
disable_libs=shared
|
||||
# ### END LIBTOOL TAG CONFIG: disable-shared
|
||||
|
||||
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
|
||||
build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
|
||||
disable_libs=static
|
||||
# ### END LIBTOOL TAG CONFIG: disable-static
|
||||
|
||||
# Local Variables:
|
File diff suppressed because it is too large
Load Diff
|
@ -3,15 +3,101 @@
|
|||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
|
||||
AC_CONFIG_AUX_DIR(build)
|
||||
AM_INIT_AUTOMAKE(libilbc,0.1)
|
||||
AC_CONFIG_SRCDIR([src])
|
||||
|
||||
#Set default language
|
||||
AC_LANG_C
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
|
||||
#Check for compiler vendor
|
||||
AX_COMPILER_VENDOR
|
||||
|
||||
# Optimize
|
||||
AC_ARG_ENABLE(optimization,
|
||||
[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])
|
||||
|
||||
if test "${enable_optimizer}" = "yes" ; then
|
||||
AC_DEFINE([OPTIMZER],[],[Enable Optimization.])
|
||||
AX_CC_MAXOPT
|
||||
fi
|
||||
|
||||
# Enable debugging
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
|
||||
|
||||
if test "${enable_debug}" = "yes"; then
|
||||
AC_DEFINE([DEBUG],[],[Enable extra debugging.])
|
||||
AX_CFLAGS_WARN_ALL_ANSI
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
|
||||
|
||||
|
||||
case "$host" in
|
||||
*-solaris2*)
|
||||
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then SOLINK="-Bdynamic -dy -G"
|
||||
new_AM_CFLAGS="-KPIC -DPIC"
|
||||
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||
FUNC_DEF=__func__
|
||||
IN_LINE=""
|
||||
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then SOLINK="-Bdynamic -dy -G"
|
||||
new_AM_CFLAGS="-fPIC"
|
||||
new_AM_LDFLAGS=""
|
||||
IN_LINE=inline
|
||||
fi
|
||||
DYNAMIC_LIB_EXTEN="so"
|
||||
;;
|
||||
*-darwin*)
|
||||
if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||
SOLINK="-dynamic -bundle -force-flat-namespace"
|
||||
new_AM_CFLAGS="-DMACOSX"
|
||||
new_AM_LDFLAGS=""
|
||||
fi
|
||||
DYNAMIC_LIB_EXTEN="dylib"
|
||||
IN_LINE=inline
|
||||
;;
|
||||
x86_64-*-linux-gnu)
|
||||
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
||||
SOLINK="-Bdynamic -dy -G"
|
||||
new_AM_CFLAGS="-KPIC -DPIC"
|
||||
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||
FUNC_DEF=__func__
|
||||
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||
SOLINK="-shared -Xlinker -x"
|
||||
new_AM_CFLAGS="-fPIC"
|
||||
new_AM_LDFLAGS=""
|
||||
fi
|
||||
DYNAMIC_LIB_EXTEN="so"
|
||||
IN_LINE=inline
|
||||
;;
|
||||
i*6-*-linux-gnu)
|
||||
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
||||
SOLINK="-Bdynamic -dy -G"
|
||||
new_AM_CFLAGS="-KPIC -DPIC"
|
||||
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
|
||||
FUNC_DEF=__func__
|
||||
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
|
||||
SOLINK="-shared -Xlinker -x"
|
||||
new_AM_CFLAGS="-fpic"
|
||||
new_AM_LDFLAGS=""
|
||||
fi
|
||||
DYNAMIC_LIB_EXTEN="so"
|
||||
IN_LINE=inline
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(new_AM_CFLAGS)
|
||||
AC_SUBST(new_AM_LDFLAGS)
|
||||
AC_SUBST(SOLINK)
|
||||
AC_SUBST(DYNAMIC_LIB_EXTEN)
|
||||
AC_DEFINE_UNQUOTED([__FUNCTION__],[$FUNC_DEF],[define it the right way ;)])
|
||||
AC_DEFINE_UNQUOTED([__inline__],[$IN_LINE],[sunpro is bad at inline])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
|
|
Loading…
Reference in New Issue