summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-31 14:08:52 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-31 14:08:52 +0100
commitb0607c580af756ff0ccd1229d91b4b6a97c76d24 (patch)
tree27f64134720fc9dca224e6313b0505fa43cb8dd8
parentfe2112a1ac52fbf65e2624b978f9d33f04b6af56 (diff)
parentadebccc0fc011b6d1abe2f682bbfc866dffee73e (diff)
downloadxine-lib-b0607c580af756ff0ccd1229d91b4b6a97c76d24.tar.gz
xine-lib-b0607c580af756ff0ccd1229d91b4b6a97c76d24.tar.bz2
Merge -newbuild.
-rw-r--r--Makefile.am18
-rwxr-xr-xautogen.sh12
-rwxr-xr-xconfig.rpath133
-rw-r--r--configure.ac3661
-rw-r--r--contrib/Makefile.am87
-rwxr-xr-xcontrib/ffmpeg-universal.sh77
-rw-r--r--contrib/libdca/Makefile.am13
-rw-r--r--contrib/libmpcdec/Makefile.am11
-rw-r--r--contrib/libxdg-basedir/Makefile.am3
-rwxr-xr-xdebian/rules6
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/README3
-rw-r--r--doc/README.macosx141
-rw-r--r--include/Makefile.am6
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/os_internal.h99
-rw-r--r--lib/timedlock.c33
-rw-r--r--m4/Makefile.am37
-rw-r--r--m4/_xine.m4568
-rw-r--r--m4/aa.m4272
-rw-r--r--m4/arts.m4168
-rw-r--r--m4/attributes.m465
-rw-r--r--m4/audio_out.m4239
-rw-r--r--m4/decoders.m4489
-rw-r--r--m4/directx.m494
-rw-r--r--m4/dl.m453
-rw-r--r--m4/dvdnav.m4187
-rw-r--r--m4/gas.m4197
-rw-r--r--m4/gettext/Makefile.am32
-rw-r--r--m4/gettext/codeset.m4 (renamed from m4/codeset.m4)0
-rw-r--r--m4/gettext/gettext.m4 (renamed from m4/gettext.m4)280
-rw-r--r--m4/gettext/glibc2.m4 (renamed from m4/glibc2.m4)0
-rw-r--r--m4/gettext/glibc21.m4 (renamed from m4/glibc21.m4)0
-rw-r--r--m4/gettext/iconv.m4 (renamed from m4/iconv.m4)16
-rw-r--r--m4/gettext/intdiv0.m4 (renamed from m4/intdiv0.m4)0
-rw-r--r--m4/gettext/intmax.m4 (renamed from m4/intmax.m4)0
-rw-r--r--m4/gettext/inttypes-pri.m4 (renamed from m4/inttypes-pri.m4)0
-rw-r--r--m4/gettext/inttypes.m4 (renamed from m4/inttypes.m4)0
-rw-r--r--m4/gettext/inttypes_h.m4 (renamed from m4/inttypes_h.m4)0
-rw-r--r--m4/gettext/isc-posix.m4 (renamed from m4/isc-posix.m4)0
-rw-r--r--m4/gettext/lcmessage.m4 (renamed from m4/lcmessage.m4)0
-rw-r--r--m4/gettext/lib-ld.m4 (renamed from m4/lib-ld.m4)0
-rw-r--r--m4/gettext/lib-link.m4 (renamed from m4/lib-link.m4)115
-rw-r--r--m4/gettext/lib-prefix.m4 (renamed from m4/lib-prefix.m4)42
-rw-r--r--m4/gettext/longdouble.m4 (renamed from m4/longdouble.m4)0
-rw-r--r--m4/gettext/longlong.m4 (renamed from m4/longlong.m4)0
-rw-r--r--m4/gettext/nls.m4 (renamed from m4/nls.m4)24
-rw-r--r--m4/gettext/po.m4 (renamed from m4/po.m4)83
-rw-r--r--m4/gettext/printf-posix.m4 (renamed from m4/printf-posix.m4)0
-rw-r--r--m4/gettext/progtest.m4 (renamed from m4/progtest.m4)0
-rw-r--r--m4/gettext/signed.m4 (renamed from m4/signed.m4)0
-rw-r--r--m4/gettext/size_max.m4 (renamed from m4/size_max.m4)0
-rw-r--r--m4/gettext/stdint_h.m4 (renamed from m4/stdint_h.m4)0
-rw-r--r--m4/gettext/uintmax_t.m4 (renamed from m4/uintmax_t.m4)0
-rw-r--r--m4/gettext/ulonglong.m4 (renamed from m4/ulonglong.m4)0
-rw-r--r--m4/gettext/wchar_t.m4 (renamed from m4/wchar_t.m4)0
-rw-r--r--m4/gettext/wint_t.m4 (renamed from m4/wint_t.m4)0
-rw-r--r--m4/gettext/xsize.m4 (renamed from m4/xsize.m4)0
-rw-r--r--m4/input.m4280
-rw-r--r--m4/ioctl_request.m452
-rw-r--r--m4/irixal.m419
-rw-r--r--m4/libFLAC.m427
-rw-r--r--m4/libfame.m4183
-rw-r--r--m4/libtool15.m46168
-rw-r--r--m4/macosx.m443
-rw-r--r--m4/objc.m4253
-rw-r--r--m4/opengl.m474
-rw-r--r--m4/optimizations.m4259
-rw-r--r--m4/package.m472
-rw-r--r--m4/pkg.m46
-rw-r--r--m4/programs.m4124
-rw-r--r--m4/pthreads.m425
-rw-r--r--m4/summary.m4364
-rw-r--r--m4/types.m4215
-rw-r--r--m4/video_out.m4519
-rw-r--r--m4/xine.m4256
-rw-r--r--m4/xv.m493
-rw-r--r--misc/Makefile.common12
-rw-r--r--misc/SlackBuild.in14
-rw-r--r--misc/build_rpms.sh.in12
-rwxr-xr-xmisc/relchk.sh.in2
-rw-r--r--misc/xine-lib.spec.in4
-rw-r--r--po/Makefile.in.in58
-rw-r--r--po/Makefile.in.in.diff30
-rw-r--r--src/audio_out/Makefile.am105
-rw-r--r--src/combined/Makefile.am14
-rw-r--r--src/demuxers/Makefile.am38
-rw-r--r--src/dxr3/Makefile.am39
-rw-r--r--src/input/Makefile.am94
-rw-r--r--src/input/libdvdnav/Makefile.am6
-rw-r--r--src/input/libreal/Makefile.am19
-rw-r--r--src/input/librtsp/Makefile.am16
-rw-r--r--src/input/vcd/Makefile.am27
-rw-r--r--src/input/vcd/libcdio/Makefile.am42
-rw-r--r--src/input/vcd/libvcd/Makefile.am69
-rw-r--r--src/liba52/Makefile.am41
-rw-r--r--src/libfaad/Makefile.am102
-rw-r--r--src/libffmpeg/Makefile.am37
-rw-r--r--src/libmad/Makefile.am64
-rw-r--r--src/libmpeg2/Makefile.am12
-rw-r--r--src/libmpeg2new/Makefile.am11
-rw-r--r--src/libmpeg2new/libmpeg2/Makefile.am3
-rw-r--r--src/libreal/Makefile.am9
-rw-r--r--src/libspucc/Makefile.am10
-rw-r--r--src/libspucmml/Makefile.am5
-rw-r--r--src/libspudec/Makefile.am31
-rw-r--r--src/libspudvb/Makefile.am5
-rw-r--r--src/libsputext/Makefile.am3
-rw-r--r--src/libw32dll/DirectShow/Makefile.am33
-rw-r--r--src/libw32dll/Makefile.am37
-rw-r--r--src/libw32dll/dmo/Makefile.am28
-rw-r--r--src/libw32dll/wine/Makefile.am58
-rw-r--r--src/libxineadec/Makefile.am26
-rw-r--r--src/libxineadec/gsm610/Makefile.am5
-rw-r--r--src/libxineadec/nosefart/Makefile.am5
-rw-r--r--src/libxinevdec/Makefile.am14
-rw-r--r--src/post/Makefile.am3
-rw-r--r--src/post/audio/Makefile.am5
-rw-r--r--src/post/deinterlace/Makefile.am9
-rw-r--r--src/post/deinterlace/plugins/Makefile.am48
-rw-r--r--src/post/goom/Makefile.am47
-rw-r--r--src/post/mosaico/Makefile.am7
-rw-r--r--src/post/planar/Makefile.am39
-rw-r--r--src/post/visualizations/Makefile.am9
-rw-r--r--src/vdr/Makefile.am2
-rw-r--r--src/video_out/Makefile.am119
-rw-r--r--src/video_out/libdha/Makefile.am22
-rw-r--r--src/video_out/libdha/kernelhelper/Makefile.am43
-rw-r--r--src/video_out/macosx/Makefile.am25
-rw-r--r--src/video_out/vidix/Makefile.am17
-rw-r--r--src/video_out/vidix/drivers/Makefile.am62
-rw-r--r--src/xine-engine/Makefile.am44
-rw-r--r--src/xine-utils/Makefile.am42
-rwxr-xr-xversion.sh50
134 files changed, 5351 insertions, 12682 deletions
diff --git a/Makefile.am b/Makefile.am
index f41b34b2c..548f93312 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
## Process this file with automake to produce Makefile.in
##
-AUTOMAKE_OPTIONS = 1.8 no-dist-gzip dist-bzip2
+AUTOMAKE_OPTIONS = 1.9 no-dist-gzip dist-bzip2
ACLOCAL_AMFLAGS = -I m4
@@ -48,22 +48,8 @@ pass2:
@$(MAKE) MULTIPASS_CFLAGS='$(PASS2_CFLAGS)'
-debug:
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) $@) || exit;\
- done;
-
-debug-install: install-debug
-
-install-debug: debug
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) $@) || exit; \
- done;
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
-
-
prune-cache:
- -rm -f config.cache
+ -rm -rf config.cache autom4te.cache
release-check:
diff --git a/autogen.sh b/autogen.sh
index e228f051b..95bce9774 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -27,11 +27,11 @@
PROG=xine-lib
# Minimum value required to build
-WANT_AUTOMAKE_1_8=1 export WANT_AUTOMAKE_1_8
-WANT_AUTOMAKE=1.8 export WANT_AUTOMAKE
-AUTOMAKE_MIN=1.8.0
+export WANT_AUTOMAKE_1_9=1
+export WANT_AUTOMAKE=1.9
+AUTOMAKE_MIN=1.9.0
AUTOCONF_MIN=2.59
-LIBTOOL_MIN=1.4.0
+LIBTOOL_MIN=1.5.20
# Check how echo works in this /bin/sh
case `echo -n` in
@@ -192,7 +192,7 @@ run_automake () {
echo $_echo_n " + Running automake: $_echo_c";
- automake --gnu --add-missing --copy;
+ automake --gnu --add-missing --copy -Wno-portability;
echo "done."
}
@@ -231,7 +231,7 @@ run_aclocal () {
echo $_echo_n " + Running aclocal: $_echo_c"
- aclocal -I m4
+ aclocal -I m4 -I m4/gettext
echo "done."
}
diff --git a/config.rpath b/config.rpath
index 3f1bef34a..c492a93b6 100755
--- a/config.rpath
+++ b/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2005 Free Software Foundation, Inc.
+# Copyright 1996-2006 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -25,7 +25,7 @@
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
@@ -35,7 +35,17 @@ host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
@@ -48,7 +58,7 @@ else
wl='-Wl,'
;;
darwin*)
- case "$cc_basename" in
+ case $cc_basename in
xlc*)
wl='-Wl,'
;;
@@ -78,6 +88,13 @@ else
como)
wl='-lopt='
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
esac
;;
osf3* | osf4* | osf5*)
@@ -120,6 +137,10 @@ case "$host_os" in
with_gnu_ld=no
fi
;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
openbsd*)
with_gnu_ld=no
;;
@@ -127,6 +148,12 @@ esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
@@ -162,9 +189,20 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
+ interix3*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
netbsd*)
;;
- solaris* | sysv5*)
+ solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
@@ -173,16 +211,23 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
sunos4*)
hardcode_direct=yes
;;
- linux*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
@@ -191,10 +236,8 @@ if test "$with_gnu_ld" = yes; then
fi
;;
esac
- if test "$ld_shlibs" = yes; then
- # Unlike libtool, we use -rpath here, not --rpath, since the documented
- # option of GNU ld is called -rpath, not --rpath.
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
@@ -225,6 +268,7 @@ else
break
fi
done
+ ;;
esac
fi
hardcode_direct=yes
@@ -244,6 +288,7 @@ else
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
+ ;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
@@ -291,7 +336,7 @@ else
if test "$GCC" = yes ; then
:
else
- case "$cc_basename" in
+ case $cc_basename in
xlc*)
;;
*)
@@ -326,24 +371,25 @@ else
# but as the default location of the library.
hardcode_minus_L=yes
;;
- hpux10* | hpux11*)
+ hpux10*)
if test "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=no
- ;;
- ia64*)
- hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
hardcode_direct=no
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
;;
*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -397,8 +443,6 @@ else
fi
hardcode_libdir_separator=:
;;
- sco3.2v5*)
- ;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
@@ -427,14 +471,11 @@ else
ld_shlibs=yes
fi
;;
- sysv4.2uw2*)
- hardcode_direct=yes
- hardcode_minus_L=no
- ;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
;;
- sysv5*)
- hardcode_libdir_flag_spec=
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
@@ -471,12 +512,12 @@ case "$host_os" in
;;
kfreebsd*-gnu)
;;
- freebsd*)
+ freebsd* | dragonfly*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
- case "$host_cpu" in
+ case $host_cpu in
ia64*)
shrext=.so
;;
@@ -488,6 +529,8 @@ case "$host_os" in
;;
esac
;;
+ interix3*)
+ ;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
@@ -523,16 +566,16 @@ case "$host_os" in
;;
osf3* | osf4* | osf5*)
;;
- sco3.2v5*)
- ;;
solaris*)
;;
sunos4*)
;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ sysv4 | sysv4.3*)
;;
sysv4*MP*)
;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ ;;
uts4*)
;;
esac
diff --git a/configure.ac b/configure.ac
index ebe51cb2b..4b012a868 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,232 +1,208 @@
-dnl
-dnl Configure.ac for xine
-dnl
+AC_PREREQ(2.59)
+
+m4_include([m4/objc.m4])
-AC_INIT
+dnl Note that autoconf/autoheader/automake cache using autom4te, so version.sh
+dnl will only be run if configure.ac has changed. This must be done before
+dnl AC_INIT so that XINE_VERSION_SPEC, which is an m4 macro, is available.
+m4_esyscmd([./version.sh])
+
+dnl Initialize autoconf, autoheader, and automake
+AC_INIT([xine-lib], XINE_VERSION_SPEC, [xine-bugs@lists.sourceforge.net])
+AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/xine-engine/xine.c])
AC_CONFIG_LIBOBJ_DIR([lib])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
-dnl
-dnl Require autoconf version 2.60
-dnl
-AC_PREREQ(2.59)
+AH_TOP([#ifndef __XINE_LIB_CONFIG_H__
+#define __XINE_LIB_CONFIG_H__ 1
+])
+AH_BOTTOM([#ifdef ASMALIGN_1SLN
+# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
+#else
+# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
+#endif
-dnl Making releases:
-dnl XINE_SUB += 1; continue with XINE_LT_* values below
-dnl
-XINE_MAJOR=1
-XINE_MINOR=1
-XINE_SUB=90
+/* include internal system specific header */
+#include "os_internal.h"
-#if test $XINE_SUB -eq 0 ; then
-# XINE_SUBPART="";
-#else
- XINE_SUBPART=".$XINE_SUB"
-#fi
-
-dnl The libtool version numbers (XINE_LT_*); Don't even think about faking this!
-dnl
-dnl immediately before every release do:
-dnl ===================================
-dnl if (the interface is totally unchanged from previous release)
-dnl XINE_LT_REVISION ++;
-dnl else { /* interfaces have been added, removed or changed */
-dnl XINE_LT_REVISION = 0;
-dnl XINE_LT_CURRENT ++;
-dnl if (any interfaces have been _added_ since last release)
-dnl XINE_LT_AGE ++;
-dnl if (any interfaces have been _removed_ or _incompatibly changed_)
-dnl XINE_LT_AGE = 0;
-dnl }
-dnl
-dnl If you want to know more about what you are doing, here are some details:
-dnl * XINE_LT_CURRENT is the current API version
-dnl * XINE_LT_REVISION is an internal revision number which is increased when the API
-dnl itself did not change
-dnl * XINE_LT_AGE is the number of previous API versions still supported by this library
-dnl * libtool has its own numbering scheme, because local library numbering schemes
-dnl are platform dependent
-dnl * in Linux, the library will be named
-dnl libname.so.(XINE_LT_CURRENT - XINE_LT_AGE).XINE_LT_AGE.XINE_LT_REVISION
-
-XINE_LT_CURRENT=19
-XINE_LT_REVISION=0
-XINE_LT_AGE=17
-
-dnl for a release tarball do "rm .cvsversion" before "make dist"
-if test -f "${srcdir-.}/.cvsversion"; then
- XINE_PRE="hg"
-else
- XINE_PRE=""
+#endif /* __XINE_LIB_CONFIG_H__ */
+])
+
+test x"$prefix" = x"NONE" && prefix="${ac_default_prefix}"
+test x"$exec_prefix" = x"NONE" && exec_prefix='${prefix}'
+
+dnl Use features of autoconf 2.61, but stay compatible with older versions.
+if test x"$datarootdir" = x""; then
+ datarootdir='${datadir}'
+ AC_SUBST(datarootdir)
+fi
+
+if test x"$docdir" = x""; then
+ docdir='${datarootdir}/doc/${PACKAGE}'
+ AC_SUBST(docdir)
+fi
+
+if test x"$htmldir" = x""; then
+ htmldir='${docdir}'
+ AC_SUBST(htmldir)
fi
+
+dnl -------------------------
+dnl Setup version information
+dnl -------------------------
+
+dnl Do not change these manually; they come from running ./version.sh when
+dnl autoconf runs. This must all be done after AC_INIT is done, but running
+dnl the version.sh script must be done before AC_INIT.
+XINE_MAJOR=XINE_VERSION_MAJOR
AC_SUBST(XINE_MAJOR)
+AC_DEFINE_UNQUOTED([XINE_MAJOR], [$XINE_MAJOR], [xine major version number])
+XINE_MINOR=XINE_VERSION_MINOR
AC_SUBST(XINE_MINOR)
+AC_DEFINE_UNQUOTED([XINE_MINOR], [$XINE_MINOR], [xine minor version number])
+XINE_SUB=XINE_VERSION_SUB
AC_SUBST(XINE_SUB)
-AC_SUBST(XINE_IFACE_AGE)
-AC_SUBST(XINE_BIN_AGE)
-
-AC_DEFINE_UNQUOTED(XINE_MAJOR, $XINE_MAJOR,[xine major version number])
-AC_DEFINE_UNQUOTED(XINE_MINOR, $XINE_MINOR,[xine minor version number])
-AC_DEFINE_UNQUOTED(XINE_SUB, $XINE_SUB, [xine sub version number])
+AC_DEFINE_UNQUOTED([XINE_SUB], [$XINE_SUB], [xine sub version number])
+XINE_LT_CURRENT=__XINE_LT_CURRENT
AC_SUBST(XINE_LT_CURRENT)
+XINE_LT_REVISION=__XINE_LT_REVISION
AC_SUBST(XINE_LT_REVISION)
+XINE_LT_AGE=__XINE_LT_AGE
AC_SUBST(XINE_LT_AGE)
-SPEC_VERSION=$XINE_MAJOR.$XINE_MINOR${XINE_SUBPART}$XINE_PRE
-TAR_NAME="xine-lib-"$SPEC_VERSION
-dnl TAR_NAME="xine-lib-"$XINE_MAJOR-$XINE_PRE
-dnl SPEC_VERSION=${XINE_MAJOR}_$XINE_PRE
-
-AC_SUBST(TAR_NAME)
-AC_SUBST(SPEC_VERSION)
-
-LIBNAME=libxine$XINE_MAJOR
+LIBNAME="libxine${XINE_MAJOR}"
AC_SUBST(LIBNAME)
+AC_DEFINE_UNQUOTED([XINE_TEXTDOMAIN], "$LIBNAME", [catalog message text domain])
+
+dnl Always set flags to begin with -g so that debug information will be
+dnl included. In release bulids, this can be stripped out later if desired.
+dnl More importantly, it prevents autoconf from initializing the defaults to
+dnl include -O2, which is not desirable in a debug build, and it messes with
+dnl other optimizations that we'll want to be setting ourselves later.
+CFLAGS="-g $CFLAGS"
+CPPFLAGS="-D_REENTRANT -DXINE_COMPILE $CPPFLAGS"
+LDFLAGS="-g $LDFLAGS"
+OBJCFLAGS="-g $OBJCFLAGS"
+
+
+dnl ------------------------------
+dnl Build modes: debug and profile
+dnl ------------------------------
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug], [build with debugging code enabled])],
+ [], [enable_debug="no"])
+if test x"$enable_debug" != x"no"; then
+ CPPFLAGS="-DDEBUG $CPPFLAGS"
+else
+ CPPFLAGS="-DNDEBUG $CPPFLAGS"
+fi
+AM_CONDITIONAL([DEBUG_BUILD], [test x"$enable_debug" != x"no"])
-AC_DEFINE_UNQUOTED(XINE_TEXTDOMAIN, "$LIBNAME", [catalog message text domain])
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling], [build with profiling code enabled])],
+ [], [enable_profiling="no"])
+if test x"$enable_profiling" != x"no"; then
+ CFLAGS="-pg $CFLAGS"
+ OBJCFLAGS="-pg $OBJCFLAGS"
+ LDFLAGS="-pg $LDFLAGS"
+fi
+AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"])
-dnl
-AM_INIT_AUTOMAKE("xine-lib", $SPEC_VERSION)
-dnl AM_INIT_AUTOMAKE("xine-lib", $XINE_MAJOR-$XINE_PRE)
-dnl ---------------------------------------------
-dnl Made possible to build for another arch.
-dnl ---------------------------------------------
+dnl --------------
+dnl Build features
+dnl --------------
-AC_CANONICAL_HOST
-AC_CANONICAL_BUILD
+AC_ARG_ENABLE([ipv6],
+ [AS_HELP_STRING([--enable-ipv6], [enable use of IPv6])],
+ [if test x"$enableval" != x"no"; then
+ AC_DEFINE([ENABLE_IPV6], 1, [Enable this when IPv6 is requested])
+ fi])
-test "$host" == "$build" && check_athlon=yes
+AC_ARG_ENABLE([antialiasing],
+ [AS_HELP_STRING([--enable-antialiasing], [enable font antialiasing])],
+ [if test x"$enableval" != x"no"; then
+ AC_DEFINE([ENABLE_ANTIALIASING], 1, [Define this to 1 to enable font antialising.])
+ fi])
-AC_CONFIG_HEADERS([config.h])
-AC_ARG_ENABLE([macosx-universal],
- AS_HELP_STRING([--enable-macosx-universal], [build a Mac OS X univeral binary (ppc and x86)]),
- [], [enable_macosx_universal="no"])
-if test x"$enable_macosx_universal" != x"no" ; then
- case "$host_os" in
- *darwin*)
- dnl x64_64 and ppc64 binaries could also be built, but there is no
- dnl version of Mac OS X currently shipping that can run them, so
- dnl do not enable them by default for now.
- if test x"$enable_macosx_universal" = x"yes" ; then
- UNIVERSAL_ARCHES="i386 ppc"
- else
- UNIVERSAL_ARCHES=`echo "$enable_macosx_universal" | sed -e 's/,/ /g'`
- fi
- ;;
- *)
- AC_MSG_ERROR([Universal binaries can only be built on Darwin])
- ;;
- esac
+dnl ----------------------------------------------
+dnl Cross compilation, Mac OS X Universal Binaries
+dnl ----------------------------------------------
- UNIVERSAL_CFLAGS="$UNIVERSAL_CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
- UNIVERSAL_LDFLAGS="$UNIVERSAL_LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
- if test x"$UNIVERSAL_ARCHES" != x"" ; then
- # Forcibly disable dependency tracking for Universal builds, because -M
- # does not work with multiple -arch arguments on the gcc command-line.
- ac_tool_warned=yes
- cross_compiling=yes
- enable_dependency_tracking=no
- host="`echo $host | sed -e s/$host_cpu/universal/g`"
- host_cpu=universal
-
- CFLAGS="$CFLAGS $UNIVERSAL_CFLAGS"
- OBJCFLAGS="$OBJCFLAGS $UNIVERSAL_CFLAGS"
- LDFLAGS="$LDFLAGS $UNIVERSAL_LDFLAGS"
- AC_DEFINE(XINE_MACOSX_UNIVERSAL_BINARY, 1, [Define this if a universal binary is being built for Mac OS X])
- for arch in $UNIVERSAL_ARCHES ; do
- UNIVERSAL_CFLAGS="$UNIVERSAL_CFLAGS -arch $arch"
- UNIVERSAL_LDFLAGS="$UNIVERSAL_LDFLAGS -arch $arch"
- CFLAGS="$CFLAGS -arch $arch"
- OBJCFLAGS="$OBJCFLAGS -arch $arch"
- LDFLAGS="$LDFLAGS -arch $arch"
- done
- fi
-fi
-AM_CONDITIONAL([MACOSX_UNIVERSAL_BINARY], [test x"$enable_macosx_universal" = x"yes"])
-AC_SUBST(UNIVERSAL_ARCHES)
-AC_SUBST(UNIVERSAL_CFLAGS)
-AC_SUBST(UNIVERSAL_LDFLAGS)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+dnl check for Mac OS X universal binary support early, because certain flags
+dnl must be set prior to looking for cc/libtool, etc.
+MACOSX_UNIVERSAL_BINARIES
-dnl ---------------------------------------------
-dnl Check for programs.
-dnl ---------------------------------------------
+dnl Check to see if $host is empty. If it is, try $host_alias instead.
+dnl If $host is empty, it's because the user has run ./configure with a host
+dnl parameter unknown to config.sub. This used to be set in xv handling, but
+dnl it's also used in a bunch of other places unrelated to Xwindows support,
+dnl so if X is disabled, other things could go badly.
+host_or_hostalias="$host"
+test x"$host_or_hostalias" = x"" && host_or_hostalias="$host_alias"
-AC_PROG_CC
-AM_PROG_AS
-case "$host_os" in
- *darwin*)
- m4_ifdef([AC_PROG_OBJC],
- [AC_PROG_OBJC],
- [AC_CHECK_TOOL([OBJC], [gcc])
- AC_SUBST([OBJC])
- AC_SUBST([OBJCFLAGS])
- ])
- CPPFLAGS="$CPPFLAGS -DCONFIG_DARWIN"
- ;;
-esac
+dnl -------------------
+dnl checks for programs
+dnl -------------------
+AC_PROG_CC
AC_GNU_SOURCE
-dnl Save CFLAGS, AC_ISC_POSIX set some unwanted default CFLAGS
-saved_CFLAGS="$CFLAGS"
AC_ISC_POSIX
-AC_PATH_MAGIC
-CFLAGS="$saved_CFLAGS"
-AC_HEADER_STDC
+
+AC_PROG_OBJC
+
+CC_PROG_AS
AC_PROG_MAKE_SET
AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_AWK
-AC_C_INLINE
AC_CHECK_TOOL([STRINGS], [strings], [false])
-dnl ---------------------------------------------
-dnl Libtool
-dnl ---------------------------------------------
+PKG_PROG_PKG_CONFIG
+
+dnl Check for documentation formatting tools
+AC_CHECK_PROG([SGMLTOOLS], [sgmltools], [sgmltools], [no])
+AM_CONDITIONAL([HAVE_SGMLTOOLS], [test x"$SGMLTOOLS" != x"no"])
+
+AC_CHECK_PROG([FIG2DEV], [fig2dev], [fig2dev], [no])
+AM_CONDITIONAL([HAVE_FIG2DEV], [test x"$FIG2DEV" != x"no"])
+
+dnl libtool
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
-AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
+AC_LIBTOOL_DLOPEN
AC_LIBTOOL_WIN32_DLL
+AC_PATH_MAGIC
AC_PROG_LIBTOOL
AC_PROG_LIBTOOL_SANITYCHECK
-AC_SUBST(LIBTOOL_DEPS)
-if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
- STATIC="-static"
-else
- STATIC=
-fi
-AC_SUBST(STATIC)
-
-
-dnl ---------------------------------------------
-dnl Requirements for macros whose first invocations are conditional
-dnl ---------------------------------------------
-PKG_PROG_PKG_CONFIG
-CC_CHECK_WERROR
-dnl ---------------------------------------------
-dnl NLS Support
-dnl ---------------------------------------------
+dnl --------------------
+dnl checks for libraries
+dnl --------------------
-dnl ALL_LINGUAS="cs da de el en@quot en@boldquot es et fr gl id it ja ko nl nn no pl pt pt_BR ru sl sv tr zh"
AM_ICONV
AC_ARG_ENABLE([iconvtest],
- AS_HELP_STRING([--disable-iconvtest], [don't require iconv library]))
-if test "x$enable_iconvtest" != xno; then
- if test "x$am_cv_func_iconv" != xyes; then
- AC_MSG_ERROR([
+ [AS_HELP_STRING([--disable-iconvtest], [don't require iconv library])])
+if test x"$enable_iconvtest" != x"no"; then
+ if test x"$am_cv_func_iconv" != x"yes"; then
+ AC_MSG_ERROR([
****************************************************************
* iconv library not found. It's necessary for proper *
* manipulation with texts so xine requires it as default. *
@@ -235,2186 +211,768 @@ if test "x$enable_iconvtest" != xno; then
* by option --with-libiconv-prefix. *
* *
* If you don't want iconv support use the option *
-* --disable-iconvtest. *
+* --disable-iconvtest. *
****************************************************************
- ])
- fi
+])
+ fi
fi
AM_GNU_GETTEXT([external])
AC_PROG_GMSGFMT_PLURAL
-AC_CHECK_FUNCS([nl_langinfo])
-
-dnl ---------------------------------------------
-dnl Checks for typedefs, structures, and compiler characteristics.
-dnl ---------------------------------------------
-
-AC_C_BIGENDIAN
-AC_C_CONST
-dnl AC_C_ALWAYS_INLINE removal allows ffmpeg to be more widely buildable
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(long)
-dnl AC_CHECK_TYPES([ptrdiff_t])
-dnl For systems without inttypes.h would be needed extend generated replacement.
-AC_CHECK_GENERATE_INTTYPES([include])
-AM_CONDITIONAL(GENERATED_INTTYPES_H, test "x$ac_cv_header_inttypes_h" != x"yes")
-AC_CHECK_TYPE(ssize_t, :, AC_DEFINE(ssize_t, __int64, [define ssize_t to __int64 if it's missing in default includes]))
-
-dnl ---------------------------------------------
-dnl threads and OS specific stuff
-dnl ---------------------------------------------
-
-CC_PTHREAD_FLAGS(, [AC_MSG_ERROR([Pthread support is needed])])
-
-dnl
-AC_MSG_CHECKING(for recursive mutex support in pthread)
-ac_save_LIBS="$LIBS"
-LIBS="$LIBS $PTHREAD_LIBS"
-
-have_recursive_mutex=no
-AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
-
-int main() {
- pthread_mutexattr_t attr;
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- return 0;
-}
- ]),[
- have_recursive_mutex=yes
- ],[
- AC_MSG_ERROR(recursive mutex support is needed - please report)
- ])
-LIBS="$ac_save_LIBS"
-
-AC_MSG_RESULT($have_recursive_mutex)
-
-AC_CHECK_DECL(sysi86,[
- AC_DEFINE(HAVE_SYSI86,1,[Define this if the 'sysi86' function is declared in sys/sysi86.h])
- ],,[
-#include <sys/sysi86.h>
-])
-
-dnl ---------------------------------------------
-dnl Windows ports checks
-dnl ---------------------------------------------
-case "$host" in
- *-*-mingw* | *-*-cygwin*)
- dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
- dnl in which case we are actually dealing with a mingw32 compiler
- case "$host" in
- *-*-mingw32*)
- SYS=mingw32
- ;;
- *-*-cygwin*)
- AC_EGREP_CPP(pattern,
- [#ifdef WIN32
- yes
- #endif],
- SYS=mingw32, SYS=cygwin)
- ;;
- esac
-
- if test "$SYS" = "mingw32"; then
- WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include'
- LIBS="-lwinmm -lwsock32 $LIBS"
- GOOM_LIBS="-liberty"
- fi
- LDFLAGS="-no-undefined $LDFLAGS"
- ;;
-esac
-AC_SUBST(GOOM_LIBS)
-AC_SUBST(WIN32_CPPFLAGS)
-AM_CONDITIONAL(WIN32, test "x$SYS" = "xmingw32")
-
-
-dnl ---------------------------------------------
-dnl dynamic linker
-dnl ---------------------------------------------
-AM_DL()
-
-
-dnl ---------------------------------------------
-dnl determine libdir name
-dnl ---------------------------------------------
-
-AC_MSG_CHECKING([libdir name])
-case $host in
-*-*-linux*)
- # Test if the compiler is 64bit
- echo 'int i;' > conftest.$ac_ext
- xine_cv_cc_64bit_output=no
- if AC_TRY_EVAL(ac_compile); then
- case `"$MAGIC_CMD" conftest.$ac_objext` in
- *"ELF 64"*)
- xine_cv_cc_64bit_output=yes
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-case $host_cpu:$xine_cv_cc_64bit_output in
-powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
- XINE_LIBNAME="lib64"
- ;;
-*:*)
- XINE_LIBNAME="lib"
- ;;
-esac
-AC_MSG_RESULT([$XINE_LIBNAME])
-
-dnl ---------------------------------------------
-dnl libxdg-basedir detection
-dnl ---------------------------------------------
+AC_CHECK_LIB([c], [dlopen], [DYNAMIC_LD_LIBS=""],
+ [AC_CHECK_LIB([dl], [dlopen], [DYNAMIC_LD_LIBS="-ldl"],
+ [AC_MSG_CHECKING(for dlopen under win32)
+ AC_LANG_PUSH([C])
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${srcdir}/win32/include $CPPFLAGS"
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -lkernel32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ #include <dlfcn.h>]], [[dlopen(NULL, 0)]])],
+ [DYNAMIC_LD_LIBS="-lkernel32"
+ AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS"
+ AC_LANG_POP([C])], [AC_MSG_ERROR([dynamic linker needed])])])
+AC_SUBST([DYNAMIC_LD_LIBS])
AC_ARG_WITH([external-libxdg-basedir],
- AS_HELP_STRING([--with-external-libxdg-basedir], [use external copy of libxdg-basedir]))
+ [AS_HELP_STRING([--with-external-libxdg-basedir], [use external copy of libxdg-basedir])])
-if test "x$with_external_libxdg_basedir" = "xyes"; then
- PKG_CHECK_MODULES([XDG_BASEDIR], [libxdg-basedir >= 0.1.3])
+if test x"$with_external_libxdg_basedir" = x"yes"; then
+ PKG_CHECK_MODULES([XDG_BASEDIR], [libxdg-basedir >= 0.1.3])
else
- XDG_BASEDIR_CFLAGS='-I$(top_srcdir)/contrib/libxdg-basedir'
- XDG_BASEDIR_LIBS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
- XDG_BASEDIR_DEPS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
+ XDG_BASEDIR_CPPFLAGS='-I$(top_srcdir)/contrib/libxdg-basedir'
+ XDG_BASEDIR_LIBS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
+ XDG_BASEDIR_DEPS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
fi
-AC_SUBST([XDG_BASEDIR_CFLAGS])
+AC_SUBST([XDG_BASEDIR_CPPFLAGS])
AC_SUBST([XDG_BASEDIR_LIBS])
AC_SUBST([XDG_BASEDIR_DEPS])
-AM_CONDITIONAL([EXTERNAL_LIBXDG_BASEDIR], [test "x$with_external_libxdg_basedir" = "xyes"])
-
-dnl ---------------------------------------------
-dnl mpeg2lib and ffmpeg stuff
-dnl ---------------------------------------------
-
-AC_SUBST(LIBMPEG2_CFLAGS)
-
-AC_ARG_WITH([external-ffmpeg], AS_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
-
-case "x$with_external_ffmpeg" in
- xyes)
- PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0])
- ;;
- xsoft)
- with_external_ffmpeg=yes
- PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [],
- [AC_MSG_RESULT(no); with_external_ffmpeg=no])
- ;;
-esac
-if test "x$with_external_ffmpeg" = "xyes"; then
- PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
- AC_SUBST([FFMPEG_CFLAGS])
- AC_SUBST([FFMPEG_LIBS])
- AC_SUBST([FFMPEG_POSTPROC_CFLAGS])
- AC_SUBST([FFMPEG_POSTPROC_LIBS])
- AC_DEFINE([HAVE_FFMPEG], [1], [Define this if you have ffmpeg library])
-
- AC_MSG_NOTICE([
-*********************************************************************
-xine is configured with external ffmpeg.
-
-This requires the same version of ffmpeg what is included in xine and
-you should know what you do. If some problems occur, please try to
-use internal ffmpeg.
-*********************************************************************])
-else
- AC_MSG_RESULT([using included ffmpeg])
-fi
-AM_CONDITIONAL(HAVE_FFMPEG, test "x$with_external_ffmpeg" = "xyes")
-
-
-AC_ARG_ENABLE([ffmpeg_uncommon_codecs],
- AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs]))
-AC_ARG_ENABLE([ffmpeg_popular_codecs],
- AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs]))
-
-AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test "x$enable_ffmpeg_uncommon_codecs" = "xno"])
-AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test "x$enable_ffmpeg_popular_codecs" = "xno"])
-
-LIBMPEG2_CFLAGS=""
-
-AC_CHECK_DECL(lrintf,[
- AC_DEFINE(HAVE_LRINTF,1,[Define this if the 'lrintf' function is declared in math.h])
- AC_DEFINE(_ISOC9X_SOURCE,1,[Define this if you are ISO C9X compliant])
- ],,[
-#define _ISOC9X_SOURCE
-#include <math.h>
-])
-AC_CHECK_DECL(rintf,[
- AC_DEFINE(HAVE_RINTF,1,[Define this if the 'rintf' function is declared in math.h])
- ],,[
-#include <math.h>
-])
-
-AC_CHECK_FUNCS(memalign)
-
-AC_ARG_ENABLE([altivec],
- AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs]))
-
-AC_ARG_ENABLE([vis],
- AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs]))
-
-AC_ARG_ENABLE([mlib],
- AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support]))
-
-AC_ARG_ENABLE([mlib-lazyload],
- AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime]))
-
-if test "x$enable_mlib" != xno; then
- if test "x$MLIBHOME" = x; then
- mlibhome=/opt/SUNWmlib
- else
- mlibhome="$MLIBHOME"
- fi
-
- AC_CHECK_LIB(mlib, mlib_VideoAddBlock_U8_S16,
- [ saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$mlibhome/include"
- AC_CHECK_HEADER(mlib_video.h,
- [ if test "x$enable_mlib_lazyload" = xyes; then
- if test "$GCC" = yes; then
- MLIB_LIBS="-L$mlibhome/lib -Wl,-z,lazyload,-lmlib,-z,nolazyload"
- else
- MLIB_LIBS="-L$mlibhome/lib -z lazyload -lmlib -z nolazyload"
- fi
- AC_DEFINE(MLIB_LAZYLOAD,1,[Define this if you want to load mlib lazily])
- else
- MLIB_LIBS="-L$mlibhome/lib -lmlib"
- fi
- MLIB_CFLAGS="-I$mlibhome/include"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS $MLIB_CFLAGS"
- LIBFFMPEG_CFLAGS="$LIBFFMPEG_CFLAGS $MLIB_CFLAGS"
- AC_DEFINE(HAVE_MLIB,1,[Define this if you have mlib installed])
- AC_DEFINE(LIBMPEG2_MLIB,1,[Define this if you have mlib installed])
- ac_have_mlib=yes
- ],)
- CPPFLAGS="$saved_CPPFLAGS"
- ], , -L$mlibhome/lib)
-fi
-AM_CONDITIONAL(HAVE_MLIB, test "x$ac_have_mlib" = "xyes")
-AC_SUBST(MLIB_LIBS)
-AC_SUBST(MLIB_CFLAGS)
-
-dnl ---------------------------------------------
-dnl Checks for X11
-dnl ---------------------------------------------
-
-if test "x$with_x" != "xno"; then
- PKG_CHECK_MODULES([X], [x11 xext], , [
- AC_PATH_XTRA
-
- dnl Set xv_path if its not done already
- dnl we do it here before rewriting X_LIBS
- if test x$xv_path = x; then
- xv_path=`echo $X_LIBS | sed -e 's/\-L\(.*\)/\1/'`
- fi
-
- dnl ----------------------------------------------
- dnl Check for XShm support (required with X)
- dnl ----------------------------------------------
-
- if test "x$no_x" != "xyes"; then
- ac_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- AC_CHECK_HEADERS([X11/extensions/XShm.h], [true],
- [AC_MSG_ERROR([XShm extension is required])])
- AC_CHECK_LIB([Xext], [main], [true],
- [AC_MSG_ERROR([libXext is required])], [$X_LIBS])
- CPPFLAGS="$ac_save_CPPFLAGS"
- X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext"
- fi
- ])
-else
- no_x="yes"
-fi
-
-if test "x$no_x" != "xyes"; then
- AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed])
-fi
-AM_CONDITIONAL(HAVE_X11, [test "x$no_x" != "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Locate libraries needed for X health check
-dnl ---------------------------------------------
-
-soname_script="/[[0-9]]$/! d; s%^.*/%%
-t q
-b
-:q
-q"
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.so"* "${x_libraries:-/usr/lib}/libX11.so"* 2>/dev/null | sed -e \"${soname_script}\"`"
-AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.so}", [The soname of libX11, needed for dlopen()])
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.so"* "${x_libraries:-/usr/lib}/libXv.so"* 2>/dev/null | sed -e \"${soname_script}\"`"
-AC_DEFINE_UNQUOTED([LIBXV_SO], "${x_lib_location:-libXv.so}", [The soname of libXv, needed for dlopen()])
-
-
-dnl ---------------------------------------------
-dnl socket library
-dnl ---------------------------------------------
+AM_CONDITIONAL([EXTERNAL_LIBXDG_BASEDIR], [test x"$with_external_libxdg_basedir" = x"yes"])
dnl Test for socket and network support library
-NET_LIBS=""
-AC_CHECK_LIB(socket, socket, NET_LIBS="-lsocket $NET_LIBS",)
-AC_CHECK_LIB(nsl, gethostbyname, NET_LIBS="-lnsl $NET_LIBS",)
+AC_CHECK_LIB([socket], [socket], [NET_LIBS="-lsocket $NET_LIBS"])
+AC_CHECK_LIB([nsl], [gethostbyname], [NET_LIBS="-lnsl $NET_LIBS"])
+AC_CHECK_LIB([resolv], [hstrerror], [NET_LIBS="-lresolv $NET_LIBS"])
AC_SUBST(NET_LIBS)
-
-dnl ---------------------------------------------
-dnl socklen_t
-dnl ---------------------------------------------
-AC_CHECK_SOCKLEN_T
-
-
-dnl ---------------------------------------------
-dnl IPv6
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([ipv6],
- AS_HELP_STRING([--enable-ipv6], [enable use of IPv6]))
-
-if test "x$enable_ipv6" = "xyes"; then
- AC_DEFINE([ENABLE_IPV6], [1], [Enable this when IPv6 is requested])
-fi
-
-dnl ---------------------------------------------
-dnl zlib
-dnl ---------------------------------------------
-
-AC_ARG_WITH(zlib-prefix,
- AS_HELP_STRING(
- [--with-zlib-prefix=PREFIX],
- [path to zlib compression library]),
- [zlib_prefix="$withval"],
- [zlib_prefix="no"])
-
-if test "x$zlib_prefix" = "xno"; then
- ZLIB_LIBS="-lz"
-else
- ZLIB_CPPFLAGS="-I$zlib_prefix/include"
- ZLIB_LIBS="-L$zlib_prefix/lib -lz"
-fi
-
-ac_save_CPPFLAGS="$CPPFLAGS"
-ac_save_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
-LIBS="$LIBS $ZLIB_LIBS"
-
-AC_CHECK_LIB(z, gzsetparams,
- [AC_CHECK_HEADER(zlib.h,
- have_zlib=yes)])
-
-CPPFLAGS="$ac_save_CPPFLAGS"
-LIBS="$ac_save_LIBS"
-
-if test "x$have_zlib" != "xyes"; then
- AC_MSG_ERROR(zlib needed)
-fi
-AC_SUBST(ZLIB_CPPFLAGS)
-AC_SUBST(ZLIB_LIBS)
-
-
-dnl ---------------------------------------------
-dnl check posix timers
-dnl ---------------------------------------------
-
-AC_CHECK_LIB(rt, clock_getres,
+AC_CHECK_LIB([rt], [clock_getres],
[RT_LIBS="-lrt"
- AC_DEFINE(HAVE_POSIX_TIMERS,1,
- [Define this if you have POSIX timers.])],
- AC_MSG_RESULT([*** no POSIX timers available.]))
+ AC_DEFINE(HAVE_POSIX_TIMERS, 1, [Define this if you have POSIX timers.])],
+ [AC_MSG_RESULT([*** no POSIX timers available.])])
AC_SUBST(RT_LIBS)
-dnl ---------------------------------------------
-dnl Check for OpenGL & [GLut | GLU]
-dnl ---------------------------------------------
-
-AM_PATH_OPENGL()
+AC_CHECK_LIB([posix4], [sched_get_priority_min])
+AC_CHECK_LIB([kstat], [kstat_open],
+ [KSTAT_LIBS=-lkstat
+ AC_DEFINE([HAVE_KSTAT], 1, [Define this if you have kernel statistics available via kstat interface])])
+AC_SUBST(KSTAT_LIBS)
-dnl ---------------------------------------------
-dnl Check for platform which supports syncfb
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([syncfb],
- AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin]))
+AC_ARG_WITH([zlib-prefix],
+ [AS_HELP_STRING([--with-zlib-prefix=PREFIX], [path to zlib compression library])],
+ [if test x"$withval" != x"no"; then
+ ZLIB_CPPFLAGS="-I$withval/include"
+ ZLIB_LIBS="-L$withval/lib"
+ fi])
+
+AC_CHECK_LIB([z], [gzsetparams],
+ [ZLIB_LIBS="$ZLIB_LIBS -lz"
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
+ AC_CHECK_HEADER([zlib.h], [have_zlib=yes], [have_zlib=no])
+ CPPFLAGS="$ac_save_CPPFLAGS"],
+ [have_zlib=no],
+ ["$ZLIB_LIBS"])
+
+test x"$have_zlib" != x"yes" && AC_MSG_ERROR(zlib needed)
+AC_SUBST(ZLIB_CPPFLAGS)
+AC_SUBST(ZLIB_LIBS)
-case "$host_os" in
- *linux*) ;;
- *)
- if test "x$enable_syncfb" = "xyes"; then
- AC_MSG_ERROR([You cannot build SyncFB support on non-Linux systems.])
+dnl FreeType2 (optional; disabled by default)
+AC_ARG_WITH([freetype],
+ [AS_HELP_STRING([--with-freetype], [Build with FreeType2 library])],
+ [], [with_freetype=no])
+if test x"$with_freetype" != x"no"; then
+ PKG_CHECK_MODULES([FT2], [freetype2], [have_freetype=yes], [have_freetype=no])
+ if test x"$have_freetype" = x"no"; then
+ AC_MSG_ERROR([FreeType2 support requested but FreeType2 library not found])
+ elif test x"$have_freetype" = x"yes"; then
+ AC_DEFINE([HAVE_FT2], 1, [Define this if you have freetype2 library])
fi
- enable_syncfb=no ;;
-esac
-
-AM_CONDITIONAL(HAVE_SYNCFB, test "x$enable_syncfb" != "xno")
-
-
-dnl ----------------------------------------------
-dnl Check for usable video-for-linux (v4l) support
-dnl ----------------------------------------------
-AC_ARG_ENABLE([v4l],
- AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugin]))
-
-if test "x$enable_v4l" != "xno"; then
- AC_CHECK_HEADERS([linux/videodev.h], [have_v4l=yes], [have_v4l=no])
- AC_CHECK_HEADERS([asm/types.h])
- if test "x$enable_v4l" = "xyes" && test "x$have_v4l" = "xno"; then
- AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.])
- fi
fi
-AM_CONDITIONAL(HAVE_V4L, [test "x$have_v4l" = "xyes"])
-
-dnl ----------------------------------------------
-dnl Check for Xv and XvMC support
-dnl ----------------------------------------------
-
-dnl With recent XFree86 or Xorg, dynamic linking is preferred!
-dnl Only dynamic linking is possible when using libtool < 1.4.0
-
-AC_ARG_WITH(xv-path, AS_HELP_STRING([--with-xv-path=path], [where libXv is installed]),
- xv_path="$withval",)
-
-AC_ARG_ENABLE([static-xv],
- AS_HELP_STRING([--enable-static-xv],[Enable this to force linking against libXv.a]))
-
-if test "x$enable_static_xv" = "xyes"; then
- xv_prefer_shared="no"
-else
- xv_prefer_shared="yes"
+dnl fontconfig (optional; disabled by default)
+AC_ARG_WITH([fontconfig],
+ [AS_HELP_STRING([--with-fontconfig], [Build with fontconfig library])],
+ [], [with_fontconfig=no])
+if test x"$with_fontconfig" = x"yes"; then
+ if test x"$have_freetype" != x"yes"; then
+ AC_MSG_ERROR([fontconfig support requested, but FreeType2 not enabled.])
+ fi
+ PKG_CHECK_MODULES([FONTCONFIG], [fontconfig], [have_fontconfig=yes], [have_fontconfig=no])
+ if test x"$have_fontconfig" = x"no"; then
+ AC_MSG_ERROR([fontconfig support requested but fontconfig library not found])
+ elif test x"$have_fontconfig" = x"yes"; then
+ AC_DEFINE([HAVE_FONTCONFIG], 1, [Define this if you have fontconfig library])
+ fi
fi
-if test "x$no_x" != "xyes"; then
- PKG_CHECK_MODULES([XV], [xv], [
- ac_have_xv="yes"
- AC_DEFINE([HAVE_XV], [1], [Define this if you have libXv installed])
- ], [AC_FIND_LIBXV])
-fi
-AM_CONDITIONAL(HAVE_XV, test "x$ac_have_xv" = "xyes")
+dnl -----------------------
+dnl checks for header files
+dnl -----------------------
-host_or_hostalias="$host"
-if test "$host_or_hostalias" = ""; then
- dnl user has called ./configure with a host parameter unknown to
- dnl config.sub; the canonical "$host" is empty
- dnl
- dnl Try the following switch with user's original host_alias
- dnl input instead.
- dnl
- host_or_hostalias="$host_alias"
-fi
+AC_HEADER_STDC
-case "$host_or_hostalias" in
- hppa*)
- if test "x$ac_have_xv_static" = "xyes"; then
- echo "warning: hppa linker - disabling static libXv"
- XV_LIBS="libXv.so"
- fi
- ;;
-
- ppc-*-linux* | powerpc-*)
- ppc_arch="yes"
- ;;
+AC_CHECK_HEADERS([alloca.h])
+AC_CHECK_HEADERS([assert.h byteswap.h dirent.h errno.h execinfo.h fcntl.h glob.h])
+AC_CHECK_HEADERS([libgen.h malloc.h netdb.h stdbool.h ucontext.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h sys/wait.h])
- *)
+dnl This is duplicative due to AC_HEADER_STDC, but src/input/vcd stuff needs to
+dnl have HAVE_STDIO_H defined, or it won't compile.
+AC_CHECK_HEADERS([stdio.h])
+
+dnl cdrom ioctls (common for dvdnav and vcd)
+case "$host_os" in
+ linux*)
+ AC_CHECK_HEADERS([linux/cdrom.h],
+ [AC_DEFINE([HAVE_LINUX_CDROM], 1, [Define 1 if you have Linux-type CD-ROM support])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/cdrom.h>]],
+ [[struct cdrom_generic_command test; int has_timeout = sizeof(test.timeout);]])],
+ [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1], [Define 1 if timeout is in cdrom_generic_command struct])])])
;;
esac
-AM_CONDITIONAL(PPC_ARCH, test "x$ppc_arch" = "xyes")
-
-dnl
-dnl Check if we can enable the xxmc plugin.
-dnl
-
-AC_ARG_ENABLE([xvmc],
- AS_HELP_STRING([--disable-xvmc], [Disable XxMC and XvMC outplut plugins]) )
-
-if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then
-
-AC_ARG_WITH(xxmc-path, AS_HELP_STRING([--with-xxmc-path=path], [where libXvMC libraries for the
- xxmc plugin are installed. Defalts to the default X library path.]),
- xxmc_path="$withval", xxmc_path="$x_libraries")
-AC_ARG_WITH(xxmc-lib, AS_HELP_STRING([--with-xxmc-lib=XXXX], [The name of the XvMC library
- libXXXX.so for the xxmc plugin.]),xxmc_stub="$withval",
- xxmc_stub="XvMCW")
-
-saved_libs="$LIBS"
-saved_CPPFLAGS="$CPPFLAGS"
-if test "x$x_includes" != "x"; then
- CPPFLAGS="$CPPFLAGS -I$x_includes"
-fi
-
-XXMC_LIBS="-L$xxmc_path -l$xxmc_stub"
-AC_MSG_CHECKING(whether to enable the xxmc plugin with vld extensions)
-AC_MSG_RESULT()
-dnl Check if vld "extended" XvMC is available
-if test "x$xxmc_stub" == "xXvMCW" && test "x$ac_have_xv" == "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCPutSlice,
- ac_have_xxmc="yes",
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for vld extensions.])],
- [-L$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
-else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCPutSlice,
- [ac_have_xxmc="yes"
- XXMC_LIBS="$XXMC_LIBS -lXvMC"],
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub -lXvMC for vld extensions.])],
- [-L$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xxmc="no",
- fi
-fi
-
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/vldXvMC.h,
- [ac_have_vldxvmc_h="yes"],
- ac_have_vldxvmc="no",)
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- AC_DEFINE([HAVE_VLDXVMC], [1],
- [Define 1 if you have vldXvMC.h])
- fi
-fi
-dnl Try fallback to standard XvMC if vld failed
-if test "x$ac_have_xxmc" = "xno"; then
- if test "x$xxmc_stub" == "xXvMCW"; then
- AC_CHECK_LIB($xxmc_stub, XvMCCreateContext,
- ac_have_xxmc="yes",
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for standard XvMC.])],
- [-L$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCCreateContext,
- [ac_have_xxmc="yes"
- XXMC_LIBS="$XXMC_LIBS -lXvMC"],
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -lXvMC for standard XvMC.])],
- [-L$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xxmc="no",
- fi
- fi
-fi
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/XvMC.h,,
- ac_have_xxmc="no",)
-fi
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_DEFINE(HAVE_XXMC,1,[Define this to compile the xxmc plugin.])
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- AC_MSG_RESULT([*** Enabling xxmc plugin with vld extensions.])
- else
- AC_MSG_RESULT([*** Enabling xxmc plugin for standard XvMC *only*.])
- fi
-else
- AC_MSG_RESULT([*** Disabling xxmc plugin due to above errors.])
-fi
-LIBS="$saved_libs"
-fi
-AM_CONDITIONAL(HAVE_VLDXVMC, test "x$ac_have_vldxvmc_h" = "xyes")
-AM_CONDITIONAL(HAVE_XXMC, test "x$ac_have_xxmc" = "xyes")
-AC_SUBST(XXMC_LIBS)
-
-dnl
-dnl Check if we can enable the xvmc plugin.
-dnl
-if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then
-
-AC_ARG_WITH(xvmc-path, AS_HELP_STRING([--with-xvmc-path=path], [where libXvMC libraries for the
- xvmc plugin are installed. Defalts to the default X library path.]),
- xvmc_path="$withval", xvmc_path="$x_libraries")
-AC_ARG_WITH(xvmc-lib, AS_HELP_STRING([--with-xvmc-lib=XXXX], [The name of the XvMC library
- libXXXX.so for the xvmc plugin.]),xvmc_stub="$withval",
- xvmc_stub="XvMCW")
-saved_libs="$LIBS"
-XVMC_LIBS="-L$xvmc_path -l$xvmc_stub"
-AC_MSG_CHECKING(whether to enable the xvmc plugin)
-AC_MSG_RESULT()
-if test "x$xvmc_stub" == "xXvMCW"; then
- AC_CHECK_LIB($xvmc_stub, XvMCCreateContext,
- ac_have_xvmc="yes",
- [ac_have_xvmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xvmc_stub.])],
- [-L$xvmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
-else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xvmc_stub, XvMCCreateContext,
- [ac_have_xvmc="yes"
- XVMC_LIBS="$XVMC_LIBS -lXvMC"],
- [ac_have_xvmc="no"
- AC_MSG_RESULT([*** Could not link with -lXvMC.])],
- [-L$xvmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xvmc="no",
- fi
-fi
-if test "x$ac_have_xvmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/XvMC.h,,
- ac_have_xvmc="no",)
-fi
-if test "x$ac_have_xvmc" = "xyes"; then
- AC_DEFINE(HAVE_XVMC,1,[Define this if you have an XvMC library and XvMC.h installed.])
- AC_MSG_RESULT([*** Enabling old xvmc plugin.])
-else
- AC_MSG_RESULT([*** Disabling old xvmc plugin due to above errors.])
-fi
-CPPFLAGS="$saved_CPPFLAGS"
-LIBS="$saved_libs"
-fi
-AM_CONDITIONAL(HAVE_XVMC, test "x$ac_have_xvmc" = "xyes")
-AC_SUBST(XVMC_LIBS)
-
-
-dnl ---------------------------------------------
-dnl Check for xcb
-dnl ---------------------------------------------
-AC_ARG_WITH([xcb], AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins]))
-
-if test "x$with_xcb" != "xno"; then
- PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb="yes"], [have_xcb="no"])
-fi
-
-AC_SUBST(XCB_CFLAGS)
-AC_SUBST(XCB_LIBS)
-AM_CONDITIONAL(HAVE_XCB, test "x$have_xcb" = "xyes" )
-
-
-dnl ---------------------------------------------
-dnl Check for xcb-shm
-dnl ---------------------------------------------
-
-if test "x$have_xcb" = "xyes"; then
- PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm="yes"], [have_xcbshm="no"])
-fi
-
-AC_SUBST(XCBSHM_CFLAGS)
-AC_SUBST(XCBSHM_LIBS)
-AM_CONDITIONAL(HAVE_XCBSHM, test "x$have_xcbshm" = "xyes" )
-
-
-dnl ---------------------------------------------
-dnl Check for xcb-xv
-dnl ---------------------------------------------
-
-if test "x$have_xcb" = "xyes"; then
- PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"])
-fi
-
-AC_SUBST(XCBXV_CFLAGS)
-AC_SUBST(XCBXV_LIBS)
-AM_CONDITIONAL(HAVE_XCBXV, test "x$have_xcbxv" = "xyes" )
+AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h])
-dnl ---------------------------------------------
-dnl Checks for Xinerama extension
-dnl ---------------------------------------------
+dnl ----------------
+dnl checks for types
+dnl ----------------
-AC_ARG_ENABLE([xinerama],
- AS_HELP_STRING([--disable-xinerama], [do not build Xinerama support]))
-
-if test "x$enable_xinerama" != "xno"; then
- PKG_CHECK_MODULES([XINERAMA], [xinerama], [ac_have_xinerama=yes], [
- AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
- [XINERAMA_LIBS="-lXinerama"
- ac_have_xinerama="yes"],,
- [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
- ])
- if test "x$ac_have_xinerama" = "xyes"; then
- AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
- X_LIBS="${X_LIBS} ${XINERAMA_LIBS}"
- fi
-else
- ac_have_xinerama=no
-fi
-dnl AM_CONDITIONAL(HAVE_XINERAMA, test "x$ac_have_xinerama" = "xyes")
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+AC_CHECK_GENERATE_INTTYPES([include])
+AM_CONDITIONAL([GENERATED_INTTYPES_H], [test "x$ac_cv_header_inttypes_h" != x"yes"])
+AC_CHECK_TYPE([ssize_t], [],
+ [AC_DEFINE([ssize_t], [__int64], [define ssize_t to __int64 if it's missing in default includes])])
+AC_CHECK_SOCKLEN_T
-
-dnl ---------------------------------------------
-dnl Checks for Ascii-Art library
-dnl ---------------------------------------------
+AC_CACHE_CHECK([type of request parameter for ioctl()], [ac_cv_ioctl_request], [
+ for ac_ioctl_request_type in "unsigned long" "int"; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>
+ int ioctl(int fd, $ac_ioctl_request_type request, ...);]], [[]])],
+ [ac_cv_ioctl_request=$ac_ioctl_request_type], [])
+ done
+ if test x"$ac_cv_ioctl_request" = x""; then
+ AC_MSG_ERROR([Unable to determine the type for ioctl() request parameter])
+ fi
+])
+AC_DEFINE_UNQUOTED([IOCTL_REQUEST_TYPE], [$ac_cv_ioctl_request], [Type of the request parameter for ioctl()])
-AC_ARG_ENABLE([aalib],
- AS_HELP_STRING([--disable-aalib], [do not build AALIB support]),
- [with_aalib=$enableval], [with_aalib=yes])
-if test "x$with_aalib" = "xyes"; then
- AM_PATH_AALIB(1.4,, AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***]))
-else
- no_aalib=yes
-fi
+dnl ---------------------
+dnl checks for structures
+dnl ---------------------
-AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes")
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+ [AC_DEFINE([HAVE_TM_GMTOFF], 1, [Define if struct tm has the tm_gmtoff member.])],
+ [], [#include <time.h>])
-dnl ---------------------------------------------
-dnl Checks for Color AsCii Art library
-dnl ---------------------------------------------
-AC_ARG_WITH([caca],
- AS_HELP_STRING([--without-caca], [Do not build CACA support]))
+dnl -----------------------------------
+dnl checks for compiler characteristics
+dnl -----------------------------------
-if test "x$with_caca" != "xno"; then
- PKG_CHECK_MODULES([CACA], [caca cucul], [have_caca="yes"], [have_caca="no"])
- if test "x$with_caca" = "xyes" && test "x$have_caca" = "xno"; then
- AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found])
- fi
+if test x"$GCC" = x"yes"; then
+ GCC_VERSION="`"$CC" -dumpversion`"
+ GCC_VERSION_MAJOR="`echo "$GCC_VERSION" | cut -d '.' -f1`"
+ GCC_VERSION_MINOR="`echo "$GCC_VERSION" | cut -d '.' -f2`"
+ GCC_VERSION_PATCHLEVEL="`echo "$GCC_VERSION" | cut -d '.' -f3`"
fi
-AM_CONDITIONAL([HAVE_CACA], [test "x$have_caca" = "xyes"])
-
-dnl ---------------------------------------------
-dnl Check solaris framebuffer device support
-dnl ---------------------------------------------
-
-AC_CHECK_HEADER(sys/fbio.h, ac_have_sunfb=yes,)
-AM_CONDITIONAL(HAVE_SUNFB, [test "x$ac_have_sunfb" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Check for Sun DGA
-dnl ---------------------------------------------
-
-saved_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -L/usr/openwin/lib"
-saved_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I/usr/openwin/include"
-AC_CHECK_LIB(dga, XDgaGrabDrawable, [
- AC_CHECK_HEADER(dga/dga.h, [
- SUNDGA_CFLAGS="-I/usr/openwin/include"
- SUNDGA_LIBS="-L/usr/openwin/lib -R/usr/openwin/lib -ldga"
- ac_have_sundga=yes
- ])
-])
-LDFLAGS="$saved_LDFLAGS"
-CPPFLAGS="$saved_CPPFLAGS"
-AM_CONDITIONAL(HAVE_SUNDGA, [test "x$ac_have_sundga" = "xyes"])
-AC_SUBST(SUNDGA_CFLAGS)
-AC_SUBST(SUNDGA_LIBS)
-
-
-dnl ---------------------------------------------
-dnl Check linux framebuffer device support
-dnl ---------------------------------------------
-
-AC_CHECK_HEADER(linux/fb.h,
- [AC_DEFINE(HAVE_FB,1,[Define this if you have linux framebuffer support])
- have_fb=yes],)
-AC_ARG_ENABLE(fb, AS_HELP_STRING([--disable-fb], [do not build linux framebuffer support]),
- have_fb=$enableval)
-AM_CONDITIONAL(HAVE_FB, [test "x$have_fb" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Check whether to build Mac OS X video output driver
-dnl ---------------------------------------------
+CC_CHECK_WERROR
-AC_ARG_ENABLE(macosx_video, AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]),
- have_macosx_video=$enableval)
-AM_CONDITIONAL(HAVE_MACOSX_VIDEO, [test "x$have_macosx_video" = "xyes"])
+CC_PTHREAD_FLAGS([], [AC_MSG_ERROR([Pthread support is needed])])
+CC_PTHREAD_RECURSIVE_MUTEX([], [AC_MSG_ERROR([recursive mutex support is needed - please report])])
+dnl REVISIT: AC_C_ALWAYS_INLINE removal allows ffmpeg to be more widely buildable
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+AC_C_RESTRICT
-dnl ---------------------------------------------
-dnl Check whether to build Mac OS X audio output driver
-dnl ---------------------------------------------
+dnl empty_array_size - src/input/vcd
+AC_MSG_CHECKING([how to create empty arrays])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } baz]])],
+ [empty_array_size=""],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } baz]])],
+ [empty_array_size="0"],
+ [AC_MSG_ERROR([compiler is unable to create empty arrays])])])
-AC_ARG_ENABLE(coreaudio, AS_HELP_STRING([--enable-coreaudio], [enable support for Mac OS X Coreaudio output]),
- have_coreaudio=$enableval)
-AM_CONDITIONAL(HAVE_COREAUDIO, [test "x$have_coreaudio" = "xyes"])
+AC_DEFINE_UNQUOTED([EMPTY_ARRAY_SIZE], [$empty_array_size], [what to put between the brackets for empty arrays])
+AC_MSG_RESULT([[[$empty_array_size]]])
+dnl ISOC99_PRAGMA - src/input/vcd/libvcd
+AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],
+ [ISOC99_PRAGMA=yes
+ AC_DEFINE([HAVE_ISOC99_PRAGMA], [], [Supports ISO _Pragma() macro])],
+ [ISOC99_PRAGMA=no])
+AC_MSG_RESULT([$ISOC99_PRAGMA])
-dnl ---------------------------------------------
-dnl Check for DirectFB
-dnl ---------------------------------------------
-AC_ARG_ENABLE(directfb,
- AS_HELP_STRING([--enable-directfb], [enable use of DirectFB]),
- enable_directfb=$enableval,
- enable_directfb=no)
-if test "x$enable_directfb" = "xyes"; then
- PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"])
-fi
+dnl ASM ALIGN is power of two ?
+dnl src/post/planar
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm(".align 3");]])],
+ [AC_DEFINE([ASMALIGN_1SLN], [1],
+ [define if '.align n' means alignment to (1 << n) - byte boundaries])])
-AC_SUBST(DIRECTFB_CFLAGS)
-AC_SUBST(DIRECTFB_LIBS)
-AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" )
+CC_ATTRIBUTE_ALIGNED
+CC_ATTRIBUTE_PACKED([XINE_PACKED='__attribute__((packed))'],
+ [AC_MSG_WARN([Your compiler doesn't support __attribute__((packed)); xine might not work as expected.])])
+AC_DEFINE_UNQUOTED([XINE_PACKED], [$XINE_PACKED], [Mark a structure as being packed])
-dnl ---------------------------------------------
-dnl check for SDL
-dnl ---------------------------------------------
+CC_ATTRIBUTE_MALLOC
-AC_ARG_WITH([sdl],
- AS_HELP_STRING([--without-sdl], [Build without SDL video output]))
+CC_ATTRIBUTE_VISIBILITY([protected],
+ [visibility_export="protected"],
+ [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])])
-if test "x$with_sdl" != "xno"; then
- PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no])
- if test "x$with_sdl" = "xyes" && test "x$have_sdl" = "xno"; then
- AC_MSG_ERROR([SDL support requested, but SDL not found])
- elif test "x$have_sdl" = "xyes"; then
- AC_DEFINE([HAVE_SDL], [1], [Define this if you have SDL installed])
- fi
+if test x"$visibility_export" != x""; then
+ CC_FLAG_VISIBILITY([VISIBILITY_FLAG="-fvisibility=hidden"
+ EXPORTED='__attribute__((visibility("default")))'])
fi
+AC_DEFINE_UNQUOTED([EXPORTED], [$EXPORTED], [Mark a symbol as being exported if visibility is changed])
+AC_SUBST([VISIBILITY_FLAG])
-AM_CONDITIONAL([HAVE_SDL], [test "x$have_sdl" = "xyes"])
-
-AC_SUBST([SDL_CFLAGS])
-AC_SUBST([SDL_LIBS])
-
-dnl ---------------------------------------------
-dnl check for Libstk
-dnl ---------------------------------------------
-
-AC_ARG_WITH([libstk],
- AS_HELP_STRING([--with-libstk], [Build with STK surface video driver]))
-
-if test "x$with_libstk" = "xyes"; then
- PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no])
- if test "x$with_libstk" = "xyes" && test "x$have_libstk" = "xno"; then
- AC_MSG_ERROR([libstk support requested, but libstk not found])
- fi
-fi
+CC_ATTRIBUTE_SENTINEL
+CC_ATTRIBUTE_FORMAT
+CC_ATTRIBUTE_FORMAT_ARG
-AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"])
+CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"])
-dnl ---------------------------------------------
-dnl check for pulseaudio
-dnl ---------------------------------------------
+dnl Set warning flags for warnings that we do not want to skip. In all cases,
+dnl these warnings should be enabled. Set these into CFLAGS and OBJCFLAGS
+dnl later after all testing is done.
-AC_ARG_WITH([pulseaudio],
- AS_HELP_STRING([--without-pulseaudio], [Do not build Pulseaudio support]))
+CC_CHECK_CFLAGS([-Wall], [warnflags="$warnflags -Wall"])
-if test "x$with_pulseaudio" != "xno"; then
- PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"])
+CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"],
+ [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])])
+if test x"$wformat" != x""; then
+ CC_CHECK_CFLAGS([-Wno-format-zero-length], [wformat="$wformat -Wno-format-zero-length"])
fi
-AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"])
-
-dnl ---------------------------------------------
-dnl check for DirectX
-dnl ---------------------------------------------
-
-AM_PATH_DIRECTX()
-
+CC_CHECK_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"])
+warnflags="$warnflags $wformat"
-dnl ---------------------------------------------
-dnl dxr3 / hollywood plus card
-dnl ---------------------------------------------
+dnl WARNING: This warning flag, if set into CFLAGS now, can break some autoconf tests.
+CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags -Werror-implicit-function-declaration"])
+CC_CHECK_CFLAGS([-Wstrict-aliasing=2], [warnflags="$warnflags -Wstrict-aliasing=2"],
+ [CC_CHECK_CFLAGS([-Wstrict-aliasing], [warnflags="$warnflags -Wstrict-aliasing"])])
+
+CC_CHECK_CFLAGS([-Wchar-subscripts], [warnflags="$warnflags -Wchar-subscripts"])
+CC_CHECK_CFLAGS([-Wmissing-declarations], [warnflags="$warnflags -Wmissing-declarations"])
+CC_CHECK_CFLAGS([-Wmissing-prototypes], [warnflags="$warnflags -Wmissing-prototypes"])
+
+dnl Some combinations of gcc and glibc produce useless warnings on memset when
+dnl compiling with -Wpointer-arith, so check for this first.
+AC_MSG_CHECKING([for sane -Wpointer-arith])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int))]])],
+ [warnflags="$warnflags -Wpointer-arith"
+ AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+
+dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
+dnl are requested, as different implementations are present; to avoid problems
+dnl use -Wl,-z,defs only for those platforms not behaving this way.
case "$host_or_hostalias" in
- *-linux*)
- AC_CHECK_DXR3()
- if test "x$have_libfame" = "xyes" ; then
- AC_DEFINE_UNQUOTED(HAVE_LIBFAME,1,[Define this if you have libfame mpeg encoder installed (fame.sf.net)])
- AM_PATH_LIBFAME(0.8.10,
- AC_DEFINE(HAVE_NEW_LIBFAME,1,[Define this if you have libfame 0.8.10 or above]))
- fi
- if test "x$have_librte" = "xyes" ; then
- AC_DEFINE_UNQUOTED(HAVE_LIBRTE,1,[Define this if you have librte mpeg encoder installed (zapping.sf.net)])
- fi
- ;;
- *)
- have_dxr3="no"
- have_libfame="no"
- have_librte="no"
- have_encoder="no"
- ;;
-esac
-AM_CONDITIONAL(HAVE_DXR3, test "x$have_dxr3" = "xyes")
-AM_CONDITIONAL(HAVE_LIBFAME, test "x$have_libfame" = "xyes")
-AM_CONDITIONAL(HAVE_LIBRTE, test "x$have_librte" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl Vidix/libdha
-dnl ---------------------------------------------
-
-AC_LINUX_PATH(/usr/src/linux)
-AC_SUBST([LINUX_INCLUDE])
-
-AC_ARG_ENABLE(vidix, AS_HELP_STRING([--disable-vidix], [do not build vidix support]),
- check_vidix=$enableval, check_vidix=yes)
-AC_ARG_ENABLE(dha-kmod, AS_HELP_STRING([--enable-dha-kmod], [build DHA kernel module]),
- enable_dha_kmod=$enableval,enable_dha_kmod=no)
-
-enable_vidix="no"
+ *-freebsd*) ;;
-AC_MSG_CHECKING(for vidix support)
-if test "x$check_vidix" = "xyes" -a "x$ac_cv_prog_AWK" != "xno"; then
- if test "x$no_x" != "xyes" -o "x$have_fb" = "xyes"; then
- case "$host_or_hostalias" in
- i?86-*-linux* | k?-*-linux* | athlon-*-linux*)
- enable_vidix="yes"
- enable_linux="yes"
- ;;
- i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*)
- enable_vidix="yes"
- enable_dha_kmod="no"
- ;;
- *)
- enable_dha_kmod="no"
- enable_vidix="no"
+ dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
+ dnl in which case we are actually dealing with a mingw32 compiler
+ dnl This cannot be done until AC_PROG_EGREP and AC_PROG_CC are both done.
+ *-*-mingw* | *-*-cygwin*)
+ CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
+ case "$host_or_hostalias" in
+ *-*-mingw32*)
+ WIN32_SYS=mingw32
+ ;;
+ *-*-cygwin*)
+ AC_EGREP_CPP([yes],
+ [#ifdef WIN32
+ yes
+ #endif],
+ [WIN32_SYS=mingw32], [WIN32_SYS=cygwin])
+ ;;
+ esac
+
+ if test "$WIN32_SYS" = "mingw32"; then
+ WIN32_INCLUDES='-I$(top_srcdir)/win32/include'
+ LIBS="-lwinmm -lwsock32 $LIBS"
+ GOOM_LIBS="-liberty"
+ AC_SUBST(GOOM_LIBS)
+ fi
+ LDFLAGS="-no-undefined $LDFLAGS"
;;
- esac
- fi
-fi
-AC_MSG_RESULT($enable_vidix)
-
-AC_MSG_CHECKING(for DHA linux kernel module build)
-if test "x$enable_dha_kmod" = "xyes"; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-AM_CONDITIONAL(HAVE_VIDIX, test "x$enable_vidix" = "xyes")
-AM_CONDITIONAL(HAVE_LINUX, test "x$enable_linux" = "xyes")
-AM_CONDITIONAL(BUILD_DHA_KMOD, test "x$enable_dha_kmod" = "xyes")
-AC_CHECK_PROG(MKNOD, mknod, mknod, no)
-AC_CHECK_PROG(DEPMOD, depmod, depmod, no, "$PATH:/sbin")
-
-
-dnl ---------------------------------------------
-dnl Ogg/Vorbis libs.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([vorbis],
- AS_HELP_STRING([--without-vorbis], [Build without Vorbis audio decoder]))
-
-if test "x$with_vorbis" != "xno"; then
- PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], [have_vorbis=no])
- if test "x$with_vorbis" = "xyes" && test "x$have_vorbis" = "xno"; then
- AC_MSG_ERROR([Vorbis support requested, but libvorbis not found])
- fi
-fi
-AM_CONDITIONAL([HAVE_VORBIS], [test "x$have_vorbis" = "xyes"])
-
-AC_SUBST([VORBIS_CFLAGS])
-AC_SUBST([VORBIS_LIBS])
-
-dnl ---------------------------------------------
-dnl Ogg/Theora libs.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([theora],
- AS_HELP_STRING([--without-theora], [Build without Theora video decoder]))
-
-if test "x$with_theora" != "xno"; then
- PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], [have_theora=no])
- if test "x$with_theora" = "xyes" && test "x$have_theora" = "xno"; then
- AC_MSG_ERROR([Theora support requested, but libtheora not found])
- elif test "x$have_theora" = "xyes"; then
- AC_DEFINE([HAVE_THEORA], [1], [Define this if you have theora])
- fi
-fi
-AM_CONDITIONAL([HAVE_THEORA], [test "x$have_theora" = "xyes"])
-AC_SUBST([THEORA_CFLAGS])
-AC_SUBST([THEORA_LIBS])
-
-dnl ---------------------------------------------
-dnl Ogg/Speex libs.
-dnl ---------------------------------------------
-AC_ARG_WITH([speex],
- AS_HELP_STRING([--without-speex], [Build without Speex audio decoder]))
-
-if test "x$with_speex" != "xno"; then
- PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no])
- if test "x$with_speex" = "xyes" && test "x$have_speex" = "xno"; then
- AC_MSG_ERROR([Speex support requested, but libspeex not found])
- elif test "x$have_speex" = "xyes"; then
- AC_DEFINE([HAVE_SPEEX], [1], [Define this if you have speex])
- fi
-fi
-AM_CONDITIONAL([HAVE_SPEEX], [test "x$have_speex" = "xyes"])
-
-AC_SUBST([SPEEX_CFLAGS])
-AC_SUBST([SPEEX_LIBS])
-
-dnl ---------------------------------------------
-dnl check for libFLAC
-dnl ---------------------------------------------
-
-AC_ARG_WITH([libflac],
- AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer]))
-
-have_libflac="no"
-if test "x$with_libflac" = "xyes"; then
- AM_PATH_LIBFLAC([have_libflac="yes"])
-fi
-
-AM_CONDITIONAL([HAVE_LIBFLAC], [test "x$have_libflac" = "xyes"])
-
-dnl ---------------------------------------------
-dnl External version of a52dec
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(a52dec, AS_HELP_STRING([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)]),
- [enable_a52dec="$enableval"], [enable_a52dec="yes"])
-AC_ARG_WITH(external-a52dec, AS_HELP_STRING([--with-external-a52dec], [use external a52dec library (not recommended)]),
- [external_a52dec="$withval"], [external_a52dec="no"])
-
-have_a52="no"
-
-if test "x$enable_a52dec" = "xno"; then
- AC_MSG_RESULT([a52dec support disabled])
-elif test "x$external_a52dec" = "xyes"; then
- have_a52="yes"
- AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h],, have_a52="no",
-[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_INTTYPES_H
- # include <inttypes.h>
- #endif
- #ifdef HAVE_STDINT_H
- # include <stdint.h>
- #endif
-
- #include <a52dec/a52.h>
-])
- SAVE_LIBS="$LIBS"
- AC_CHECK_LIB([a52], [a52_init],, have_a52="no", [-lm])
- LIBS="$SAVE_LIBS"
-
- if test "x$have_a52" = "xno"; then
- AC_MSG_RESULT([*** no usable version of a52dec found, using internal copy ***])
- fi
-else
- AC_MSG_RESULT([Use included a52dec support])
-fi
-
-AM_CONDITIONAL(A52, test "x$enable_a52dec" = "xyes")
-AM_CONDITIONAL(EXTERNAL_A52DEC, test "x$have_a52" = "xyes")
-
-dnl ---------------------------------------------
-dnl External version of libmad
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(mad, AS_HELP_STRING([--disable-mad], [Disable support for MAD decoding library (default: enabled)]),
- [enable_libmad="$enableval"], [enable_libmad="yes"])
-AC_ARG_WITH(external-libmad, AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)]),
- [external_libmad="$withval"], [external_libmad="no"])
-
-have_mad="no"
-
-if test "x$enable_libmad" = "xno"; then
- AC_MSG_RESULT([libmad support disabled])
-elif test "x$external_libmad" = "xyes"; then
- PKG_CHECK_MODULES(LIBMAD, [mad], have_mad=yes, have_mad=no)
- AC_CHECK_HEADERS([mad.h])
- AC_SUBST(LIBMAD_LIBS)
- AC_SUBST(LIBMAD_CFLAGS)
- if test "x$have_mad" = "xno"; then
- AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***])
- fi
-else
- AC_MSG_RESULT([Use included libmad support])
- case "$host_or_hostalias" in
- i?86-* | k?-* | athlon-* | pentium*-)
- AC_DEFINE(FPM_INTEL,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- x86_64-*)
- AC_DEFINE(FPM_64BIT,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- ppc-* | powerpc-*)
- AC_DEFINE(FPM_PPC,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- sparc*-*)
- if test "$GCC" = yes; then
- AC_DEFINE(FPM_SPARC,1,[Define to select libmad fixed point arithmetic implementation])
- else
- AC_DEFINE(FPM_64BIT,1,[Define to select libmad fixed point arithmetic implementation])
- fi
- ;;
- mips-*)
- AC_DEFINE(FPM_MIPS,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- alphaev56-* | alpha* | ia64-* | hppa*-linux-*)
- AC_DEFINE(FPM_64BIT,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- arm*-*)
- AC_DEFINE(FPM_ARM,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
*)
- AC_DEFINE(FPM_DEFAULT,1,[Define to select libmad fixed point arithmetic implementation])
- ;;
- esac
-fi
-
-AM_CONDITIONAL(MAD, test "x$enable_libmad" = "xyes")
-AM_CONDITIONAL(EXTERNAL_LIBMAD, test "x$have_mad" = "xyes")
-
-dnl ---------------------------------------------
-dnl External libmpcdec support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([musepack], AS_HELP_STRING([--disable-musepack], [Disable support for MusePack decoding (default: enabled)]))
-AC_ARG_WITH([external-libmpcdec], AS_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library]))
-
-if test "x$enable_musepack" = "xno"; then
- AC_MSG_RESULT([musepack support disabled])
-elif test "x$with_external_libmpcdec" = "xyes"; then
- AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], [have_mpcdec=yes])
- AC_CHECK_HEADERS([mpcdec/mpcdec.h], , [have_mpcdec=no])
- if test "x$have_mpcdec" != "xyes"; then
- AC_MSG_ERROR([Unable to find mpcdec])
- fi
- MPCDEC_LIBS="-lmpcdec"
- MPCDEC_CFLAGS=""
-else
- AC_MSG_RESULT([Use included libmusepack])
- MPCDEC_CFLAGS='-I$(top_srcdir)/contrib/libmpcdec'
- MPCDEC_LIBS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
- MPCDEC_DEPS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
-fi
-
-AC_SUBST(MPCDEC_LIBS)
-AC_SUBST(MPCDEC_DEPS)
-AC_SUBST(MPCDEC_CFLAGS)
-
-AM_CONDITIONAL([MUSEPACK], [test "x$enable_musepack" != "xno"])
-AM_CONDITIONAL([EXTERNAL_MPCDEC], [test "x$have_mpcdec" = "xyes"])
-
-dnl ---------------------------------------------
-dnl MNG libs.
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([mng],
- AS_HELP_STRING([--disable-mng], [do not build mng support]),
- [with_mng=$enableval], [with_mng=yes])
-
-if test "x$with_mng" = "xyes"; then
- AC_CHECK_LIB(mng, mng_initialize,
- [ AC_CHECK_HEADER(libmng.h,
- [ have_libmng=yes
- MNG_LIBS="-lmng" ],
- AC_MSG_RESULT([*** All libmng dependent parts will be disabled ***]))],
- AC_MSG_RESULT([*** All libmng dependent parts will be disabled ***]))
- AC_SUBST(MNG_LIBS)
-else
- have_libmng=no
-fi
-AM_CONDITIONAL(HAVE_LIBMNG, test "x$have_libmng" = "xyes")
-
-dnl ---------------------------------------------
-dnl MagickWand API of Imagemagick.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([imagemagick],
- AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder]))
-
-if test "x$with_imagemagick" != "xno"; then
- PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [have_imagemagick=no])
- if test "x$with_imagemagick" = "xyes" && test "x$have_imagemagick" = "xno"; then
- AC_MSG_ERROR([ImageMagick support requested, but Wand not found])
- elif test "x$have_imagemagick" = "xyes"; then
- AC_DEFINE([HAVE_WAND], [1], [Define this if you have ImageMagick installed])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_WAND], [test "x$have_imagemagick" = "xyes"])
-AC_SUBST(WAND_CFLAGS)
-AC_SUBST(WAND_LIBS)
-
-dnl ---------------------------------------------
-dnl freetype2 lib.
-dnl ---------------------------------------------
-AC_ARG_WITH([freetype],
- AS_HELP_STRING([--with-freetype], [Build with FreeType2 library]))
-
-if test "x$with_freetype" = "xyes"; then
- PKG_CHECK_MODULES([FT2], [freetype2], [have_freetype=yes], [have_freetype=no])
- if test "x$have_freetype" = "xno"; then
- AC_MSG_ERROR([FreeType2 support requested but FreeType2 library not found])
- elif test "x$have_freetype" = "xyes"; then
- AC_DEFINE([HAVE_FT2], [1], [Define this if you have freetype2 library])
- fi
-fi
-AC_SUBST([FT2_CFLAGS])
-AC_SUBST([FT2_LIBS])
-
-dnl ---------------------------------------------
-dnl fontconfig
-dnl ---------------------------------------------
-AC_ARG_WITH([fontconfig],
- AS_HELP_STRING([--with-fontconfig], [Build with fontconfig library]))
-
-if test "x$with_fontconfig" = "xyes"; then
- if test "x$have_freetype" != "xyes"; then
- AC_MSG_ERROR([fontconfig support requested, but FreeType2 not enabled.])
- fi
-
- PKG_CHECK_MODULES([FONTCONFIG], [fontconfig], [have_fontconfig=yes], [have_fontconfig=no])
- if test "x$have_fontconfig" = "xno"; then
- AC_MSG_ERROR([fontconfig support requested but fontconfig library not found])
- elif test "x$have_fontconfig" = "xyes"; then
- AC_DEFINE([HAVE_FONTCONFIG], [1], [Define this if you have fontconfig library])
- fi
-fi
-AC_SUBST([FONTCONFIG_CFLAGS])
-AC_SUBST([FONTCONFIG_LIBS])
-
-
-dnl ---------------------------------------------
-dnl OSS style audio interface
-dnl ---------------------------------------------
-AC_ARG_ENABLE([oss],
- AS_HELP_STRING([--disable-oss], [Do not build OSS audio output support]))
-
-if test "x$enable_oss" != "xno"; then
- AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break])
- AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_ossaudio=yes], [], [
- #ifdef HAVE_SYS_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif
- #ifdef HAVE_MACHINE_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif
- #ifdef HAVE_SOUNDCARD_H
- # include <soundcard.h>
- #endif
- ])
-
- AC_IOCTL_REQUEST
-fi
-
-AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl Alsa support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([alsa],
- AS_HELP_STRING([--without-alsa], [Build without ALSA audio output]))
-
-if test "x$with_alsa" != "xno"; then
- PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no])
- AC_SUBST([ALSA_LIBS])
- AC_SUBST([ALSA_CFLAGS])
- if test "x$have_alsa" = "xyes"; then
- AC_DEFINE([HAVE_ALSA], [1], [Define this if you have ALSA installed])
- elif test "x$with_alsa" = "xyes"; then
- AC_MSG_ERROR([ALSA support requested but not found.])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_ALSA], [test "x$have_alsa" = "xyes"])
-
-dnl ---------------------------------------------
-dnl ESD support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([esound],
- AS_HELP_STRING([--without-esound], [Build without ESounD audio output]))
-
-if test "x$with_esound" != "xno"; then
- PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no])
- if test "x$with_esound" = "xyes" && test "x$have_esound" = "xno"; then
- AC_MSG_ERROR([ESounD support requested, but libesd not found])
- elif test "x$have_esound" = "xyes"; then
- AC_DEFINE([HAVE_ESD], [1], [Define this if you have ESounD installed])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_ESD], [test "x$have_esound" = "xyes"])
-
-AC_SUBST([ESD_CFLAGS])
-AC_SUBST([ESD_LIBS])
-
-
-dnl ---------------------------------------------
-dnl ARTS support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([arts],
- AS_HELP_STRING([--without-arts], [Build without ARTS audio output]),
- [with_arts=$withval], [with_arts=yes])
-
-if test "x$with_arts" = "xyes"; then
- AM_PATH_ARTS(0.9.5,
- AC_DEFINE(HAVE_ARTS,1,[Define this if you have ARTS (libartsc) installed]),
- AC_MSG_RESULT(*** All of ARTS dependent parts will be disabled ***))
-else
- no_arts=yes
-fi
-AM_CONDITIONAL(HAVE_ARTS, test "x$no_arts" != "xyes")
-
-
-dnl ---------------------------------------------
-dnl FusionSound support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([fusionsound],
- AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio output]),
- [with_fusionsound=$withval], [with_fusionsound=no])
-
-if test "x$with_fusionsound" = "xyes"; then
- PKG_CHECK_MODULES(FUSIONSOUND, fusionsound >= 0.9.23,
- AC_DEFINE(HAVE_FUSIONSOUND,1,[Define to 1 if you have FusionSound.]),
- AC_MSG_RESULT(*** All of FusionSound dependent parts will be disabled ***))
- AC_SUBST(FUSIONSOUND_CFLAGS)
- AC_SUBST(FUSIONSOUND_LIBS)
-else
- no_fusionsound=yes
-fi
-AM_CONDITIONAL(HAVE_FUSIONSOUND, test "x$no_fusionsound" != "xyes")
-
-
-dnl ---------------------------------------------
-dnl JACK support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([jack],
- AS_HELP_STRING([--without-jack], [Build without Jack support]))
-
-if test "x$with_jack" != "xno"; then
- PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no])
-
- if test "x$with_jack" = "xyes" && test "x$have_jack" = "xno"; then
- AC_MSG_ERROR([Jack support requested, but Jack not found])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_JACK], [test "x$have_jack" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl gnome-vfs support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([gnomevfs],
- AS_HELP_STRING([--disable-gnomevfs], [do not build gnome-vfs support]),
- [with_gnome_vfs=$enableval], [with_gnome_vfs=yes])
-
-if test "x$with_gnome_vfs" = "xyes"; then
- PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0,
- no_gnome_vfs=no,
- no_gnome_vfs=yes)
- AC_SUBST(GNOME_VFS_CFLAGS)
- AC_SUBST(GNOME_VFS_LIBS)
- if test "x$no_gnome_vfs" != "xyes"; then
- AC_DEFINE(HAVE_GNOME_VFS,1,[Define this if you have gnome-vfs installed])
- else
- AC_MSG_RESULT(*** All of the gnome-vfs dependent parts will be disabled ***)
- fi
-else
- no_gnome_vfs=yes
-fi
-AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$no_gnome_vfs" != "xyes")
-
-dnl ---------------------------------------------
-dnl gdk-pixbuf support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([gdkpixbuf],
- AS_HELP_STRING([--disable-gdkpixbuf], [do not build gdk-pixbuf support]))
-
-if test "x$enable_gdkpixbuf" != "xno"; then
- PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0,
- no_gdkpixbuf=no,
- no_gdkpixbuf=yes)
- AC_SUBST(GDK_PIXBUF_CFLAGS)
- AC_SUBST(GDK_PIXBUF_LIBS)
- if test "x$no_gdkpixbuf" != "xyes"; then
- AC_DEFINE(HAVE_GDK_PIXBUF,1,[Define this if you have gdk-pixbuf installed])
- else
- AC_MSG_RESULT(*** All of the gdk-pixbuf dependent parts will be disabled ***)
- fi
-else
- no_gdkpixbuf=yes
-fi
-AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$no_gdkpixbuf" != "xyes")
-
-dnl ---------------------------------------------
-dnl libsmbclient support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([samba],
- AS_HELP_STRING([--disable-samba], [do not build Samba support]),
- [with_samba=$enableval], [with_samba=yes])
-
-if test "x$with_samba" = "xyes"; then
- AC_CHECK_LIB(smbclient, smbc_init,
- [ AC_CHECK_HEADER(libsmbclient.h,
- [ have_libsmbclient=yes
- LIBSMBCLIENT_LIBS="-lsmbclient" ],
- AC_MSG_RESULT([*** All libsmbclient dependent parts will be disabled ***]))],
- AC_MSG_RESULT([*** All libsmbclient dependent parts will be disabled ***]))
- AC_SUBST(LIBSMBCLIENT_LIBS)
-fi
-AM_CONDITIONAL(HAVE_LIBSMBCLIENT, test "x$have_libsmbclient" = "xyes")
-
+ CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
+ ;;
+esac
-dnl ---------------------------------------------
-dnl SUN style audio interface
-dnl ---------------------------------------------
+AC_SUBST(NOUNDEF)
+AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"])
-AC_MSG_CHECKING(for Sun audio support)
-have_sunaudio=no
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <sys/types.h>
- #include <sys/audioio.h>
- ]], [[
- audio_info_t audio_info;
- AUDIO_INITINFO(&audio_info);
- ]])],[
- have_sunaudio=yes
- ],[])
-AC_MSG_RESULT($have_sunaudio)
-AM_CONDITIONAL(HAVE_SUNAUDIO, test "x$have_sunaudio" = "xyes")
-
-if test "x$have_sunaudio" = "xyes"; then
- dnl NetBSD and OpenBSD don't have this, but check for it
- dnl rather than assuming that it doesn't happen elsewhere.
- AC_CHECK_MEMBERS([audio_info_t.output_muted])
+AC_ARG_ENABLE([altivec],
+ [AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs])],
+ [], [enable_altivec="yes"])
+
+dnl No optimization at all. For gcc, this is the optimization level.
+O0_CFLAGS="-O0"
+
+dnl Lowest level of optimization. For gcc, this enables:
+dnl -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers
+dnl -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce
+dnl -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs
+dnl -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -fmerge-constants
+dnl On platforms where -fomit-frame-pointer does not interfere with debugging,
+dnl it is also enabled by -O1.
+O1_CFLAGS="-O1"
+
+dnl Middle level of optimization. For gcc, this enables -O1 and:
+dnl -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps
+dnl -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations
+dnl -fstrength-reduce -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves
+dnl -fforce-mem -fpeephole2 -fschedule-insns -fschedule-insns2
+dnl -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
+dnl -fdelete-null-pointer-checks -freorder-blocks -freorder-functions
+dnl -funit-at-a-time -falign-functions -falign-jumps -falign-loops
+dnl -falign-labels -ftree-pre
+dnl Note that Apple's version of gcc differs slightly, because it does not enable
+dnl -fstrict-aliasing -freorder-blocks -fsched-interblock
+O2_CFLAGS="-O2"
+
+dnl Highest level of optimization. For gcc, this enables -O2 and:
+dnl -finline-functions -funswitch-loops -fgcse-after-reload
+O3_CFLAGS="-O3"
+
+dnl gcc 3.3.5 (at least) is known to be buggy wrt optimization with
+dnl -finline-functions, so use -fno-inline-functions for gcc < 3.4.0
+if test x"$GCC" = x"yes"; then
+ if test "$GCC_VERSION_MAJOR" -lt 3; then
+ O3_CFLAGS="$O3_CFLAGS -fno-inline-functions"
+ else
+ if test "$GCC_VERSION_MAJOR" -eq 3 -a "$GCC_VERSION_MINOR" -lt 4; then
+ O3_CFLAGS="$O3_CFLAGS -fno-inline-functions"
+ fi
+ fi
fi
+CC_CHECK_CFLAGS([-ffast-math], [optflags="$optflags -ffast-math"])
+CC_CHECK_CFLAGS([-fexpensive-optimizations], [optflags="$optflags -fexpensive-optimizations"])
-dnl ---------------------------------------------
-dnl IRIX style audio interface
-dnl ---------------------------------------------
-
-AM_CHECK_IRIXAL([AC_DEFINE(HAVE_IRIXAL,1,
- [Define this if you have a usable IRIX al interface available])],
- [AC_MSG_RESULT([*** All of IRIX AL dependent parts will be disabled ***])])
-AM_CONDITIONAL(HAVE_IRIXAL, [test "x$am_cv_have_irixal" = xyes])
-
-
-dnl ---------------------------------------------
-dnl Solaris kstat kernel statistics
-dnl ---------------------------------------------
-
-AC_CHECK_LIB(kstat, kstat_open,
- [KSTAT_LIBS=-lkstat
- AC_DEFINE(HAVE_KSTAT,1,[Define this if you have kernel statistics available via kstat interface])])
-AC_SUBST(KSTAT_LIBS)
-
-
-dnl ---------------------------------------------
-dnl cdrom ioctls
-dnl ---------------------------------------------
-
-AC_CHECK_HEADERS([linux/cdrom.h sys/dvdio.h], [break])
-AC_CHECK_HEADERS([sys/cdio.h sys/scsiio.h])
-AM_CHECK_CDROM_IOCTLS(
- [AC_DEFINE(HAVE_CDROM_IOCTLS,1,[Define this if you have CDROM ioctls])],
- [AC_MSG_RESULT([*** (S)VCD support will be disabled ***])])
-AM_CONDITIONAL(HAVE_CDROM_IOCTLS, [test "x$have_cdrom_ioctls" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl check for a usable version of libdvdnav
-dnl ---------------------------------------------
-
-AC_ARG_WITH(external-dvdnav, AS_HELP_STRING([--with-external-dvdnav], [use external dvdnav library (not recommended)]),
- [external_dvdnav="$withval"], [no_dvdnav="yes"; external_dvdnav="no"])
+case "$host_or_hostalias" in
+ alphaev56-*) cpuflags="-mcpu=ev56 -mieee $cpuflags" ;;
+ alpha*) cpuflags="-mieee $cpuflags" ;;
-if test "x$external_dvdnav" = "xyes"; then
- AM_PATH_DVDNAV(0.1.9,
- AC_DEFINE(HAVE_DVDNAV,1,[Define this if you have a suitable version of libdvdnav]),
- [AC_MSG_RESULT([*** no usable version of libdvdnav found, using internal copy ***])])
-else
- AC_MSG_RESULT([Use included DVDNAV support])
-fi
+ armv4l-*-linux*)
+ cpuflags="-mcpu=strongarm1100 -ffast-math -fsigned-char $cpuflags"
+ DEFAULT_OCFLAGS='$(O2_CFLAGS)'
+ ;;
-AM_CONDITIONAL(HAVE_DVDNAV, [test "x$no_dvdnav" != "xyes"])
+ sparc*-*-linux*)
+ case "`uname -m`" in
+ sparc) cpuflags="-mcpu=supersparc -mtune=supersparc" ;;
+ sparc64) cpuflags="-mcpu=ultrasparc -mtune=ultrasparc" ;;
+ esac
+ test x"$enable_vis" != x"no" && has_vis=yes
+ AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture])
+ ;;
+ sparc-*-solaris*)
+ if test x"$GCC" = x"yes"; then
+ case "`uname -m`" in
+ sun4c) cpuflags="-mcpu=v7 -mtune=supersparc" ;;
+ sun4m) cpuflags="-mcpu=v8 -mtune=supersparc" ;;
+ sun4u)
+ if test x"$GCC_VERSION_MAJOR" -lt 3; then
+ # -mcpu=ultrasparc triggers a GCC 2.95.x compiler bug
+ # when compiling video_out.c:
+ # gcc: Internal compiler error: program cc1 got fatal signal 11
+ # avoid -mcpu=ultrasparc with gcc 2.*
+ cpuflags="-mcpu=v8 -mtune=ultrasparc"
+ else
+ cpuflags="-mcpu=ultrasparc -mtune=ultrasparc"
+ fi
+ ;;
+ esac
+ if test "$GCC_VERSION_MAJOR" -ge 3; then
+ test x"$enable_vis" != x"no" && has_vis=yes
+ fi
+ else
+ case "`uname -m`" in
+ sun4c) cpuflags="-xarch=v7" ;;
+ sun4m) cpuflags="-xarch=v8" ;;
+ sun4u) cpuflags="-xarch=v8plusa" ;;
+ esac
+ O1_CFLAGS="-fast -xCC"
+ O2_CFLAGS="$O1_CFLAGS"
+ O3_CFLAGS="$O1_CFLAGS"
+ fi
+ AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture])
+ ;;
-dnl ---------------------------------------------
-dnl Video CD
-dnl ---------------------------------------------
+ x86_64-*)
+ arch_x86=yes
+ AC_DEFINE([ARCH_X86_64], [], [Define this if you're running x86 architecture 64 bits])
+ ;;
-AC_ARG_ENABLE(vcd, AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin]),
- enable_vcd=$enableval, enable_vcd=yes)
+ *-*-darwin*)
+ case "$host_or_hostalias" in
+ universal-*)
+ arch_ppc=yes
+ arch_x86=yes
+ ;;
+ i386-* | x86_64-*)
+ arch_x86=yes
+ AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits])
+ ;;
+ ppc* | powerpc*)
+ arch_ppc=yes
+ dnl avoid ppc compilation crash
+ AS="$CC"
+ AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture])
+
+ AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no])
+ if test x"$enable_altivec" != x"no"; then
+ AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs])
+ cpuflags="$cpuflags -faltivec -maltivec"
+ LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL"
+ fi
+ ;;
+ esac
+
+ enable_impure_text=yes
+ HOST_OS_DARWIN=1
+ dnl HOST_OS_DARWIN is used by a bunch of difference stuff, including
+ dnl libdvdnav, libmpeg2, and xine itself (xine-engine, xine-utils)
+ AC_DEFINE([HOST_OS_DARWIN], 1, [Define this if built on Mac OS X/Darwin])
+ dnl CONFIG_DARWIN is used by ffmpeg, so anything that pulls ffmpeg
+ dnl headers needs to have this set.
+ AC_DEFINE([CONFIG_DARWIN], 1, [Define this if built on Mac OS X/Darwin])
+ CPPFLAGS="-D_INTL_REDIRECT_MACROS $CPPFLAGS"
+ ;;
-dnl Force build of both vcd plugins, for now.
-dnl AC_ARG_ENABLE(vcdo, AS_HELP_STRING([--disable-vcdo], [do not compile old VCD plugin]),
-dnl enable_vcdo=$enableval, enable_vcdo=yes)
-dnl
-enable_vcdo="yes"
-
-AC_ARG_WITH(internal-vcdlibs, AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo]),
- [internal_vcdnav="$withval"], [internal_vcdnav="no"])
-
-if test "x$enable_vcd" = "xyes"; then
- dnl empty_array_size
- AC_MSG_CHECKING([how to create empty arrays])
-
- empty_array_size="xxx"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } doo;]])],[empty_array_size=""],[])
-
- if test "x$empty_array_size" = "xxxx";then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } doo;]])],[empty_array_size="0"],[])
- fi
-
- if test "x$empty_array_size" = "xxxx"
- then
- AC_MSG_ERROR([compiler is unable to creaty empty arrays])
- else
- AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, $empty_array_size,
- [what to put between the brackets for empty arrays])
- changequote(`,')
- msg="[${empty_array_size}]"
- changequote([,])
- AC_MSG_RESULT($msg)
- fi
- dnl empty_array_size
-
- if test "x$internal_vcdnav" = "xno" ; then
- PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71], [], [internal_vcdnav=yes])
- PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [internal_vcdnav=yes])
- if test "x$internal_vcdnav" = "xyes"; then
- AC_MSG_RESULT([Use included libcdio/libvcdinfo support])
- fi
- fi
-
- dnl check twice, fallback is internal copy
- if test "x$internal_vcdnav" = "xno"; then
- AC_DEFINE([HAVE_VCDNAV], [1], [Define this if you use external libcdio/libvcdinfo])
- else
- AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_os/$host_cpu", [host os/cpu identifier])
-
- AC_DEFINE(_DEVELOPMENT_, [], enable warnings about being development release)
- AC_HEADER_STDC
- AC_CHECK_HEADERS(sys/stat.h stdint.h glob.h inttypes.h stdbool.h)
-
- if test "x$ac_cv_header_stdint_h" != "xyes"
- then
- AC_CHECK_SIZEOF(int, 4)
- AC_CHECK_SIZEOF(long, 4)
- AC_CHECK_SIZEOF(long long, 8)
- fi
+ ppc-*-linux* | powerpc-*)
+ arch_ppc=yes
- dnl ISOC99_PRAGMA
- AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],[
- ISOC99_PRAGMA=yes
- AC_DEFINE(HAVE_ISOC99_PRAGMA, [], [Supports ISO _Pragma() macro])
- ],[ISOC99_PRAGMA=no])
- AC_MSG_RESULT($ISOC99_PRAGMA)
-
- dnl
- dnl bitfield order
- dnl
- AC_MSG_CHECKING([bitfield ordering in structs])
-
- dnl basic compile test for all platforms
- AC_COMPILE_IFELSE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- switch (0) case 0: case sizeof(bf) == 1:;
- return 0;
-}
-], [], AC_MSG_ERROR([compiler doesn't support bitfield structs]))
+ dnl avoid ppc compilation crash
+ AS="$CC"
+ AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture])
+ AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no])
+ if test x"$enable_altivec" != x"no"; then
+ AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs])
+ cpuflags="$cpuflags -maltivec"
+ fi
+ ;;
- dnl run test
- AC_RUN_IFELSE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0x4b; }
-], bf_lsbf=1, [
- AC_RUN_IFELSE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0xa5; }
-], bf_lsbf=0, AC_MSG_ERROR([unsupported bitfield ordering]))
- ],
- [case "$host" in
- *-*-mingw32* | *-*-cygwin*)
- bf_lsbf=1
- ;;
- universal-*-darwin*)
- bf_lsbf=0
- ;;
- *)
- AC_MSG_RESULT([unknown])
- AC_MSG_ERROR([value of bitfield test isn't known for $host
-*********************************************************************
-Value of bitfield test can't be found out for cross-compiling and we
-don't know its value for host "$host".
-
-Because it's needed for VCD plugin, disable VCD by configure option
---disable-vcd or use external VCD library.
-*********************************************************************])
- esac]
-)
-
- if test "x$cross_compiling" = "xyes"; then
- TEXT=" (guessed)"
- else
- TEXT=""
- fi
- if test "x$bf_lsbf" = "x1"; then
- AC_MSG_RESULT(LSBF${TEXT})
- AC_DEFINE(BITFIELD_LSBF, [], [compiler does lsbf in struct bitfields])
- else
- AC_MSG_RESULT(MSBF${TEXT})
- fi
+ i?86-* | k?-* | athlon-* | pentium*)
+ arch_x86=yes
+ enable_impure_text=yes
+
+ case "$host_or_hostalias" in
+ *-*-cygwin* | *-*-mingw32*)
+ CC_CHECK_CFLAGS([-fno-omit-frame-pointer], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-omit-frame-pointer"])
+ CC_CHECK_CFLAGS([-fno-inline-functions], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions"])
+ CC_CHECK_CFLAGS([-fno-rename-registers], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers"])
+ AC_SUBST(W32_NO_OPTIMIZE)
+ case "$host_or_hostalias" in
+ *-*-cygwin*) LIBS="$LIBS @INTLLIBS@ -lkernel32" ;;
+ esac
+ ;;
+ esac
+
+ AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits])
+
+ if test x"$GCC" = x"yes" -o x"${CC##*/}" = x"icc"; then
+ if test x"$GCC" = x"yes"; then
+ # GCC optimizations
+ CC_CHECK_CFLAGS([-mtune=i386], [sarchopt="-mtune"],
+ [CC_CHECK_CFLAGS([-mcpu=i386], [sarchopt="-mcpu"],
+ [CC_CHECK_CFLAGS([-march=i386], [sarchopt="-march"], [sarchopt="no"])])])
+ if test "$sarchopt" != "no"; then
+ case "$host_or_hostalias" in
+ i386-*) archopt_val="i386" ;;
+ i486-*) archopt_val="i486" ;;
+ i586-*) archopt_val="pentium" ;;
+ pentium-mmx-*) archopt_val="pentium-mmx" ;;
+ k6-2* | k6-3-*) archopt_val="k6-2" ;;
+ k6-*) archopt_val="k6" ;;
+ pentium3-*) archopt_val="pentium3" ;;
+ pentium4-*) archopt_val="pentium4" ;;
+
+ athlon-4-* | athlon-xp-* | althon-mp-*) archopt_val="athlon-4" ;;
+ k7-* | athlon-tbird-* | athlon-*) archopt_val="athlon" ;;
+
+ pentiumpro-* | pentium2-* | i686-*)
+ archopt_val="pentiumpro"
+ if test x"$cross_compiling" != x"yes"; then
+ if test -f /proc/cpuinfo; then
+ modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d ':' -f2`
+ case "$modelname" in
+ *Athlon* | *Duron* | *K7*)
+ dnl Special check for k7 cpu CC support
+ CC_CHECK_CFLAGS([$sarchopt=athlon],
+ [archopt_val="athlon"], [archopt_val="i686"])
+ ;;
+ VIAEzra)
+ archopt_val="c3"
+ ;;
+ esac
+ fi
+ fi
+ ;;
+ esac
+ test x"$archopt_val" != x"" && cpuflags="$cpuflags $sarchopt=$archopt_val"
+ fi
+ else
+ # Intel optimizations
+ O3_CFLAGS="$O3_CFLAGS -unroll -ipo -ipo_obj"
+ fi
+ fi
+ ;;
+esac
- AC_CHECK_HEADERS([errno.h fcntl.h \
- stdbool.h stdlib.h stdint.h stdio.h string.h \
- strings.h linux/version.h sys/cdio.h sys/stat.h \
- sys/types.h ])
-
- LIBCDIO_CFLAGS='-I$(top_srcdir)/src/input/vcd/libcdio'
- LIBCDIO_LIBS='$(top_builddir)/src/input/vcd/libcdio/libcdio.la'
- LIBISO9660_LIBS='$(top_builddir)/src/input/vcd/libcdio/libiso9660.la'
- LIBVCD_CFLAGS='-I$(top_srcdir)/src/input/vcd/libvcd'
- LIBVCD_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcd.la'
- LIBVCDINFO_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcdinfo.la'
-
- case $host_os in
- darwin*)
- AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
- [have_iokit_h="yes"])
- if test "x$have_iokit_h" = "xyes" ; then
- AC_DEFINE([HAVE_DARWIN_CDROM], [1],
- [Define 1 if you have Darwin OS X-type CD-ROM support])
- fi
- ;;
- linux*)
- AC_CHECK_HEADERS(linux/version.h)
- AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"])
- if test "x$have_linux_cdrom_h" = "xyes" ; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
-#include <linux/cdrom.h>
-struct cdrom_generic_command test;
-int has_timeout=sizeof(test.timeout);]])],
- [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1],
- [Define 1 if timeout is in cdrom_generic_command struct])],[])
- AC_DEFINE([HAVE_LINUX_CDROM], [1],
- [Define 1 if you have Linux-type CD-ROM support])
- fi
- ;;
- bsdi*)
- AC_CHECK_HEADERS(dvd.h, [have_bsdi_dvd_h="yes"])
- if test "x$have_bsdi_dvd_h" = "xyes" ; then
- AC_DEFINE([HAVE_BSDI_CDROM], [1],
- [Define 1 if you have BSDI-type CD-ROM support])
- fi
- ;;
- sunos*|sun*|solaris*)
- AC_CHECK_HEADERS(sys/cdio.h)
- AC_DEFINE([HAVE_SOLARIS_CDROM], [1],
- [Define 1 if you have Solaris CD-ROM support])
- ;;
- cygwin*)
- AC_DEFINE([CYGWIN], [1],
- [Define 1 if you are compiling using cygwin])
- AC_DEFINE([HAVE_WIN32_CDROM], [1],
- [Define 1 if you have MinGW CD-ROM support])
- LIBCDIO_LIBS="$LIBCDIO_LIBS -lwinmm"
- LIBVCD_LIBS="$LIBVCD_LIBS -lwinmm"
- ;;
- mingw*)
- AC_DEFINE([MINGW32], [1],
- [Define 1 if you are compiling using MinGW])
- AC_DEFINE([HAVE_WIN32_CDROM], [1],
- [Define 1 if you have MinGW CD-ROM support])
- ;;
- freebsd4.*)
- AC_DEFINE([HAVE_FREEBSD_CDROM], [1],
- [Define 1 if you have FreeBSD CD-ROM support])
- ;;
- *)
- AC_MSG_WARN(Don't have OS CD-reading support for ${host_os}...)
- AC_MSG_WARN(Will use generic support.)
- ;;
+AC_ARG_ENABLE([vis],
+ [AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs])],
+ [], [enable_vis="yes"])
+if test "x$has_vis" = "xyes"; then
+ AC_DEFINE([ENABLE_VIS], [], [Define this if you have Sun UltraSPARC CPU])
+ case "$cpuflags" in
+ *-mcpu=*) ;;
+ *) cpuflags="$cpuflags -mcpu=v9" ;;
esac
- AC_SUBST(LINUX_CDROM_TIMEOUT)
- AC_SUBST(HAVE_BSDI_CDROM)
- AC_SUBST(HAVE_DARWIN_CDROM)
- AC_SUBST(HAVE_FREEBSD_CDROM)
- AC_SUBST(HAVE_LINUX_CDROM)
- AC_SUBST(HAVE_SOLARIS_CDROM)
- AC_SUBST(HAVE_WIN32_CDROM)
- AC_SUBST(LINUX_CDROM_TIMEOUT)
- AC_SUBST(LIBVCD_SYSDEP)
-
- AC_CHECK_FUNCS( bzero memcpy )
-
- AC_CHECK_MEMBER([struct tm.tm_gmtoff],
- [AC_DEFINE(HAVE_TM_GMTOFF, 1,
- [Define if struct tm has the tm_gmtoff member.])],
- ,
- [#include <time.h>])
- fi
fi
-
-AC_DEFINE([LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
-AC_DEFINE([EXTERNAL_LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
-AC_SUBST(LIBCDIO_CFLAGS)
-AC_SUBST(LIBCDIO_LIBS)
-AC_SUBST(LIBISO9660_LIBS)
-AC_SUBST(LIBVCD_CFLAGS)
-AC_SUBST(LIBVCD_LIBS)
-AC_SUBST(LIBVCDINFO_LIBS)
-AM_CONDITIONAL(HAVE_VCDNAV, [test "x$internal_vcdnav" = "xno"])
-AM_CONDITIONAL(ENABLE_VCD, [test "x$enable_vcd" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl ASF build can be optional
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([asf], AS_HELP_STRING([--disable-asf], [do not build ASF demuxer]))
-AM_CONDITIONAL(BUILD_ASF, test "x$enable_asf" != "xno")
-
-
-dnl ---------------------------------------------
-dnl FAAD build can be optional
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([faad], AS_HELP_STRING([--disable-faad], [do not build FAAD decoder]))
-AM_CONDITIONAL(BUILD_FAAD, test "x$enable_faad" != "xno")
-
-dnl ---------------------------------------------
-dnl Optional and external libdts
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(dts, AS_HELP_STRING([--disable-dts], [Disable support for DTS decoding library (default: enabled)]),
- [enable_libdts="$enableval"], [enable_libdts="yes"])
-AC_ARG_WITH(external-libdts, AS_HELP_STRING([--with-external-libdts], [use external libdts/libdca library (not recommended)]),
- [external_libdts="$withval"], [external_libdts="no"])
-
-have_dts="no"
-
-if test "x$enable_libdts" = "xno"; then
- AC_MSG_RESULT([libdts support disabled])
-elif test "x$external_libdts" = "xyes"; then
- PKG_CHECK_MODULES(LIBDTS, [libdts], have_dts=yes, have_dts=no)
- if test "x$have_dts" = "xno"; then
- AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***])
- fi
+AM_CONDITIONAL([ENABLE_VIS], test x"$has_vis" = x"yes")
+
+O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags"
+O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags"
+O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags"
+
+dnl Allow turning off/on of optimizations. By default, optimizations are
+dnl enabled if --enable-debug is not specified. Even with --enable-debug,
+dnl optimizations can be enabled by explicitly specifying --enable-optimizations
+AC_ARG_ENABLE([optimizations],
+ [AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])],
+ [], [test x"$enable_debug" != x"no" && enable_optimizations="no"])
+AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], [test x"$enable_optimizations" = x"no"])
+if test x"$enable_optimizations" = x"no"; then
+ DEFAULT_OCFLAGS='$(O0_CFLAGS)'
else
- AC_MSG_RESULT([Use included libdts support])
- LIBDTS_CFLAGS='-I$(top_srcdir)/contrib/libdca/include'
- LIBDTS_DEPS='$(top_builddir)/contrib/libdca/libdca.la'
- LIBDTS_LIBS='$(top_builddir)/contrib/libdca/libdca.la'
+ dnl For multi-pass compilation: never when cross-compiling
+ if test x"$cross_compiling" != x"yes"; then
+ if test x"$GCC" = x"yes"; then
+ CC_CHECK_CFLAGS([-fprofile-arcs], [CC_CHECK_CFLAGS([-fbranch-probabilities],
+ [PASS1_CFLAGS="-fprofile-arcs $PASS1_CFLAGS"
+ PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS"])])
+ else
+ pass1flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_genx"
+ pass2flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_use"
+ CC_CHECK_CFLAGS(["$pass1flags"], [CC_CHECK_CFLAGS(["$pass2flags"],
+ [PASS1_CFLAGS="$pass1flags $PASS1_CFLAGS"
+ PASS2_CFLAGS="$pass2flags $PASS2_CFLAGS"])])
+ fi
+ fi
fi
+AC_SUBST(O0_CFLAGS)
+AC_SUBST(O1_CFLAGS)
+AC_SUBST(O2_CFLAGS)
+AC_SUBST(O3_CFLAGS)
-AC_SUBST(LIBDTS_LIBS)
-AC_SUBST(LIBDTS_DEPS)
-AC_SUBST(LIBDTS_CFLAGS)
+AC_SUBST(PASS1_CFLAGS)
+AC_SUBST(PASS2_CFLAGS)
-AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes")
-AM_CONDITIONAL(EXTERNAL_LIBDTS, test "x$have_dts" = "xyes")
+test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)'
+AC_SUBST(DEFAULT_OCFLAGS)
-dnl ---------------------------------------------
-dnl libmodplug support
-dnl ---------------------------------------------
-AC_ARG_ENABLE([modplug],
- AS_HELP_STRING([--enable-modplug], [Enable modplug support]) )
-
-if test "x$enable_modplug" != "xno"; then
- PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7],
- AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed]),
- [enable_modplug=no])
+if test x"$arch_x86" = x"yes" && test x"$enable_macosx_universal" = x"no"; then
+ AC_DEFINE([ARCH_X86], [], [Define this if you're running x86 architecture])
+ AC_DEFINE([HAVE_MMX], [], [Define this if you can compile MMX asm instructions])
fi
+AM_CONDITIONAL([ARCH_PPC], test x"$arch_ppc" = x"yes")
+AM_CONDITIONAL([ARCH_X86], test x"$arch_x86" = x"yes")
+AM_CONDITIONAL([HAVE_MMX], test x"$arch_x86" = x"yes")
+AM_CONDITIONAL([HOST_OS_DARWIN], test x"$HOST_OS_DARWIN" = x"1")
-AC_SUBST(LIBMODPLUG_CFLAGS)
-AC_SUBST(LIBMODPLUG_LIBS)
-dnl AM_CONDITIONAL(HAVE_MODPLUG, [test "x$have_modplug" = x"yes"])
-
-dnl ---------------------------------------------
-dnl Wavpack library
-dnl ---------------------------------------------
-AC_ARG_WITH([wavpack],
- AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)]) )
-
-if test "x$with_wavpack" = "xyes"; then
- PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes])
+if test x"$enable_impure_text" = x"yes"; then
+ case "$host_or_hostalias" in
+ *solaris*)
+ if test "$GCC" = yes; then
+ IMPURE_TEXT_LDFLAGS="-mimpure-text"
+ else
+ IMPURE_TEXT_LDFLAGS="-z textoff"
+ fi
+ ;;
+ *darwin*)
+ IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning"
+ ;;
+ esac
fi
+AC_SUBST(IMPURE_TEXT_LDFLAGS)
-AM_CONDITIONAL([HAVE_WAVPACK], [test "x$have_wavpack" = "xyes"])
-
-
-dnl --------------------------------------------
-dnl Real binary codecs support
-dnl --------------------------------------------
-AC_ARG_ENABLE([real-codecs],
- AS_HELP_STRING([--disable-real-codecs], [Disable Real binary codecs support]))
-AC_ARG_WITH([real-codecs-path],
- AS_HELP_STRING([--with-real-codecs-path=dir], [Specify directory for Real binary codecs]), [
- AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$withval"], [Specified path for Real binary codecs])
- ])
+dnl ----------------------------
+dnl checks for library functions
+dnl ----------------------------
-dnl On some systems, we cannot enable Real codecs support to begin with.
-dnl This includes Darwin, that uses Mach-O rather than ELF.
-case $host in
- *-darwin*) enable_real_codecs="no" ;;
-esac
-
-if test "x$enable_real_codecs" != "xno"; then
- dnl For those that have a replacement, break at the first one found
- AC_CHECK_SYMBOLS([__environ _environ environ], [break], [need_weak_aliases=yes])
- AC_CHECK_SYMBOLS([stderr __stderrp], [break], [need_weak_aliases=yes])
+dnl NLS: src/input/mms.c src/input/vcd, xine-utils
+AC_CHECK_FUNCS([nl_langinfo])
- dnl For these there are no replacements
- AC_CHECK_SYMBOLS([___brk_addr __ctype_b])
+dnl src/libfaad
+AC_CHECK_DECL([lrintf],
+ [AC_DEFINE([HAVE_LRINTF], 1, [Define this if the 'lrintf' function is declared in math.h])
+ AC_DEFINE([_ISOC9X_SOURCE], 1, [Define this if you are ISO C9X compliant])],
+ [],
+ [#define _ISOC9X_SOURCE
+ #include <math.h>])
- if test "x$need_weak_aliases" = "xyes"; then
- CC_ATTRIBUTE_ALIAS(, [AC_MSG_ERROR([You need weak aliases support for Real codecs on your platform])])
- fi
-fi
+dnl contrib/libdca, src/video_out/vidix/drivers/mach64_vid.c
+AC_CHECK_FUNCS([memalign])
-AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"])
+dnl src/input/vcd/libcdio/portable.h
+AC_CHECK_FUNCS([bzero])
-dnl --------------------------------------------
-dnl mmap() support
-dnl --------------------------------------------
+dnl src/libfaad/common.h
+AC_CHECK_FUNCS([memcpy])
+dnl src/input/input_file.c
AC_ARG_ENABLE([mmap],
- AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
-
-if test "x$enable_mmap" = "xyes"; then
- AC_CHECK_FUNCS([mmap])
+ AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
+if test x"$enable_mmap" = x"yes"; then
+ AC_CHECK_FUNCS([mmap])
fi
-dnl ---------------------------------------------
-dnl antialising support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([antialiasing],
- AS_HELP_STRING([--enable-antialiasing], [enable font antialiasing]))
-
-if test "x$enable_antialiasing" = "xyes"; then
- AC_DEFINE(ENABLE_ANTIALIASING,1,[Define this to 1 to enable font antialising.])
-fi
-
-dnl ---------------------------------------------
-dnl ip_mreqn
-dnl ---------------------------------------------
-
-AC_CHECK_IP_MREQN
-if test "x$have_ip_mreqn" = "xyes"; then
- AC_DEFINE(HAVE_IP_MREQN,1,[Define this if you have ip_mreqn in netinet/in.h])
-fi
-
-dnl ---------------------------------------------
-dnl restrict keyword finding (from gstreamer)
-dnl ---------------------------------------------
-restrict=""
-for restrict_keyword in restrict __restrict__ __restrict; do
- AC_MSG_CHECKING(for restrict keyword $restrict_keyword)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ void foo(char * $restrict_keyword p); ]])],[
- KEYWORD_FOUND=yes && AC_MSG_RESULT(yes) ],[
- KEYWORD_FOUND=no && AC_MSG_RESULT(no) ])
- if test "x$KEYWORD_FOUND" = xyes; then
- restrict="$restrict_keyword"
- break
- fi
-done
-if test "x$restrict" = x; then
- AC_MSG_ERROR(No restrict keyword found)
-fi
-AC_DEFINE_UNQUOTED(restrict, $restrict, [restrict keyword])
-
-dnl ---------------------------------------------
-dnl ASM ALIGN is power of two ?
-dnl Used by internal FFmpeg and Planar postprocess
-dnl ---------------------------------------------
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ asm (".align 3"); ]])],
- AC_DEFINE([ASMALIGN_1SLN], [1], [define if '.align n' means alignment to (1<<n)-byte boundaries]),
- :)
-AH_TOP([#ifndef __XINE_CONFIG_H__
-#define __XINE_CONFIG_H__ 1
-])
-AH_BOTTOM([#ifdef ASMALIGN_1SLN
-# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
-#else
-# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
-#endif
-#endif /* __XINE_CONFIG_H__ */
-])
-
-dnl ---------------------------------------------
-dnl Some extra checks.
-dnl ---------------------------------------------
-
-AC_SYS_LARGEFILE
-AC_CHECK_LIB(posix4, sched_get_priority_min)
AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr va_copy])
-AC_CHECK_FUNCS([snprintf _snprintf], [some_snprintf="yes"; break])
-AC_CHECK_FUNCS([vsnprintf _vsnprintf], [some_vsnprintf="yes"; break])
-AC_CHECK_FUNCS([strcasecmp _stricmp], [some_strcasecmp="yes"; break])
-AC_CHECK_FUNCS([strncasecmp _strnicmp], [some_strncasecmp="yes"; break])
-if test "x$some_snprintf" != "xyes" -o \
- "x$some_vsnprintf" != "xyes" -o \
- "x$some_strcasecmp" != "xyes" -o \
- "x$some_strncasecmp" != "xyes"; then
- AC_MSG_ERROR([required function not found])
-fi
-AC_FUNC_FSEEKO
-AC_CHECK_HEADERS(assert.h byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h netdb.h dirent.h sys/times.h sys/ioctl.h sys/param.h alloca.h)
-AC_REPLACE_FUNCS(asprintf basename gettimeofday setenv strndup strpbrk strsep strtok_r timegm unsetenv)
-
-AC_LIBSOURCE(hstrerror.c)
-AC_LINK_IFELSE([#include <netdb.h>
-int main(void) {
- hstrerror(0);
-}], ac_cv_function_system_hstrerror="yes")
-AC_CHECK_LIB([resolv], [hstrerror], [
- ac_cv_function_system_hstrerror="yes"
- NET_LIBS="-lresolv $NET_LIBS"
-])
-AC_SUBST(NET_LIBS)
-if test "x$ac_cv_function_system_hstrerror" = "xyes"; then
- AC_DEFINE(HAVE_HSTRERROR, 1, [Define to 1 if you have 'hstrerror' in <netdb.h>])
-
-else
- AC_LIBOBJ(hstrerror)
-fi
-
-AC_LIBSOURCE(dirent_msvc.c)
-AC_CHECK_FUNC(opendir,
- [AC_DEFINE(HAVE_OPENDIR, 1, [Define to 1 if you have 'opendir' function])],
- [if test "x$SYS" = "xmingw32"; then
- AC_LIBOBJ(dirent_msvc)
- else
- AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
- fi])
-
-AH_BOTTOM([/* include internal system specific header */
-#include "os_internal.h"])
-
-
-dnl ---------------------------------------------
-dnl cflags and debug cflags
-dnl ---------------------------------------------
-
-AC_SUBST(DEBUG_CFLAGS)
-DEBUG_CFLAGS="-g -DDEBUG $CFLAGS"
-
-dnl dummy
-ASFLAGS="$ASFLAGS"
-AC_SUBST(ASFLAGS)
-
-dnl ---------------------------------------------
-dnl Check for some __attribute__ support needed
-dnl ---------------------------------------------
-
-CC_ATTRIBUTE_ALIGNED
-
-CC_ATTRIBUTE_PACKED(
- [AC_DEFINE([XINE_PACKED], [__attribute__((packed))], [Mark a structure as being packed])],
- [AC_MSG_WARN([Your compiler doesn't support __attribute__((packed)); xine might not work as expected.])
- AC_DEFINE([XINE_PACKED], [], [Dummy mark a structure as being packed])]
-)
-
-CC_ATTRIBUTE_MALLOC
-
-CC_ATTRIBUTE_VISIBILITY([protected], [visibility_export="protected"],
- [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])]
-)
-
-if test "x$visibility_export" != "x"; then
- CC_FLAG_VISIBILITY([
- AC_DEFINE([EXPORTED], [__attribute__((visibility("default")))],
- [Mark a symbol as being exported if visibility is changed])
- VISIBILITY_FLAG="-fvisibility=hidden"
- ], [AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
- ])
-else
- AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
-fi
-
-AC_SUBST([VISIBILITY_FLAG])
-
-CC_ATTRIBUTE_SENTINEL
-CC_ATTRIBUTE_FORMAT
-CC_ATTRIBUTE_FORMAT_ARG
-
-AC_OPTIMIZATIONS
-arch_x86="no"
-enable_armv4l="no"
+AC_CHECK_FUNCS([snprintf _snprintf], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([vsnprintf _vsnprintf], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([strcasecmp _stricmp], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([strncasecmp _strnicmp], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
-case "$host_or_hostalias" in
- i?86-* | k?-* | athlon-* | pentium*-)
- dnl enable x86 specific parts of the code
- dnl
- dnl all of this stuff needs gcc/gas; it uses gnu c compiler extensions
- dnl like the extended asm() or __attribute(__cdecl__), or other direct
- dnl mmx/sse/3dnow assembler instructions.
- dnl
- AC_DEFINE_UNQUOTED(ARCH_X86_32,,[Define this if you're running x86 architecture 32 bits])
- arch_x86="yes"
- enable_impure_text="yes"
+AC_FUNC_FSEEKO
- case "$host_or_hostalias" in
- *-*-cygwin)
- LIBS="$LIBS @INTLLIBS@ -lkernel32"
- ;;
- esac
- ;;
- x86_64-*)
- AC_DEFINE_UNQUOTED(ARCH_X86_64,,[Define this if you're running x86 architecture 64 bits])
- arch_x86="yes"
- ;;
- universal-*-darwin*)
- enable_impure_text="yes"
- ;;
- powerpc-*-darwin*)
- dnl avoid ppc compilation crash
- AS="$CC"
- AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture])
-
- AC_CHECK_HEADER([altivec.h], , enable_altivec=no)
-
- if test "x$enable_altivec" != xno; then
- AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you want to use altivec on PowerPC CPUs])
- CFLAGS="$CFLAGS -faltivec -maltivec"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL -faltivec -maltivec"
- fi
- ;;
- ppc-*-linux* | powerpc-*)
- dnl avoid ppc compilation crash
- AS="$CC"
- AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture])
-
- AC_CHECK_HEADER([altivec.h], , enable_altivec=no)
-
- if test "x$enable_altivec" != xno; then
- AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you have a Motorola 74xx CPU])
- CFLAGS="$CFLAGS -maltivec"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -maltivec"
- fi
- ;;
- sparc*-*-linux*)
- if test "x$enable_vis" != xno; then
- has_vis=yes
- fi
+AC_REPLACE_FUNCS([asprintf basename gettimeofday setenv strndup strpbrk strsep strtok_r timegm unsetenv])
+
+AC_LIBSOURCE([hstrerror.c])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[hstrerror(0)]])],
+ [AC_DEFINE([HAVE_HSTRERROR], 1, [Define to 1 if you have 'hstrerror' in <netdb.h>])],
+ [AC_LIBOBJ([hstrerror])])
+
+AC_LIBSOURCE([dirent_msvc.c])
+AC_CHECK_FUNC([opendir],
+ [AC_DEFINE([HAVE_OPENDIR], 1, [Define to 1 if you have 'opendir' function])],
+ [if test x"$WIN32_SYS" = x"mingw32"; then
+ AC_LIBOBJ([dirent_msvc])
+ else
+ AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
+ fi])
+
+AC_LIBSOURCE([timedlock.c])
+ac_save_LIBS="$LIBS" LIBS="$LIBS $PTHREAD_LIBS"
+AC_CHECK_FUNCS([pthread_mutex_timedlock],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_TIMEDLOCK], 1, [Define to 1 if you have 'pthread_mutex_timedlock' in <pthread.h>])],
+ [AC_LIBOBJ([timedlock])])
+LIBS="$ac_save_LIBS"
- AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture])
- ;;
- sparc-*-solaris*)
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- 1.*|2.*) ;;
- *)
- if test "x$enable_vis" != xno; then
- has_vis=yes
- fi
- ;;
- esac
-
- AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture])
- fi
- ;;
- armv4l-*-linux*)
- enable_armv4l="yes"
- ;;
-esac
-if test "x$has_vis" = "xyes"; then
- AC_DEFINE_UNQUOTED(ENABLE_VIS,,[Define this if you have Sun UltraSPARC CPU])
- case "$CFLAGS" in
- *-mcpu=*) ;;
- *) CFLAGS="$CFLAGS -mcpu=v9" ;;
- esac
-fi
-AM_CONDITIONAL(ENABLE_VIS, test "x$has_vis" = "xyes")
+dnl --------------------------
+dnl checks for system services
+dnl --------------------------
-if test "x$arch_x86" = "xyes"; then
- AC_DEFINE_UNQUOTED(ARCH_X86,,[Define this if you're running x86 architecture])
- AC_DEFINE_UNQUOTED(HAVE_MMX,,[Define this if you can compile MMX asm instructions])
-fi
-AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" = "xyes")
-AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" = "xyes")
-
-case $host_os in
- darwin*)
- HOST_OS_DARWIN=1
- AC_DEFINE_UNQUOTED(HOST_OS_DARWIN, 1, [Define this if built on Mac OS X/Darwin])
- OBJCFLAGS="-D_INTL_REDIRECT_MACROS $OBJCFLAGS"
+dnl Even as of 2.61, autoconf is not smart enough to find the X include
+dnl and library paths on Mac OS X, so seed them automatically if they're
+dnl not specified on the configure command-line.
+case "$host_os" in
+ darwin*)
+ test x"$x_includes" = x"NONE" && x_includes="/usr/X11R6/include"
+ test x"$x_libraries" = x"NONE" && x_libraries="/usr/X11R6/lib"
;;
esac
-AM_CONDITIONAL(HOST_OS_DARWIN, test "x$HOST_OS_DARWIN" = "x1")
-
-dnl ---------------------------------------------
-dnl Set IMPURE_TEXT_LDFLAGS
-dnl ---------------------------------------------
-
-IMPURE_TEXT_LDFLAGS=""
-if test "x$enable_impure_text" = xyes; then
- case "$host_or_hostalias" in
- *solaris*)
- if test "$GCC" = yes; then
- IMPURE_TEXT_LDFLAGS="-mimpure-text"
- else
- IMPURE_TEXT_LDFLAGS="-z textoff"
- fi
- ;;
- *-darwin*)
- IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning"
- ;;
- esac
-fi
-AC_SUBST(IMPURE_TEXT_LDFLAGS)
-dnl ---------------------------------------------
-dnl HAVE_ARMV4L is currently used in libavcodec makefile.am
-dnl ---------------------------------------------
+dnl Check for Xwindows using the autoconf AC_PATH_XTRA macro, which is an
+dnl extension of AC_PATH_X that sets X_CFLAGS and X_LIBS. It will also set
+dnl X_EXTRA_LIBS and X_PRE_LIBS.
+AC_PATH_XTRA
+if test x"$no_x" != x"yes"; then
+ X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_CHECK_LIB([Xext], [main],
+ [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([libXext is required])],
+ [$X_LIBS])
+elif test x"$have_x" = x"no"; then
+ PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [have_x=no; no_x=yes])
+fi
+
+dnl Check for XShm support (required for xine X support)
+if test x"$no_x" != x"yes"; then
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ AC_CHECK_HEADERS([X11/extensions/XShm.h], [],
+ [AC_MSG_ERROR([XShm extension is required])],
+ [#include <X11/Xlib.h>])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed])
+fi
+AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"])
-AM_CONDITIONAL(HAVE_ARMV4L, test "x$enable_armv4l" = "xyes")
+dnl Locate libraries needed for X health check
+soname_script="/[[0-9]]$/! d; s%^.*/%%
+t q
+b
+:q
+q"
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libX11.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
+AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.$acl_cv_shlibext}", [The soname of libX11, needed for dlopen()])
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libXv.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
+AC_DEFINE_UNQUOTED([LIBXV_SO], "${x_lib_location:-libXv.$acl_cv_shlibext}", [The soname of libXv, needed for dlopen()])
+
+dnl _FILE_OFFSET_BITS (AC_SYS_LARGEFILE; ac_cv_sys_file_offset_bits)
+dnl _LARGE_FILES (AC_SYS_LARGEFILE; ac_cv_sys_large_files)
+dnl _LARGEFILE_SOURCE (AC_FUNC_SEEKO; ac_cv_sys_largfile_source)
+dnl _LARGEFILE64_SOURCE (glibc transitional; not tested or used anywhere)
+AC_SYS_LARGEFILE
+dnl Add macros to the compiler command line that are also in config.h for things
+dnl that do not #include config.h.
+dnl known: src/input/libreal, src/input/librtsp
+test x"$ac_cv_sys_file_offset_bits" != x"no" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS"
+test x"$ac_cv_sys_largefile_source" != x"no" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS"
+test x"$ac_cv_sys_large_files" != x"" && test x"$ac_cv_sys_large_files" != x"no" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS"
-dnl ---------------------------------------------
-dnl Use features of autoconf 2.61, but stay compatible
-dnl with older versions.
-dnl ---------------------------------------------
-if test "x$datarootdir" = "x"; then
- datarootdir='${datadir}'
- AC_SUBST(datarootdir)
-fi
+dnl -------
+dnl Plugins
+dnl -------
-if test "x$docdir" = "x"; then
- docdir='${datarootdir}/doc/${PACKAGE}'
- AC_SUBST(docdir)
-fi
+XINE_AUDIO_OUT_PLUGINS
+XINE_VIDEO_OUT_PLUGINS
+XINE_INPUT_PLUGINS
+XINE_DECODER_PLUGINS
-if test "x$htmldir" = "x"; then
- htmldir='${docdir}'
- AC_SUBST(htmldir)
-fi
dnl ---------------------------------------------
dnl XINE_ROOTDIR does not work if architecture independent files are
dnl installed to another place than architecture dependent files !!!
dnl ---------------------------------------------
-if test "x$prefix" = xNONE; then
- prefix="${ac_default_prefix}"
-fi
-if test "x$exec_prefix" = xNONE; then
- exec_prefix='${prefix}'
-fi
-
dnl
dnl installation directories and directories relative to prefix
dnl
@@ -2424,11 +982,11 @@ dnl use AC_SUBST for installation
dnl
makeexpand () {
- local i
- local j
- i="$1"
- while test "$i" != "$j"; do j="$i"; eval i="$j"; done
- echo "$i"
+ local i
+ local j
+ i="$1"
+ while test "$i" != "$j"; do j="$i"; eval i="$j"; done
+ echo "$i"
}
XINE_PLUGINDIR="$libdir/xine/plugins/$XINE_MAJOR.$XINE_MINOR.$XINE_SUB"
@@ -2438,36 +996,36 @@ XINE_REL_PLUGINDIR="`makeexpand "$XINE_PLUGINDIR"`"
XINE_REL_PLUGINDIR="`makeexpand "$XINE_REL_PLUGINDIR" | sed -e "s,^${prefix}/,,"`"
XINE_REL_FONTDIR="`makeexpand "$XINE_FONTDIR" | sed -e "s,^${prefix}/,,"`"
XINE_REL_LOCALEDIR="`makeexpand "$XINE_LOCALEDIR" | sed -e "s,^${prefix}/,,"`"
-if test "x$SYS" = "xmingw32" -o "x$SYS" = "xcygwin"; then
- dnl polish paths (MinGW runtime accepts both \ and / anyway)
- XINE_REL_PLUGINDIR="`echo "$XINE_REL_PLUGINDIR" | sed -e 's/\\//\\\\\\\\/g'`"
- XINE_REL_FONTDIR="`echo "$XINE_REL_FONTDIR" | sed -e 's/\\//\\\\\\\\/g'`"
- XINE_REL_LOCALEDIR="`echo "$XINE_REL_LOCALEDIR" | sed -e 's/\\//\\\\\\\\/g'`"
- dnl prefix in xine-config
- XINE_CONFIG_PREFIX="\$(cd \$(dirname \$0)/..; pwd)"
- dnl installation directories (in xine-config)
- XINE_PLUGINPATH="$XINE_CONFIG_PREFIX/$XINE_REL_PLUGINDIR"
- XINE_FONTPATH="$XINE_CONFIG_PREFIX/$XINE_REL_FONTDIR"
- XINE_LOCALEPATH="$XINE_CONFIG_PREFIX/$XINE_REL_LOCALEDIR"
- dnl runtime directories
- AC_DEFINE(XINE_PLUGINDIR,[xine_get_plugindir()],[Define this to plugins directory location])
- AC_DEFINE(XINE_FONTDIR,[xine_get_fontdir()],[Define this to osd fonts dir location])
- AC_DEFINE(XINE_LOCALEDIR,[xine_get_localedir()],[Path where catalog files will be.])
+if test "x$WIN32_SYS" = "xmingw32" -o "x$WIN32_SYS" = "xcygwin"; then
+ dnl polish paths (MinGW runtime accepts both \ and / anyway)
+ XINE_REL_PLUGINDIR="`echo "$XINE_REL_PLUGINDIR" | sed -e 's/\\//\\\\\\\\/g'`"
+ XINE_REL_FONTDIR="`echo "$XINE_REL_FONTDIR" | sed -e 's/\\//\\\\\\\\/g'`"
+ XINE_REL_LOCALEDIR="`echo "$XINE_REL_LOCALEDIR" | sed -e 's/\\//\\\\\\\\/g'`"
+ dnl prefix in xine-config
+ XINE_CONFIG_PREFIX="\$(cd \$(dirname \$0)/..; pwd)"
+ dnl installation directories (in xine-config)
+ XINE_PLUGINPATH="$XINE_CONFIG_PREFIX/$XINE_REL_PLUGINDIR"
+ XINE_FONTPATH="$XINE_CONFIG_PREFIX/$XINE_REL_FONTDIR"
+ XINE_LOCALEPATH="$XINE_CONFIG_PREFIX/$XINE_REL_LOCALEDIR"
+ dnl runtime directories
+ AC_DEFINE([XINE_PLUGINDIR], [xine_get_plugindir()], [Define this to plugins directory location])
+ AC_DEFINE([XINE_FONTDIR], [xine_get_fontdir()], [Define this to osd fonts dir location])
+ AC_DEFINE([XINE_LOCALEDIR], [xine_get_localedir()], [Path where catalog files will be.])
else
- dnl prefix in xine-config
- XINE_CONFIG_PREFIX="`makeexpand "${prefix}"`"
- dnl directories from xine-config and runtime directories
- XINE_PLUGINPATH="`makeexpand "$XINE_PLUGINDIR"`"
- XINE_FONTPATH="`makeexpand "$XINE_FONTDIR"`"
- XINE_LOCALEPATH="`makeexpand "$XINE_LOCALEDIR"`"
- dnl defining runtime directories
- AC_DEFINE_UNQUOTED(XINE_PLUGINDIR,"$XINE_PLUGINPATH",[Define this to plugins directory location])
- AC_DEFINE_UNQUOTED(XINE_FONTDIR,"$XINE_FONTPATH",[Define this to osd fonts dir location])
- AC_DEFINE_UNQUOTED(XINE_LOCALEDIR, "$XINE_LOCALEPATH",[Path where catalog files will be.])
-fi
-AC_DEFINE_UNQUOTED(XINE_REL_PLUGINDIR,"$XINE_REL_PLUGINDIR",[Define this to plugin directory relative to execution prefix])
-AC_DEFINE_UNQUOTED(XINE_REL_FONTDIR,"$XINE_REL_FONTDIR",[Define this to font directory relative to prefix])
-AC_DEFINE_UNQUOTED(XINE_REL_LOCALEDIR,"$XINE_REL_LOCALEDIR",[Define this to font directory relative to prefix])
+ dnl prefix in xine-config
+ XINE_CONFIG_PREFIX="`makeexpand "${prefix}"`"
+ dnl directories from xine-config and runtime directories
+ XINE_PLUGINPATH="`makeexpand "$XINE_PLUGINDIR"`"
+ XINE_FONTPATH="`makeexpand "$XINE_FONTDIR"`"
+ XINE_LOCALEPATH="`makeexpand "$XINE_LOCALEDIR"`"
+ dnl defining runtime directories
+ AC_DEFINE_UNQUOTED([XINE_PLUGINDIR], ["$XINE_PLUGINPATH"], [Define this to plugins directory location])
+ AC_DEFINE_UNQUOTED([XINE_FONTDIR], ["$XINE_FONTPATH"], [Define this to osd fonts dir location])
+ AC_DEFINE_UNQUOTED([XINE_LOCALEDIR], ["$XINE_LOCALEPATH"], [Path where catalog files will be.])
+fi
+AC_DEFINE_UNQUOTED([XINE_REL_PLUGINDIR], ["$XINE_REL_PLUGINDIR"], [Define this to plugin directory relative to execution prefix])
+AC_DEFINE_UNQUOTED([XINE_REL_FONTDIR], ["$XINE_REL_FONTDIR"], [Define this to font directory relative to prefix])
+AC_DEFINE_UNQUOTED([XINE_REL_LOCALEDIR], ["$XINE_REL_LOCALEDIR"], [Define this to font directory relative to prefix])
AC_SUBST(XINE_CONFIG_PREFIX)
AC_SUBST(XINE_PLUGINPATH)
AC_SUBST(XINE_FONTPATH)
@@ -2478,7 +1036,7 @@ AC_SUBST(XINE_LOCALEDIR)
dnl Where aclocal m4 files should be installed
XINE_ACFLAGS="-I `makeexpand "${datarootdir}/aclocal"`"
-AC_DEFINE_UNQUOTED(XINE_ACFLAGS, "$XINE_ACFLAGS", [Path where aclocal m4 files will be.])
+AC_DEFINE_UNQUOTED([XINE_ACFLAGS], ["$XINE_ACFLAGS"], [Path where aclocal m4 files will be.])
AC_SUBST(XINE_ACFLAGS)
dnl Where architecture independent data (e.g. logo) will/should be installed
@@ -2491,62 +1049,6 @@ AC_SUBST(XINE_SCRIPTPATH)
dnl ---------------------------------------------
-dnl Some informations about xine-lib compilation
-dnl ---------------------------------------------
-
-XINE_BUILD_CC="`$CC -v 2>&1 | tail -1 2>/dev/null`"
-XINE_BUILD_OS="`uname -s -r -m`"
-XINE_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
-AC_SUBST(XINE_BUILD_CC)
-AC_SUBST(XINE_BUILD_OS)
-AC_SUBST(XINE_BUILD_DATE)
-
-
-dnl ---------------------------------------------
-dnl For win32 libraries location, needed by libw32dll.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([w32-path],
- AS_HELP_STRING([--with-w32-path=path], [location of Win32 binary codecs]),
- [w32_path="$withval"], [w32_path="/usr/lib/codecs"])
-AC_SUBST(w32_path)
-
-AC_ARG_ENABLE([w32dll],
- AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support]),
- , [enable_w32dll=$with_gnu_as])
-
-case $host in
- *-mingw* | *-cygwin)
- enable_w32dll="no" ;;
- i?86-* | k?-* | athlon-* | pentium*-)
- if test "x$enable_w32dll" != "xno"; then
- CC_PROG_AS
- fi
- test "x$enable_w32dll" = "x" && \
- enable_w32dll="$with_gnu_as"
- ;;
- *)
- enable_w32dll="no" ;;
-esac
-
-if test "x$enable_w32dll" = "xyes" && \
- test "x$with_gnu_as" = "xno"; then
-
- AC_MSG_ERROR([You need GNU as to enable Win32 codecs support])
-fi
-
-AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" != "xno")
-
-
-dnl ---------------------------------------------
-dnl some include paths ( !!! DO NOT REMOVE !!! )
-dnl ---------------------------------------------
-
-INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_CPPFLAGS) -I$(top_builddir)/lib -I$(top_srcdir)/lib'
-AC_SUBST(INCLUDES)
-
-
-dnl ---------------------------------------------
dnl Get where .m4 should be installed.
dnl ---------------------------------------------
@@ -2567,90 +1069,37 @@ dnl ;;
dnl esac
dnl fi
AC_SUBST(ACLOCAL_DIR)
-AM_CONDITIONAL([INSTALL_M4],[test "x$ACLOCAL_DIR" != "x"])
-
-
-dnl ---------------------------------------------
-dnl It seems automake 1.5 don't take care about this script
-dnl ---------------------------------------------
-
-if test ! -z "$am_depcomp"; then
- DEPCOMP="depcomp"
-fi
-AC_SUBST(DEPCOMP)
-
-
-dnl ---------------------------------------------
-dnl Check for documentation formatting tool
-dnl ---------------------------------------------
-
-AC_CHECK_PROG(SGMLTOOLS, sgmltools, sgmltools, no)
-AM_CONDITIONAL([HAVE_SGMLTOOLS], [test "$SGMLTOOLS" != "no"])
-
-AC_CHECK_PROG(FIG2DEV, fig2dev, fig2dev, no)
-AM_CONDITIONAL([HAVE_FIG2DEV], [test "$FIG2DEV" != "no"])
-
-dnl ---------------------------------------------
-dnl Newest automake workaround
-dnl ---------------------------------------------
+AM_CONDITIONAL([INSTALL_M4], [test x"$ACLOCAL_DIR" != x""])
-AC_SUBST(mkdir_p)
-if test -n "$ac_aux_dir"; then
- case "$ac_aux_dir" in
- /*) MKINSTALLDIRS="$ac_aux_dir/install-sh -d" ;;
- *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/install-sh -d" ;;
- esac
-else
- MKINSTALLDIRS="\$(top_srcdir)/install-sh -d"
-fi
-AC_SUBST(MKINSTALLDIRS)
dnl this is an internal function we should not use, but
dnl as long as neither autoconf nor automake offer an A[CM]_PROG_OBJC
dnl check we will have to call it
_AM_DEPENDENCIES([OBJC])
-AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_gdkpixbuf" != "xyes"])
-dnl Important warnings we _don't_ want to skip
-dnl Don't put these under conditional for optimisations, because these
-dnl need always to be enabled.
-CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"],
- [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])])
+dnl ---------------------------------------------
+dnl some include paths ( !!! DO NOT REMOVE !!! )
+dnl ---------------------------------------------
-test "x$wformat" != "x" && \
- CC_CHECK_CFLAGS([-Wno-format-zero-length], [wformat="$wformat -Wno-format-zero-length"])
+INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_INCLUDES) -I$(top_builddir)/lib -I$(top_srcdir)/lib'
+AC_SUBST(INCLUDES)
-CC_CHECK_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"])
-warnflags="$warnflags $wformat"
-dnl This *has* to stay at the end as it can break some autoconf tests.
-CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags -Werror-implicit-function-declaration"])
+dnl Common cflags for all platforms
+CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $miscflags $warnflags $CFLAGS"
+LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS"
+OBJCFLAGS="$UNIVERSAL_CFLAGS $miscflags $warnflags $OBJCFLAGS"
-CC_CHECK_CFLAGS([-Wstrict-aliasing=2], [warnflags="$warnflags -Wstrict-aliasing=2"],
- [CC_CHECK_CFLAGS([-Wstrict-aliasing], [warnflags="$warnflags -Wstrict-aliasing"])])
-
-case $host in
- dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
- dnl are requested, as different implementations are present; to avoid problems
- dnl use -Wl,-z,defs only for those platform not behaving this way.
- *-freebsd*) ;;
- *)
- AC_TRY_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
- ;;
-esac
-AC_SUBST([NOUNDEF])
-dnl Common cflags for all platforms
-CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $CPPFLAGS"
-CFLAGS="\$(MULTIPASS_CFLAGS) $warnflags $CFLAGS"
-DEBUG_CFLAGS="$warnflags $DEBUG_CFLAGS"
+dnl Some informations about xine-lib compilation for xine-config
+XINE_BUILD_CC="`$CC -v 2>&1 | tail -1 2>/dev/null`"
+XINE_BUILD_OS="`uname -s -r -m`"
+XINE_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
+AC_SUBST(XINE_BUILD_CC)
+AC_SUBST(XINE_BUILD_OS)
+AC_SUBST(XINE_BUILD_DATE)
-if test "x$enable_debug" = "xyes"; then
- CPPFLAGS="$CPPFLAGS -DDEBUG"
-else
- CPPFLAGS="$CPPFLAGS -DNDEBUG"
-fi
dnl ---------------------------------------------
dnl Output configuration files
@@ -2672,6 +1121,7 @@ include/Makefile
include/xine.h
lib/Makefile
m4/Makefile
+m4/gettext/Makefile
misc/Makefile
misc/SlackBuild
misc/build_rpms.sh
@@ -2758,443 +1208,12 @@ dnl there have no trailing slash.
dnl ---------------------------------------------
dnl Note: Brackets [] must be doubled as they are treated as m4 macro quotes.
-cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool.tmp
-mv -f libtool.tmp libtool
-chmod +x libtool
-
-dnl ---------------------------------------------
-dnl Some infos:
-dnl ---------------------------------------------
-
-echo "xine-lib summary:"
-echo "----------------"
-
-dnl Input
-echo " * input plugins:"
-echo " - file - net"
-echo " - stdin_fifo - rtp"
-echo " - http - mms"
-echo " - pnm - rtsp"
-echo " - dvb - vdr"
-if test "x$external_dvdnav" = "xyes"; then
- echo " - dvd (external libs)"
-else
- echo " - dvd (internal libs)"
-fi
-if test "x$have_cdrom_ioctls" = "xyes"; then
- if test "x$enable_vcd" = "xyes"; then
- if test "x$internal_vcdnav" = "xno"; then
- echo " - vcd (external libs)"
- else
- echo " - vcd (internal libs)"
- fi
- fi
- echo " - vcdo"
- echo " - cdda"
-fi
-if test "x$no_gnome_vfs" = "xno"; then
- echo " - gnome-vfs"
-fi
-if test "x$have_v4l" = "xyes"; then
- echo " - v4l"
-fi
-if test "x$have_libsmbclient" = "xyes"; then
- echo " - smbclient"
-fi
-echo ""
-
-dnl Demuxers
-echo " * demultiplexer plugins:"
-echo " - avi - mpeg"
-echo " - mpeg_block - mpeg_audio"
-echo " - mpeg_elem - mpeg_pes"
-echo " - mpeg_ts - qt/mpeg-4"
-echo " - film - roq"
-echo " - fli - smjpeg"
-echo " - idcin - wav"
-echo " - wc3 mve - voc"
-echo " - vqa - aiff"
-echo " - cdda - snd/au"
-echo " - yuv4mpeg2 - real/realaudio"
-echo " - ea wve - raw dv"
-echo " - interplay mve - psx str"
-echo " - ws aud - pva"
-echo " - vox - nsf"
-echo " - nsv - 4xm"
-echo " - FLAC - aac"
-echo " - iff - matroska"
-echo " - vmd - flv"
-if test "x$enable_asf" = "xyes"; then
- echo " - asf"
-fi
-if test "x$have_vorbis" = "xyes"; then
- echo " - ogg"
-fi
-if test "x$have_libmng" = "xyes"; then
- echo " - mng"
-fi
-if test "x$enable_modplug" != x"no"; then
- echo " - mod"
-fi
-if test "x$have_libflac" = "xyes"; then
- echo " - FLAC (with libFLAC)"
-fi
-if test "x$have_wavpack" = "xyes"; then
- echo " - WavPack"
-fi
-if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
- echo " - ac3 (external library)"
- else
- echo " - ac3 (internal library)"
- fi
-fi
-echo ""
-
-dnl video decoders
-echo " * video decoder plugins:"
-echo " - MPEG 1,2 - Amiga Bitplane"
-echo " - Raw RGB - Raw YUV"
-if test "x$with_external_ffmpeg" = "xyes"; then
- echo " - ffmpeg (external library):"
+if test x"$enable_macosx_universal" = x"no"; then
+ cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool.tmp
else
- echo " - ffmpeg (internal library):"
-fi
-echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)"
-echo " - Creative YUV - Motion JPEG"
-echo " - Cinepak - MS Video-1"
-echo " - FLI/FLC - MS RLE"
-echo " - Id RoQ - Id Cin"
-echo " - Apple Graphics - Apple Video"
-echo " - Apple Animation - Interplay Video"
-echo " - Westwood VQA - Origin Xan"
-echo " - H.263 - Intel Indeo 3"
-echo " - SVQ1 - SVQ3"
-echo " - Real Video 1.0 - Real Video 2.0"
-echo " - 4X Video - Sierra Video"
-echo " - Asus v1/v2 - HuffYUV"
-echo " - On2 VP3 - DV"
-echo " - 8BPS - Duck TrueMotion v1"
-echo " - ATI VCR1 - Flash Video"
-echo " - ZLIB - MSZH"
-if test "x$have_dxr3" = "xyes"; then
- echo " - dxr3_video"
-fi
-if test "x$enable_w32dll" = "xyes"; then
- echo " - w32dll"
-fi
-if test "x$have_imagemagick" = "xyes"; then
- echo " - image"
-fi
-if test x"no_gdkpixbuf" != "xyes"; then
- echo " - gdk-pixbuf"
-fi
-if test "x$have_theora" = "xyes"; then
- echo " - theora"
-fi
-echo ""
-
-dnl audio decoders
-echo " * audio decoder plugins:"
-echo " - GSM 06.10"
-echo " - linear PCM - Nosefart (NSF)"
-if test "x$with_external_ffmpeg" = "xyes"; then
- echo " - ffmpeg (external library):"
-else
- echo " - ffmpeg (internal library):"
-fi
-echo " - Windows Media Audio v1/v2"
-echo " - DV - logarithmic PCM"
-echo " - 14k4 - 28k8"
-echo " - MS ADPCM - IMA ADPCM"
-echo " - XA ADPCM - Game DPCM/ADPCM"
-echo " - Mace 3:13 - Mace 6:1"
-echo " - FLAC"
-if test "x$have_libflac" = "xyes"; then
- echo " - FLAC (with libFLAC)"
-fi
-if test "x$have_vorbis" = "xyes"; then
- echo " - vorbis"
-fi
-if test "x$have_speex" = "xyes"; then
- echo " - speex"
-fi
-if test "x$enable_w32dll" = "xyes"; then
- echo " - w32dll"
-fi
-if test "x$enable_faad" = "xyes"; then
- echo " - faad"
-fi
-if test "x$enable_libmad" = "xyes"; then
- if test "x$have_mad" = "xyes"; then
- echo " - MAD (MPG 1/2/3) (external library)"
- else
- echo " - MAD (MPG 1/2/3) (internal library)"
- fi
-fi
-if test "x$enable_libdts" = "xyes"; then
- if test "x$have_dts" = "xyes"; then
- echo " - DTS (external library)"
- else
- echo " - DTS (internal library)"
- fi
-fi
-if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
- echo " - A52/ra-dnet (external library)"
- else
- echo " - A52/ra-dnet (internal library)"
- fi
-fi
-if test "x$enable_musepack" != "xno"; then
- if test "x$have_mpcdec" = "xyes"; then
- echo " - MusePack (external library)"
- else
- echo " - MusePack (internal library)"
- fi
-fi
-if test "x$have_wavpack" = "xyes"; then
- echo " - WavPack"
-fi
-echo ""
-
-dnl spu decoders
-echo " * subtitle decoder plugins:"
-echo " - spu - spucc"
-echo " - spucmml - sputext"
-echo " - spudvb"
-if test "x$have_dxr3" = "xyes"; then
- echo " - dxr3_spu"
-fi
-echo ""
-
-dnl post plugins
-echo " * post effect plugins:"
-echo " * planar video effects:"
-echo " - invert - expand"
-echo " - eq - eq2"
-echo " - boxblur - denoise3d"
-echo " - unsharp - tvtime"
-echo " - vdr"
-echo " * SFX:"
-echo " - goom - oscope"
-echo " - fftscope - mosaico"
-echo ""
-
-dnl Video plugins
-echo " * video driver plugins:"
-if test "x$no_x" != "xyes"; then
- echo " - XShm (X11 shared memory)"
- dnl synfb
- if test "x$enable_syncfb" != "xno"; then
- echo " - SyncFB (for Matrox G200/G400 cards)"
- fi
- dnl Xv
- if test "x$ac_have_xv" = "xyes"; then
- if test "x$ac_have_xv_static" = "xyes"; then
- echo " - Xv (XVideo *static*)"
- else
- echo " - Xv (XVideo *shared*)"
- fi
- fi
- dnl XxMC
- if test "x$ac_have_xxmc" = "xyes"; then
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- echo " - XxMC (XVideo extended motion compensation)"
- else
- echo " - XxMC (XVideo motion compensation - vld extensions DISABLED)"
- fi
- fi
- dnl XvMC
- if test "x$ac_have_xvmc" = "xyes"; then
- echo " - XvMC (XVideo motion compensation)"
- fi
- if test "x$ac_have_opengl" = "xyes" -a "x$ac_have_glut" = "xyes" -o \
- x$"ac_have_opengl" = "xyes" -a "x$ac_have_glu" = "xyes"; then
- echo " - OpenGL"
- fi
- if test "x$ac_have_sunfb" = "xyes"; then
- if test "x$ac_have_sundga" = "xyes"; then
- echo " - PGX64 (for Sun XVR100/PGX64/PGX24 cards)"
- echo " - PGX32 (for Sun PGX32 cards)"
- fi
- fi
-fi
-if test "x$have_xcb" = "xyes"; then
- dnl xcb-shm
- if test "x$have_xcbshm" = "xyes"; then
- echo " - xcb-shm (X shared memory using XCB)"
- fi
- dnl xcb-xv
- if test "x$have_xcbxv" = "xyes"; then
- echo " - xcb-xv (XVideo using XCB)"
- fi
-fi
-if test "x$no_aalib" != "xyes"; then
- echo " - aa (Ascii ART)"
-fi
-if test "x$have_caca" = "xyes"; then
- echo " - caca (Color AsCii Art)"
-fi
-if test "x$have_fb" = "xyes"; then
- echo " - fb (Linux framebuffer device)"
-fi
-if test "x$have_sdl" = "xyes"; then
- echo " - sdl (Simple DirectMedia Layer)"
-fi
-if test "x$have_libstk" = "xyes"; then
- echo " - stk (Libstk Set-top Toolkit)"
-fi
-if test "x$have_directfb" = "xyes"; then
- echo " - directfb (DirectFB driver)"
-fi
-if test "x$have_dxr3" = "xyes"; then
- if test "x$have_encoder" = "xyes"; then
- echo " - dxr3 (Hollywood+ and Creative dxr3, both mpeg and non-mpeg video)"
- else
- echo " - dxr3 (Hollywood+ and Creative dxr3, mpeg video only)"
- fi
-fi
-if test "x$enable_vidix" = "xyes"; then
- echo $ECHO_N " - vidix ("
-
- if test "x$no_x" != "xyes"; then
- echo $ECHO_N "X11"
- if test "x$have_fb" = "xyes"; then
- echo $ECHO_N " and "
- fi
- fi
-
- if test "x$have_fb" = "xyes"; then
- echo $ECHO_N "framebuffer"
- fi
-
- echo $ECHO_N " support"
-
- if test "x$enable_dha_kmod" = "xyes"; then
- echo " with dhahelper)"
- else
- echo ")"
- fi
-fi
-if test "x$have_directx" = "xyes"; then
- echo " - directx (DirectX video driver)"
-fi
-if test "x$have_macosx_video" = "xyes"; then
- echo " - Mac OS X OpenGL"
-fi
-
-echo ""
-
-dnl Audio plugins
-echo " * audio driver plugins:"
-if test "x$have_ossaudio" = "xyes"; then
- echo " - oss (Open Sound System)"
-fi
-if test "x$have_alsa" = "xyes"; then
- echo " - alsa"
-fi
-if test "x$have_esound" = "xyes"; then
- echo " - esd (Enlightened Sound Daemon)"
-fi
-if test "x$no_arts" != "xyes"; then
- echo " - arts (aRts - KDE soundserver)"
-fi
-if test "x$no_fusionsound" != "xyes"; then
- echo " - fusionsound (FusionSound driver)"
-fi
-if test "x$have_sunaudio" = "xyes"; then
- echo " - sun ()"
-fi
-if test "x$am_cv_have_irixal" = xyes; then
- echo " - irixal (Irix audio library)"
-fi
-if test "x$have_directx" = "xyes"; then
- echo " - directx (DirectX audio driver)"
-fi
-if test "x$have_coreaudio" = "xyes"; then
- echo " - CoreAudio (Mac OS X audio driver)"
-fi
-if test "x$have_pulseaudio" = "xyes"; then
- echo " - pulseaudio sound server"
-fi
-if test "x$have_jack" = "xyes"; then
- echo " - Jack"
-fi
-echo "---"
-
-
-dnl ---------------------------------------------
-dnl some user warnings
-dnl ---------------------------------------------
-
-dnl some levels of variable expansion to get final install paths
-final_libdir="`eval eval eval eval echo $libdir`"
-final_bindir="`eval eval eval eval echo $bindir`"
-
-if test -r /etc/ld.so.conf && ! grep -x "$final_libdir" /etc/ld.so.conf >/dev/null ; then
- if test "$final_libdir" != "/lib" -a "$final_libdir" != "/usr/lib" ; then
- if ! echo "$LD_LIBRARY_PATH" | egrep "(:|^)$final_libdir(/?:|/?$)" >/dev/null ; then
- echo
- echo "****************************************************************"
- echo "xine-lib will be installed to $final_libdir"
- echo
- echo "This path is not mentioned among the linker search paths in your"
- echo "/etc/ld.so.conf. This means it is possible that xine-lib will"
- echo "not be found when you try to compile or run a program using it."
- echo "If this happens, you should add $final_libdir to"
- echo "the environment variable LD_LIBRARY_PATH like that:"
- echo
- echo "export LD_LIBRARY_PATH=$final_libdir:\$LD_LIBRARY_PATH"
- echo
- echo "Alternatively you can add a line \"$final_libdir\""
- echo "to your /etc/ld.so.conf."
- echo "****************************************************************"
- echo
- fi
- fi
-fi
-
-if ! echo "$PATH" | egrep "(:|^)$final_bindir(/?:|/?$)" >/dev/null ; then
- echo
- echo "****************************************************************"
- echo "xine-config will be installed to $final_bindir"
- echo
- echo "This path is not in your search path. This means it is possible"
- echo "that xine-config will not be found when you try to compile a"
- echo "program using xine-lib. This will result in build failures."
- echo "If this happens, you should add $final_bindir to"
- echo "the environment variable PATH like that:"
- echo
- echo "export PATH=$final_bindir:\$PATH"
- echo
- echo "Note that this is only needed for compilation. It is not needed"
- echo "to have xine-config in your search path at runtime. (Although"
- echo "it will not cause any harm either.)"
- echo "****************************************************************"
- echo
+ cat libtool | sed -e 's,sys_lib_search_path_spec=.*$,sys_lib_search_path_spec=\"/Developer/SDKs/MacOSX10.4u.sdk/usr/lib\",' > libtool.tmp
fi
+mv -f libtool.tmp libtool
+chmod +x libtool
-dnl warn if no X11 plugins will be built
-if test "x$no_x" = "xyes"; then
- case $host in
- *mingw*|*-cygwin) ;;
- *-darwin*) ;;
- *)
- echo
- echo "****************************************************************"
- echo "WARNING! No X11 output plugins will be built."
- echo
- echo "For some reason, the requirements for building the X11 video"
- echo "output plugins are not met. That means, that you will NOT be"
- echo "able to use the resulting xine-lib to watch videos in a window"
- echo "on any X11-based display (e.g. your desktop)."
- echo
- echo "If this is not what you want, provide the necessary X11 build"
- echo "dependencies (usually done by installing a package called"
- echo "XFree86-devel or similar) and run configure again."
- echo "****************************************************************"
- echo
- ;;
- esac
-fi
+XINE_LIB_SUMMARY
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 8433d4ce8..6e019ba62 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -2,17 +2,15 @@ SUBDIRS = libmpcdec libxdg-basedir libdca
srcdir = $(shell cd @srcdir@; pwd)
-CC = @CC@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-VISIBILITY_FLAG = @VISIBILITY_FLAG@
+ffmpeg_builder = $(srcdir)/ffmpeg-universal.sh
-if HAVE_DXR3
+if ENABLE_DXR3
dxr3encoder = --enable-encoder=mpeg1video
endif
if FFMPEG_DISABLE_UNCOMMON_CODECS
-disable_uncommon_codecs=--disable-decoder=aasc --disable-decoder=asv1 --disable-decoder=asv2 --disable-decoder=avs \
+disable_uncommon_codecs = \
+ --disable-decoder=aasc --disable-decoder=asv1 --disable-decoder=asv2 --disable-decoder=avs \
--disable-decoder=cscd --disable-decoder=cyuv --disable-decoder=dvvideo --disable-decoder=eightbps \
--disable-decoder=flic --disable-decoder=flv --disable-decoder=fourxm --disable-decoder=fraps \
--disable-decoder=huffyuv --disable-decoder=idcin --disable-decoder=interplay_video --disable-decoder=kmvc \
@@ -37,7 +35,8 @@ disable_uncommon_codecs=--disable-decoder=aasc --disable-decoder=asv1 --disable-
endif
if FFMPEG_DISABLE_POPULAR_CODECS
-disable_popular_codecs=--disable-decoder=cinepak --disable-decoder=flashsv --disable-decoder=h261 --disable-decoder=h263 \
+disable_popular_codecs = \
+ --disable-decoder=cinepak --disable-decoder=flashsv --disable-decoder=h261 --disable-decoder=h263 \
--disable-decoder=h263i --disable-decoder=h264 --disable-decoder=indeo2 --disable-decoder=indeo3 \
--disable-decoder=mjpeg --disable-decoder=mjpegb --disable-decoder=mpeg1video --disable-decoder=mpeg2video \
--disable-decoder=mpeg4 --disable-decoder=mpegvideo --disable-decoder=msmpeg4v1 --disable-decoder=msmpeg4v2 \
@@ -53,7 +52,26 @@ configure_options =\
--disable-shared --enable-static --disable-demuxers --disable-muxers --disable-strip \
--enable-gpl --enable-pthreads --disable-ffmpeg --disable-ffserver --disable-ffplay
-disable_decoders =\
+if DEBUG_BUILD
+configure_options += --enable-debug
+else
+configure_options += --disable-debug
+endif
+if PROFILING_BUILD
+configure_options += --enable-gprof
+endif
+if DISABLE_OPTIMIZATIONS
+configure_options += --disable-opts
+endif
+if HAVE_MLIB
+configure_options += --enable-sunmlib
+endif
+
+if !HOST_OS_DARWIN
+FFMPEG_EXTRA_CFLAGS = -fPIC -DPIC
+endif
+
+disable_decoders = \
--disable-decoder=bmp --disable-decoder=cavs --disable-decoder=cljr --disable-decoder=dsicinvideo \
--disable-decoder=ffv1 --disable-decoder=ffvhuff --disable-decoder=gif --disable-decoder=mdec \
--disable-decoder=mpeg_xvmc --disable-decoder=mszh --disable-decoder=png --disable-decoder=rawvideo \
@@ -64,31 +82,32 @@ disable_decoders =\
--disable-decoder=dvdsub --disable-decoder=theora --disable-decoder=aac --disable-decoder=mpeg4aac \
--disable-decoder=ac3 --disable-decoder=vorbis
-all_configure_options = $(configure_options) \
- --disable-encoders $(dxr3encoder) \
- --enable-encoders $(disable_uncommon_codecs) $(disable_popular_codecs) \
- $(disable_decoders) \
- --make="$(MAKE)" \
- --cc="$(CC)"
+all_configure_options = \
+ $(configure_options) --make="$(MAKE)" --cc="$(CC)" \
+ --disable-encoders $(dxr3encoder) $(disable_decoders) \
+ $(disable_uncommon_codecs) $(disable_popular_codecs)
-ffmpeg/config.mak: $(srcdir)/ffmpeg/configure Makefile
+ffmpeg/config.mak: ffmpeg/configure Makefile $(ffmpeg_builder)
if MACOSX_UNIVERSAL_BINARY
- export CFLAGS="$(VISIBILITY_FLAG)"; \
- export FFMPEG_CONFIGURE_OPTIONS="$(all_configure_options)"; \
- $(srcdir)/ffmpeg-universal.sh -configure "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
+ export CFLAGS="$(VISIBILITY_FLAG)"; \
+ export FFMPEG_CONFIGURE_OPTIONS="$(all_configure_options)"; \
+ $(ffmpeg_builder) -configure "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
mkdir -p ffmpeg
cd ffmpeg; \
$(srcdir)/ffmpeg/configure $(all_configure_options) \
- --extra-cflags="$(CFLAGS) $(VISIBILITY_FLAG) -fPIC -DPIC" \
- --extra-ldflags="$(LDFLAGS)"; \
+ --extra-cflags="$(VISIBILITY_FLAG) $(FFMPEG_EXTRA_CFLAGS)"; \
cd ..
+if HOST_OS_DARWIN
+ cat ffmpeg/config.mak | sed -e '/OPTFLAGS=/s/-mdynamic-no-pic//g' > ffmpeg/config.tmp
+ mv -f ffmpeg/config.tmp ffmpeg/config.mak
+endif
endif
ffmpeg/libavutil/libavutil.a: ffmpeg/config.mak
if MACOSX_UNIVERSAL_BINARY
export MAKE="$(MAKE)"; \
- $(srcdir)/ffmpeg-universal.sh -avutil "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
+ $(ffmpeg_builder) -avutil "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
$(MAKE) -C ffmpeg/libavutil libavutil.a
endif
@@ -96,7 +115,7 @@ endif
ffmpeg/libavcodec/libavcodec.a: ffmpeg/config.mak
if MACOSX_UNIVERSAL_BINARY
export MAKE="$(MAKE)"; \
- $(srcdir)/ffmpeg-universal.sh -avcodec "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
+ $(ffmpeg_builder) -avcodec "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
$(MAKE) -C ffmpeg/libavcodec libavcodec.a
endif
@@ -104,28 +123,23 @@ endif
ffmpeg/libpostproc/libpostproc.a: ffmpeg/config.mak
if MACOSX_UNIVERSAL_BINARY
export MAKE="$(MAKE)"; \
- $(srcdir)/ffmpeg-universal.sh -postproc "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
+ $(ffmpeg_builder) -postproc "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
$(MAKE) -C ffmpeg/libpostproc libpostproc.a
endif
clean-local:
if MACOSX_UNIVERSAL_BINARY
- for arch in $(UNIVERSAL_ARCHES); do \
- $(MAKE) -C ffmpeg/$$arch clean; \
- done
- rm -f ffmpeg/libavcodec/libavcodec.a ffmpeg/libavutil/libavutil.a ffmpeg/libpostproc/libpostproc.a
+ export MAKE="$(MAKE)"; \
+ $(ffmpeg_builder) -clean "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
-$(MAKE) -C ffmpeg clean
endif
distclean-local:
if MACOSX_UNIVERSAL_BINARY
- for arch in $(UNIVERSAL_ARCHES); do \
- $(MAKE) -C ffmpeg/$$arch distclean; \
- done
- rm -f ffmpeg/config.mak ffmpeg/config.h
- rm -f ffmpeg/libavcodec/libavcodec.a ffmpeg/libavutil/libavutil.a ffmpeg/libpostproc/libpostproc.a
+ export MAKE="$(MAKE)"; \
+ $(ffmpeg_builder) -distclean "$(srcdir)/ffmpeg" $(UNIVERSAL_ARCHES)
else
-$(MAKE) -C ffmpeg distclean
endif
@@ -133,10 +147,7 @@ endif
EXTRA_DIST = README.contrib ffmpeg-distfiles
dist-hook:
- while read entry; do \
- test -d $(srcdir)/$$entry && \
- mkdir -p $(distdir)/$$entry; \
- test -f $(srcdir)/$$entry && \
- cp -p $(srcdir)/$$entry $(distdir)/$$entry; \
+ while read entry; do \
+ test -d $(srcdir)/$$entry && mkdir -p $(distdir)/$$entry; \
+ test -f $(srcdir)/$$entry && cp -p $(srcdir)/$$entry $(distdir)/$$entry; \
done < $(srcdir)/ffmpeg-distfiles
-
diff --git a/contrib/ffmpeg-universal.sh b/contrib/ffmpeg-universal.sh
index 811aaa868..6e27c56b8 100755
--- a/contrib/ffmpeg-universal.sh
+++ b/contrib/ffmpeg-universal.sh
@@ -7,6 +7,8 @@ function usage {
echo " -avcodec build libavcodec.a for each architecture"
echo " -avutil build libavutil.a for each architecture"
echo " -postproc build libpostproc.a for each architecture"
+ echo " -clean clean for each architecture"
+ echo " -distclean distclean for each architecture"
echo ""
echo "Configuration must be done before any library builds. Options to be passed"
echo "to ffmpeg's configure command-line should be passed in the environment"
@@ -50,10 +52,18 @@ function run_configure {
--extra-ldflags="$EXTRA_LDFLAGS"
local retval=$?
- popd > /dev/null 2>&1
- if test $retval -ne 0; then
- exit $retval
+ # We're building ffmpeg to put it into a shared library, but ffmpeg thinks
+ # it's building to put it into a static library or program image, so it
+ # adds -mdynamic-no-pic to its list of options as an optimization. This is
+ # fine in Tiger if later linked with -Wl,-read_only_relocs,warning, but it
+ # isn't fine on other versions of Mac OS X.
+ if test -f config.mak; then
+ cat config.mak | sed -e '/OPTFLAGS=/s/-mdynamic-no-pic//g' > config.tmp
+ mv -f config.tmp config.mak
fi
+
+ popd > /dev/null 2>&1
+ `exit $retval` || exit $retval
}
if test x"$*" = x""; then
@@ -72,6 +82,12 @@ case "$1" in
-postproc)
MODE=postproc
;;
+ -clean)
+ MODE=clean
+ ;;
+ -distclean)
+ MODE=distclean
+ ;;
*)
echo "Unrecognized mode: $1"
usage
@@ -90,6 +106,19 @@ fi
SOURCE_PATH="$1"
shift
+TOP_BUILD_PATH="`pwd`/ffmpeg"
+if test -f "$TOP_BUILD_PATH/configure"; then
+ # Building in place. Create a temporary build directory and use that
+ # instead, but place the final output from lipo into the original
+ # build directory.
+ BUILD_PATH="$TOP_BUILD_PATH/build"
+else
+ BUILD_PATH="$TOP_BUILD_PATH"
+fi
+# This doesn't make sense for -configure, but it does for everything else.
+# The -configure mode won't ever use it anyway.
+OUTPUT_FILENAME="$BUILD_PATH/lib$MODE/lib$MODE.a"
+
HOST_ARCH=`arch`
UNIVERSAL_ARCHES=$*
if test x"$UNIVERSAL_ARCHES" = x""; then
@@ -97,9 +126,9 @@ if test x"$UNIVERSAL_ARCHES" = x""; then
UNIVERSAL_ARCHES=$HOST_ARCH
fi
CONFIG_FILES=
-LIPO_CMDLINE="-create -output ffmpeg/lib$MODE/lib$MODE.a"
+LIPO_CMDLINE="-create -output $OUTPUT_FILENAME"
for arch in $UNIVERSAL_ARCHES; do
- ffmpeg_topbuilddir="ffmpeg/$arch"
+ ffmpeg_topbuilddir="$BUILD_PATH/$arch"
LIPO_CMDLINE="$LIPO_CMDLINE -arch $arch $ffmpeg_topbuilddir/lib$MODE/lib$MODE.a"
case $MODE in
configure)
@@ -115,16 +144,34 @@ for arch in $UNIVERSAL_ARCHES; do
postproc)
"$MAKE" -C "$ffmpeg_topbuilddir/libpostproc" libpostproc.a || exit $?
;;
+ clean)
+ "$MAKE" -C "$ffmpeg_topbuilddir" clean || exit $?
+ ;;
+ distclean)
+ "$MAKE" -C "$ffmpeg_topbuilddir" distclean || exit $?
+ ;;
esac
done
-if test "$MODE" != "configure"; then
- mkdir -p ffmpeg/lib$MODE
- lipo $LIPO_CMDLINE
-else
- # Now that configuration is done, create config.h in the top-level ffmpeg
- # directory. Pull out only what's needed by xine-lib, removing any possible
- # platform conflicts
- grep -h "define CONFIG_.*_DECODER" $CONFIG_FILES | uniq > ffmpeg/config.h
- touch ffmpeg/config.mak
-fi
+case $MODE in
+ configure)
+ # Now that configuration is done, create config.h in the top-level
+ # ffmpeg directory. Pull out only what's needed by xine-lib, removing
+ # any possible platform conflicts
+ grep -h "define CONFIG_.*_DECODER" $CONFIG_FILES | uniq > "$BUILD_PATH/config.h"
+ touch "$BUILD_PATH/config.mak"
+ ;;
+ clean)
+ rm -f "$BUILD_PATH/libavcodec/libavcodec.a" "$BUILD_PATH/libavutil/libavutil.a" \
+ "$BUILD_PATH/libpostproc/libpostproc.a"
+ ;;
+ distclean)
+ rm -f "$BUILD_PATH/config.mak" "$BUILD_PATH/config.h"
+ rm -f "$BUILD_PATH/libavcodec/libavcodec.a" "$BUILD_PATH/libavutil/libavutil.a" \
+ "$BUILD_PATH/libpostproc/libpostproc.a"
+ ;;
+ *)
+ mkdir -p "`dirname "$OUTPUT_FILENAME"`"
+ lipo $LIPO_CMDLINE
+ ;;
+esac
diff --git a/contrib/libdca/Makefile.am b/contrib/libdca/Makefile.am
index 14206a363..faab0dd14 100644
--- a/contrib/libdca/Makefile.am
+++ b/contrib/libdca/Makefile.am
@@ -1,5 +1,9 @@
-if DTS
-if !EXTERNAL_LIBDTS
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
+EXTRA_DIST = COPYING
+
+if ENABLE_DTS
+if !WITH_EXTERNAL_LIBDTS
noinst_LTLIBRARIES = libdca.la
endif
endif
@@ -8,8 +12,5 @@ libdca_la_SOURCES = dca_internal.h tables.h tables_quantization.h \
tables_huffman.h tables_fir.h tables_adpcm.h tables_vq.h \
bitstream.h bitstream.c parse.c downmix.c \
include/dca.h include/dts.h
-
-libdca_la_CFLAGS = -I$(srcdir)/include $(VISIBILITY_FLAG)
libdca_la_LIBADD = -lm
-
-EXTRA_DIST = COPYING
+libdca_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include
diff --git a/contrib/libmpcdec/Makefile.am b/contrib/libmpcdec/Makefile.am
index 16ea80c28..24e2c0157 100644
--- a/contrib/libmpcdec/Makefile.am
+++ b/contrib/libmpcdec/Makefile.am
@@ -1,5 +1,9 @@
-if MUSEPACK
-if !EXTERNAL_MPCDEC
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
+EXTRA_DIST = diff_from_libmpcdec_1.2.5.patch COPYING
+
+if ENABLE_MUSEPACK
+if !WITH_EXTERNAL_LIBMPCDEC
noinst_LTLIBRARIES = libmpcdec.la
endif
endif
@@ -9,6 +13,3 @@ libmpcdec_la_SOURCES = huffsv46.c huffsv7.c idtag.c mpc_decoder.c mpc_reader.c \
mpcdec/internal.h mpcdec/mpcdec.h mpcdec/streaminfo.h mpcdec/math.h \
mpcdec/decoder.h mpcdec/config_types.h mpcdec/requant.h mpcdec/huffman.h \
mpcdec/reader.h
-libmpcdec_la_CFLAGS = $(VISIBILITY_FLAG)
-
-EXTRA_DIST = diff_from_libmpcdec_1.2.5.patch COPYING
diff --git a/contrib/libxdg-basedir/Makefile.am b/contrib/libxdg-basedir/Makefile.am
index 68f09b0a9..420d85999 100644
--- a/contrib/libxdg-basedir/Makefile.am
+++ b/contrib/libxdg-basedir/Makefile.am
@@ -2,5 +2,6 @@ if !EXTERNAL_LIBXDG_BASEDIR
noinst_LTLIBRARIES = libxdg-basedir.la
endif
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
libxdg_basedir_la_SOURCES = basedir.c basedir.h
-libxdg_basedir_la_CFLAGS = $(VISIBILITY_FLAG)
diff --git a/debian/rules b/debian/rules
index fd9003df2..5082cc75a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -58,6 +58,12 @@ ifeq (,$(findstring optimize,$(DEB_BUILD_OPTIONS)))
DEB_BUILD_CONFIG_OPTIONS += --build=$(DEB_BUILD_GNU_TYPE)
endif
+# enable SyncFB video output plugin on Linux
+ifeq (linux,$(filter linux,$(subst -, ,$(DEB_BUILD_GNU_TYPE))))
+ DEB_BUILD_CONFIG_OPTIONS += --enable-syncfb
+endif
+
+# --mandir - remove after etch released (autoconf >= 2.59c gets it right)
CONFIGURE_FLAGS := --prefix=/usr \
--with-external-libmad \
--with-external-a52dec \
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 1a757a4ca..c456d8438 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = man hackersguide faq
doc_DATA = README README.dvb README.dxr3 \
README.freebsd README.irix README.network_dvd README.opengl \
README.solaris README.syncfb README_xxmc.html README.MINGWCROSS \
- README.WIN32
+ README.WIN32 README.macosx
EXTRA_DIST = $(doc_DATA)
diff --git a/doc/README b/doc/README
index 56d133a70..2674a0869 100644
--- a/doc/README
+++ b/doc/README
@@ -29,6 +29,9 @@ README.freebsd
README.irix
hints on running xine on IRIX
+README.macosx
+ hints on building xine on Mac OS X
+
README.network_dvd
how to play DVDs / Audio CDs over the network
diff --git a/doc/README.macosx b/doc/README.macosx
new file mode 100644
index 000000000..02c98c8d9
--- /dev/null
+++ b/doc/README.macosx
@@ -0,0 +1,141 @@
+Building
+--------
+Mac OS X builds of xine-lib are built using the same autoconf-based build
+scripts that are used on other Unix-based platforms (e.g., Linux, FreeBSD).
+There is no Xcode project, nor is there any intention to create and/or
+maintain one in the future. There's no good reason, and it would only add
+unnecessary complexity and an additional maintenance burden.
+
+Currently, xine-lib is only supported on Mac OS X 10.4 Tiger. There are no
+plans to support older versions of Mac OS X for a variety of reasons.
+
+As of xine-lib 1.2, specific versions of build tools are required. They are
+as follows:
+
+ - GNU M4 1.4.7 (1.4.9 is current, 1.4.2 is installed on Tiger)
+ - autoconf 2.59 (2.61 is current, 2.59 is installed on Tiger)
+ - automake 1.9 (1.10 is current, 1.6.3 is installed on Tiger)
+ - GNU libtool 1.5.20 (1.5.22 is current, 1.5 is installed on Tiger)
+
+When building on Tiger, since some of the system-installed tools are out of
+date, you'll need to update at least some of them. It is recommended that you
+bring all of them up to current releases as listed above.
+
+The order in which you install updated tools to replace the system-installed
+versions is important, and in some cases, specific build options are required
+for them to work properly.
+
+ 1. Install GNU M4 >= 1.4.7
+ - This is optional if you use the system-installed version of autoconf;
+ however, if you install a newer version of autoconf, you MUST install
+ a newer version of GNU M4 first.
+ - Run its configure script with --program-prefix=g
+ 2. Install autoconf >= 2.59
+ - This is optional, but it is recommended that you use autoconf 2.61.
+ - No special configure options are required. Simply configure, make, and
+ make install.
+ 3. Install automake >= 1.9
+ - This is required, and since it is required, it is recommended that you
+ use automake 1.10.
+ - No special configure options are required. Simply configure, make, and
+ make install.
+ 4. Install GNU libtool >= 1.5.20
+ - This is required, and since it is required, it is recommended that you
+ use GNU libtool 1.5.22.
+ - Run its configure script with --program-prefix=g
+
+ ** A special note about GNU libtool:
+ Mac OS X has its own utility called libtool that is NOT the same as GNU
+ libtool, but the Developer tools install GNU libtool as well. The system-
+ installed version of GNU libtool is installed with a g- prefix, and xine's
+ build scripts expect this as well if you install your own version. If you
+ do not install GNU libtool with a g- prefix, xine's build scripts will
+ pick up the system-installed version instead of the newer one you install!
+
+With your tool chain brought up-to-date with xine's requirements, you can go
+ahead and build xine-lib by first running configure, then make, and finally,
+make install, just as you would on, say, Linux. If you are building from a
+source repository snapshot or checkout, you will need to run autogen.sh first.
+
+When running configure, it's best if you do not attempt to forcibly enable most
+options that are disabled by default. For example, DVB support is disabled by
+default on Mac OS X because it doesn't work. Enabling it may allow it to build
+okay, but it will not work at runtime.
+
+The one exception is --enable-macosx-universal. Universal binaries are not
+enabled by default, but they are fully supported. With this optional enabled,
+the default is to build FAT binaries for ppc and i386; however, you may also
+enable support for ppc64 and/or x86_64. For example:
+
+ ./configure --enable-macosx-universal=i386,ppc,x86_64,ppc64
+
+CoreAudio audio output support will be enabled by default. Mac OS X video
+output support will be enabled by default. Xwindows support will be enabled
+by default for video output (using XShm, Xv, and OpenGL). In most cases,
+you'll probably want to disable Xwindows support, and that is safe to do by
+adding --without-x to the configure command-line.
+
+Running
+-------
+Very limited run-time testing has been done so far. The Mac OS X port of
+xine-lib is in its early stages, only recently becoming buildable at all,
+though some quick-and-dirty efforts have been made in the past to build and
+run on Mac OS X.
+
+At this time, native video output only works with Objective-C Cocoa windows
+using the XineOpenGLView class that resides in libxineMacOSXVideo.dylib. This
+works, but it isn't yet stable enough for every day use. Xwindows video output
+support builds, but it is unknown whether it works. If you plan on using the
+Cocoa video output support, you'll need to link with both libxine.dylib and
+libxineMacOSXVideo.dylib as well as libxine.dylib.
+
+Instantiate an audio output port as follows:
+
+ ao_port = xine_open_audio_driver(xine_instance, "coreaudio", NULL);
+
+Instantiate a video output port as follows:
+
+ vo_port = xine_open_video_driver(xine_instance, "macosx",
+ XINE_VISUAL_TYPE_MACOSX, view);
+
+In both cases, xine_instance is the return from xine_new() that has been then
+been initialized with xine_init(). For video output, the view argument to
+xine_open_video_driver() is the XineOpenGLView instance in which to render.
+
+The Future
+----------
+A full, proper port of xine-lib to Mac OS X is in progress. Efforts are under
+way to make as many of the various plug-ins work properly on Mac OS X as makes
+sense, but it is unlikely that full support will be complete by the time that
+xine-lib 1.2 is released.
+
+The following is a list of the things that will definitely be done:
+
+ * CoreVideo support for video output instead of the current NSOpenGLView-
+ based video output plug-in. The existing video output plugin will not be
+ retained as a plug-in, but the code will remain available based on the new
+ CoreVideo video output plugin.
+ * Building xine-lib as an application bundle embeddable framework, as well as
+ a system-wide installable framework, though the utility of the latter is
+ questionable.
+ * Enable VCD input support. Mac OS X specific code is required in xine-lib
+ itself to support this. Currently, only FreeBSD, Linux, and Solaris can
+ build the VCD input plugin.
+ * Investigate enabling Real binary and Win32 binary support for Intel Macs.
+ * Investigate better font support without the need for FreeType2.
+ * SPDIF pass-through for CoreAudio
+
+Known Issues
+------------
+ * Building on Leopard does not work due to build problems with ffmpeg.
+ * VCD support is not yet available, though internal versions of libcdio and
+ libvcd will build. If you enable VCD at configure time, the build WILL
+ fail.
+ * Real binary codec support is not yet available.
+ * On Intel, Win32 binary codec support is not yet available.
+ * Very little run-time testing has been done. Basic file input and ffmpeg
+ based demux/decoding is known to work.
+ * Xwindows support builds, but it has not been tested at all.
+ * Applications using xine-lib must link with both libxine.dylib and
+ libxineMacOSXVideo.dylib if they will be using the Cocoa video output
+ support.
diff --git a/include/Makefile.am b/include/Makefile.am
index 97d82e063..621bd423c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -8,12 +8,6 @@ include_HEADERS = xine.h
CONFIG_CLEAN_FILES = xine.h $(inttypes_h)
-debug:
- @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
-
-install-debug: debug
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
mostlyclean-generic:
-rm -f *~ \#* .*~ .\#*
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 36b695bc8..c6462037e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS)
+
EXTRA_DIST = Makefile.common
noinst_LTLIBRARIES = libxineposix.la
diff --git a/lib/os_internal.h b/lib/os_internal.h
index e461b5581..1e536b9fa 100644
--- a/lib/os_internal.h
+++ b/lib/os_internal.h
@@ -8,72 +8,58 @@
*/
#if defined(__APPLE__) && defined(XINE_MACOSX_UNIVERSAL_BINARY)
-#if !defined(__ppc__) && !defined(__ppc64__) && !defined(__i386__) && !defined(__x86_64__)
+/* __ppc__, __ppc64__, __i386__, __x86_64__ are interesting arch macros */
+#undef HOST_ARCH
+#if defined(__ppc__) || defined(__ppc64__)
+#define ARCH_PPC
+#if defined(__ppc64__)
+#define HOST_ARCH "darwin/powerpc64"
+#else
+#define HOST_ARCH "darwin/powerpc"
+#endif
+#elif defined(__i386__) || defined(__x86_64__)
+#define ARCH_X86
+#define BITFIELD_LSBF
+#define HAVE_MMX
+#if defined(__x86_64__)
+#define ARCH_X86_64
+#define HOST_ARCH "darwin/x86_64"
+#elif defined(__i386__)
+#define ARCH_X86_32
+#define HOST_ARCH "darwin/x86_32"
+#else
#error unrecognized/unsupported CPU type building for Apple Darwin
#endif
+#endif
-/* First get rid of anything that initial configure might have set */
-#undef ARCH_PPC
-#undef ARCH_X86
-#undef ARCH_X86_32
-#undef ARCH_X86_64
-#undef BITFIELD_LSBF
-#undef ENABLE_ALTIVEC
-#undef FPM_64BIT
-#undef FPM_DEFAULT
-#undef FPM_INTEL
-#undef FPM_PPC
-#undef HAVE_MMX
-#undef HOST_ARCH
-#undef HOST_DARWIN
+/* See /Developer/SDKs/MacOSX10.4u.sdk/usr/include/machine/limits.h */
+#if SIZEOF_INT != 4
#undef SIZEOF_INT
-#undef SIZEOF_LONG
-#undef SIZEOF_LONG_LONG
-#undef WORDS_BIGENDIAN
+#define SIZEOF_INT 4
+#endif
-#define HOST_DARWIN 1
+#if defined(__LP64__) && SIZEOF_LONG != 8
+#undef SIZEOF_LONG
+#define SIZEOF_LONG 8
+#elif !defined(__LP64__) && SIZEOF_LONG != 4
+#undef SIZEOF_LONG
+#define SIZEOF_LONG 4
+#endif
/* WORDS_BIGENDIAN (replaces AC_C_BIGENDIAN autoconf test at compile time) */
#include <machine/endian.h>
#if BYTE_ORDER == BIG_ENDIAN
#define WORDS_BIGENDIAN 1
+#else
+#undef WORDS_BIGENDIAN
#endif
-/* __ppc__, __ppc64__, __i386__, __x86_64__ are interesting arch macros */
-#if defined(__ppc__)
-#define ARCH_PPC
-#define FPM_PPC 1
-#define HOST_ARCH "darwin/powerpc"
-#define SIZEOF_INT 4
-#define SIZEOF_LONG 4
-#define SIZEOF_LONG_LONG 8
-#elif defined(__ppc64__)
-#define ARCH_PPC
+#if defined(__LP64__)
#define FPM_64BIT 1
-#define SIZEOF_INT 4
-#define SIZEOF_LONG 8
-#define SIZEOF_LONG_LONG 8
-#define HOST_ARCH "darwin/powerpc64"
-#elif defined(__i386__)
-#define ARCH_X86
-#define ARCH_X86_32
-#define BITFIELD_LSBF
+#elif defined(__ppc__) || defined(__ppc64__)
+#define FPM_PPC 1
+#elif defined(__i386__) || defined(__x86_64__)
#define FPM_INTEL 1
-#define HAVE_MMX
-#define HOST_ARCH "darwin/i386"
-#define SIZEOF_INT 4
-#define SIZEOF_LONG 4
-#define SIZEOF_LONG_LONG 8
-#elif defined(__x86_64__)
-#define ARCH_X86
-#define ARCH_X86_64
-#define BITFIELD_LSBF
-#define FPM_64BIT 1
-#define HAVE_MMX
-#define HOST_ARCH "darwin/x64_64"
-#define SIZEOF_INT 4
-#define SIZEOF_LONG 8
-#define SIZEOF_LONG_LONG 8
#endif
#endif /* __APPLE__ */
@@ -94,7 +80,7 @@
#endif
#include <inttypes.h>
-
+#include <pthread.h>
#if defined(WIN32) || defined(__CYGWIN__)
# define XINE_PATH_SEPARATOR_STRING ";"
@@ -208,6 +194,13 @@ int xine_private_vasprintf(char **string, const char *format, va_list ap) XINE_F
char *xine_private_strndup(const char *s, size_t n);
#endif
+/* replacement of pthread_mutex_timedlock */
+#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
+#define HAVE_PTHREAD_MUTEX_TIMEDLOCK
+#define pthread_mutex_timedlock(M, T) xine_private_pthread_mutex_timedlock((M), (T))
+int xine_private_pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abs_timeout);
+#endif
+
/* handle non-standard function names */
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
# define HAVE_SNPRINTF
diff --git a/lib/timedlock.c b/lib/timedlock.c
new file mode 100644
index 000000000..997ef6235
--- /dev/null
+++ b/lib/timedlock.c
@@ -0,0 +1,33 @@
+#include "config.h"
+
+#include <errno.h>
+
+#define _x_min(a, b) ((a) < (b) ? (a) : (b))
+
+int xine_private_pthread_mutex_timedlock(pthread_mutex_t *mutex,
+ const struct timespec *abs_timeout)
+{
+ int pthread_rc;
+ struct timespec remaining, slept, ts;
+
+ remaining = *abs_timeout;
+ while ((pthread_rc = pthread_mutex_trylock(mutex)) == EBUSY) {
+ ts.tv_sec = 0;
+ ts.tv_nsec = (remaining.tv_sec > 0 ? 10000000
+ : _x_min(remaining.tv_nsec, 10000000));
+ nanosleep(&ts, &slept);
+ ts.tv_nsec -= slept.tv_nsec;
+ if (ts.tv_nsec <= remaining.tv_nsec) {
+ remaining.tv_nsec -= ts.tv_nsec;
+ }
+ else {
+ remaining.tv_sec--;
+ remaining.tv_nsec = (1000000 - (ts.tv_nsec - remaining.tv_nsec));
+ }
+ if (remaining.tv_sec < 0 || (!remaining.tv_sec && remaining.tv_nsec <= 0)) {
+ return ETIMEDOUT;
+ }
+ }
+
+ return pthread_rc;
+}
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 3a5209dc3..068661ebd 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+SUBDIRS = gettext
+
if INSTALL_M4
m4datadir = $(ACLOCAL_DIR)
else
@@ -8,29 +10,20 @@ endif
m4data_DATA = xine.m4
-EXTRA_DIST = glibc2.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 \
- aa.m4 \
- arts.m4 \
+EXTRA_DIST = \
attributes.m4 \
- codeset.m4 \
+ audio_out.m4 \
+ decoders.m4 \
directx.m4 \
- dl.m4 \
- dvdnav.m4 \
- gettext.m4 \
- glibc21.m4 \
- iconv.m4 \
- irixal.m4 \
- isc-posix.m4 \
- lcmessage.m4 \
- libFLAC.m4 \
- libfame.m4 \
- libtool15.m4 \
- opengl.m4 \
- optimizations.m4 \
+ gas.m4 \
+ input.m4 \
+ macosx.m4 \
+ objc.m4 \
pkg.m4 \
- progtest.m4 \
- xine.m4 \
- _xine.m4 \
- xv.m4 \
+ programs.m4 \
pthreads.m4 \
- gas.m4
+ symbol.m4 \
+ summary.m4 \
+ types.m4 \
+ video_out.m4 \
+ xine.m4
diff --git a/m4/_xine.m4 b/m4/_xine.m4
deleted file mode 100644
index 930703bbb..000000000
--- a/m4/_xine.m4
+++ /dev/null
@@ -1,568 +0,0 @@
-dnl AC_C_ALWAYS_INLINE
-dnl Define inline to something appropriate, including the new always_inline
-dnl attribute from gcc 3.1
-dnl Thanks to Michel LESPINASSE <walken@zoy.org>
-dnl __inline__ "check" added by Darren Salt
-AC_DEFUN([AC_C_ALWAYS_INLINE],
- [AC_C_INLINE
- if test x"$GCC" = x"yes" -a x"$ac_cv_c_inline" = x"inline"; then
- AC_MSG_CHECKING([for always_inline])
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wall -Werror"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ ((__always_inline__)) void f (void);]])],
- [ac_cv_always_inline=yes],[ac_cv_always_inline=no])
- CFLAGS="$SAVE_CFLAGS"
- AC_MSG_RESULT([$ac_cv_always_inline])
- if test x"$ac_cv_always_inline" = x"yes"; then
- AH_TOP([
-#ifdef inline
-/* the strange formatting below is needed to prevent config.status from rewriting it */
-# undef \
- inline
-#endif
- ])
- AC_DEFINE_UNQUOTED([inline],[inline __attribute__ ((__always_inline__))])
- fi
- ac_cv_c___inline__=''
- else
- # FIXME: test the compiler to see if it supports __inline__
- # instead of assuming that if it isn't gcc, it doesn't
- case "$ac_cv_c_inline" in
- yes)
- ac_cv_c___inline__=inline
- ;;
- inline|__inline__)
- ac_cv_c___inline__=''
- ;;
- *)
- ac_cv_c___inline__="$ac_cv_c_inline"
- ;;
- esac
- fi
- if test x"$ac_cv_c___inline__" != x; then
- AC_DEFINE_UNQUOTED([__inline__],[$ac_cv_c___inline__],[Define if the compiler doesn't recognise __inline__])
- fi
-])
-
-dnl
-dnl Check for minimum version of libtool
-dnl AC_PREREQ_LIBTOOL([MINIMUM VERSION],[ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]])
-AC_DEFUN([AC_PREREQ_LIBTOOL],
- [
- lt_min_full=ifelse([$1], ,1.3.5,$1)
- lt_min=`echo $lt_min_full | sed -e 's/\.//g'`
- AC_MSG_CHECKING(for libtool >= $lt_min_full)
- lt_version="`grep '^VERSION' $srcdir/ltmain.sh | sed -e 's/VERSION\=//g;s/[[-.a-zA-Z]]//g'`"
-
- if test $lt_version -lt 100 ; then
- lt_version=`expr $lt_version \* 10`
- fi
-
- if test $lt_version -lt $lt_min ; then
- AC_MSG_RESULT(no)
- ifelse([$3], , :, [$3])
- fi
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- ])
-
-dnl
-AC_DEFUN([AC_CHECK_LIRC],
- [AC_ARG_ENABLE(lirc,
- AS_HELP_STRING([--disable-lirc], [turn off LIRC support]),
- enable_lirc=$enableval, enable_lirc=yes)
-
- if test x"$enable_lirc" = xyes; then
- have_lirc=yes
- AC_REQUIRE_CPP
- AC_CHECK_LIB(lirc_client,lirc_init,
- AC_CHECK_HEADER(lirc/lirc_client.h, true, have_lirc=no), have_lirc=no)
- if test "$have_lirc" = "yes"; then
-
- if test x"$LIRC_PREFIX" != "x"; then
- lirc_libprefix="$LIRC_PREFIX/lib"
- LIRC_INCLUDE="-I$LIRC_PREFIX/include"
- fi
- for llirc in $lirc_libprefix /lib /usr/lib /usr/local/lib; do
- AC_CHECK_FILE("$llirc/liblirc_client.a",
- LIRC_LIBS="$llirc/liblirc_client.a"
- AC_DEFINE(HAVE_LIRC),,)
- done
- else
- AC_MSG_RESULT([*** LIRC client support not available, LIRC support will be disabled ***]);
- fi
- fi
-
- AC_SUBST(LIRC_LIBS)
- AC_SUBST(LIRC_INCLUDE)
-])
-
-
-dnl AC_LINUX_PATH(DEFAULT PATH)
-AC_DEFUN([AC_LINUX_PATH],
- [AC_ARG_WITH(linux-path,
- AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located]),
- linux_path="$withval", linux_path="$1")
- LINUX_INCLUDE="-I$linux_path/include"
-])
-
-dnl AC_CHECK_DXR3()
-AC_DEFUN([AC_CHECK_DXR3],
-[
- AC_ARG_ENABLE(dxr3,
- AS_HELP_STRING([--disable-dxr3], [do not build the DXR3/HW+ plugins]),
- enable_dxr3=$enableval, enable_dxr3=yes)
- if test x"$enable_dxr3" = xyes; then
- have_dxr3=yes
- AC_MSG_RESULT([*** checking for a supported mpeg encoder])
- have_encoder=no
- have_libfame=yes
- AC_CHECK_LIB(fame, fame_open,
- [AC_CHECK_HEADER(fame.h, true, have_libfame=no)], have_libfame=no)
- if test "$have_libfame" = "yes"; then
- AC_DEFINE(HAVE_LIBFAME)
- have_encoder=yes
- fi
- have_librte=yes
- AC_CHECK_LIB(rte, rte_init,
- [AC_CHECK_HEADER(rte.h, true, have_librte=no)], have_librte=no)
- if test "$have_librte" = "yes"; then
- AC_DEFINE(HAVE_LIBRTE)
- AC_MSG_WARN([this will probably only work with rte version 0.4!])
- have_encoder=yes
- fi
- if test "$have_encoder" = "yes"; then
- AC_MSG_RESULT([*** found one or more external mpeg encoders]);
- else
- AC_MSG_RESULT([*** no external mpeg encoder found]);
- fi
- else
- AC_MSG_RESULT([DXR3 plugins will not be built.])
- have_dxr3=no
- fi
-])
-
-dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
-dnl check if $CC supports a given set of cflags
-AC_DEFUN([AC_TRY_CFLAGS],
- [AC_MSG_CHECKING([if $CC supports $1 flags])
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$1"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
- CFLAGS="$SAVE_CFLAGS"
- AC_MSG_RESULT([$ac_cv_try_cflags_ok])
- if test x"$ac_cv_try_cflags_ok" = x"yes"; then
- ifelse([$2],[],[:],[$2])
- else
- ifelse([$3],[],[:],[$3])
- fi])
-
-dnl AC_TRY_LDFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
-dnl check if $CC supports a given set of ldflags
-AC_DEFUN([AC_TRY_LDFLAGS],
- [AC_MSG_CHECKING([if $CC supports $1 flags])
- SAVE_LDFLAGS="$LDFLAGS"
- LDFLAGS="$1"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no])
- LDFLAGS="$SAVE_LDFLAGS"
- AC_MSG_RESULT([$ac_cv_try_ldflags_ok])
- if test x"$ac_cv_try_ldflags_ok" = x"yes"; then
- ifelse([$2],[],[:],[$2])
- else
- ifelse([$3],[],[:],[$3])
- fi])
-
-dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
-dnl generate a default inttypes.h if the header file does not exist already
-AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
- [AC_CHECK_HEADER([inttypes.h],,
- [if test ! -d $1; then mkdir $1; fi
- AC_CHECK_HEADER([stdint.h],
- [cat >$1/inttypes.h << EOF
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-/* helper inttypes.h for people who do not have it on their system */
-
-#include <stdint.h>
-EOF
- ],
- [AC_COMPILE_CHECK_SIZEOF([char],[1])
- AC_COMPILE_CHECK_SIZEOF([short],[2])
- AC_COMPILE_CHECK_SIZEOF([int],[4])
- AC_COMPILE_CHECK_SIZEOF([long long],[8])
- cat >$1/inttypes.h << EOF
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-/* default inttypes.h for people who do not have it on their system */
-#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
-#define __int8_t_defined
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-#ifdef ARCH_X86
-typedef signed long long int64_t;
-#endif
-#endif
-#if (!defined __uint8_t_defined) && (!defined _LINUX_TYPES_H)
-#define __uint8_t_defined
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-#ifdef ARCH_X86
-typedef unsigned long long uint64_t;
-#endif
-#endif
-EOF
- ])
- cat >>$1/inttypes.h << EOF
-
-#ifdef WIN32
-# define PRI64_PREFIX "I64"
-#else
-# define PRI64_PREFIX "l"
-#endif
-
-#ifndef PRId8
-# define PRId8 "d"
-#endif
-#ifndef PRId16
-# define PRId16 "d"
-#endif
-#ifndef PRId32
-# define PRId32 "d"
-#endif
-#ifndef PRId64
-# define PRId64 PRI64_PREFIX "d"
-#endif
-
-#ifndef PRIu8
-# define PRIu8 "u"
-#endif
-#ifndef PRIu16
-# define PRIu16 "u"
-#endif
-#ifndef PRIu32
-# define PRIu32 "u"
-#endif
-#ifndef PRIu64
-# define PRIu64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIx8
-# define PRIx8 "x"
-#endif
-#ifndef PRIx16
-# define PRIx16 "x"
-#endif
-#ifndef PRIx32
-# define PRIx32 "x"
-#endif
-#ifndef PRIx64
-# define PRIx64 PRI64_PREFIX "x"
-#endif
-
-#ifndef PRIX8
-# define PRIX8 "X"
-#endif
-#ifndef PRIX16
-# define PRIX16 "X"
-#endif
-#ifndef PRIX32
-# define PRIX32 "X"
-#endif
-#ifndef PRIX64
-# define PRIX64 PRI64_PREFIX "X"
-#endif
-
-#ifndef PRIdFAST8
-# define PRIdFAST8 "d"
-#endif
-#ifndef PRIdFAST16
-# define PRIdFAST16 "d"
-#endif
-#ifndef PRIdFAST32
-# define PRIdFAST32 "d"
-#endif
-#ifndef PRIdFAST64
-# define PRIdFAST64 "d"
-#endif
-
-#ifndef PRIuFAST8
-# define PRIuFAST8 "u"
-#endif
-#ifndef PRIuFAST16
-# define PRIuFAST16 "u"
-#endif
-#ifndef PRIuFAST32
-# define PRIuFAST32 "u"
-#endif
-#ifndef PRIuFAST64
-# define PRIuFAST64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIxFAST8
-# define PRIxFAST8 "x"
-#endif
-#ifndef PRIxFAST16
-# define PRIxFAST16 "x"
-#endif
-#ifndef PRIxFAST32
-# define PRIxFAST32 "x"
-#endif
-#ifndef PRIxFAST64
-# define PRIxFAST64 PRI64_PREFIX "x"
-#endif
-
-#ifndef SCNd8
-# define SCNd8 "hhd"
-#endif
-#ifndef SCNd16
-# define SCNd16 "hd"
-#endif
-#ifndef SCNd32
-# define SCNd32 "d"
-#endif
-#ifndef SCNd64
-# define SCNd64 PRI64_PREFIX "d"
-#endif
-
-#ifndef SCNu8
-# define SCNu8 "hhu"
-#endif
-#ifndef SCNu16
-# define SCNu16 "hu"
-#endif
-#ifndef SCNu32
-# define SCNu32 "u"
-#endif
-#ifndef SCNu64
-# define SCNu64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIdMAX
-# define PRIdMAX PRId64
-#endif
-#ifndef PRIuMAX
-# define PRIuMAX PRIu64
-#endif
-#ifndef PRIxMAX
-# define PRIxMAX PRIx64
-#endif
-#ifndef SCNdMAX
-# define SCNdMAX SCNd64
-#endif
-
-#endif
-EOF
- ])]
-)
-
-
-dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
-dnl abort if the given type does not have the supposed size
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
- [AC_MSG_CHECKING(that size of $1 is $2)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],[],
- [AC_MSG_ERROR([can not build a default inttypes.h])])
- AC_MSG_RESULT([yes])])
-
-
-dnl AM_CHECK_CDROM_IOCTLS ([ACTION-IF-YES], [ACTION-IF-NO])
-dnl check for CDROM_DRIVE_STATUS in ioctl.h
-AC_DEFUN([AM_CHECK_CDROM_IOCTLS],
- [AC_CACHE_CHECK([if cdrom ioctls are available],
- [am_cv_have_cdrom_ioctls],
- [AC_EGREP_HEADER([CDROM_DRIVE_STATUS],[sys/ioctl.h],
- am_cv_have_cdrom_ioctls=yes,
- [AC_EGREP_HEADER([CDIOCALLOW],[sys/ioctl.h],
- am_cv_have_cdrom_ioctls=yes,
- [AC_EGREP_CPP(we_have_cdrom_ioctls,[
-#include <sys/ioctl.h>
-#ifdef HAVE_SYS_CDIO_H
-# include <sys/cdio.h>
-#endif
-#ifdef HAVE_LINUX_CDROM_H
-# include <linux/cdrom.h>
-#endif
-#if defined(CDROM_DRIVE_STATUS) || defined(CDIOCALLOW) || defined(CDROMCDXA)
- we_have_cdrom_ioctls
-#endif
-],
- am_cv_have_cdrom_ioctls=yes,
- am_cv_have_cdrom_ioctls=no
- )])])])
- have_cdrom_ioctls=$am_cv_have_cdrom_ioctls
- if test "x$have_cdrom_ioctls" = xyes ; then
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
-])
-
-
-dnl AC_CHECK_IP_MREQN
-dnl check for struct ip_mreqn in netinet/in.h
-AC_DEFUN([AC_CHECK_IP_MREQN],
- [AC_CACHE_CHECK([for ip_mreqn], [ac_cv_have_ip_mreqn],
- [AC_EGREP_HEADER([ip_mreqn],
- [netinet/in.h],
- [ac_cv_have_ip_mreqn=yes],
- [ac_cv_have_ip_mreqn=no])])
- if test $ac_cv_have_ip_mreqn = yes; then
- AC_DEFINE([HAVE_IP_MREQN],1,[Define this if you have ip_mreqn in netinet/in.h])
- fi
-])
-
-
-dnl AC_PROG_GMSGFMT_PLURAL
-dnl ----------------------
-dnl Validate the GMSGFMT program found by gettext.m4; reject old versions
-dnl of GNU msgfmt that do not support the "msgid_plural" extension.
-AC_DEFUN([AC_PROG_GMSGFMT_PLURAL],
- [dnl AC_REQUIRE(AM_GNU_GETTEXT)
-
- if test "$GMSGFMT" != ":"; then
- AC_MSG_CHECKING([for plural forms in GNU msgfmt])
-
- changequote(,)dnl We use [ and ] in in .po test input
-
- dnl If the GNU msgfmt does not accept msgid_plural we define it
- dnl as : so that the Makefiles still can work.
- cat >conftest.po <<_ACEOF
-msgid "channel"
-msgid_plural "channels"
-msgstr[0] "canal"
-msgstr[1] "canal"
-
-_ACEOF
- changequote([,])dnl
-
- if $GMSGFMT -o /dev/null conftest.po >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_RESULT(
- [found GNU msgfmt program is too old, it does not support plural forms; ignore it])
- GMSGFMT=":"
- fi
- rm -f conftest.po
- fi
-])dnl AC_PROG_GMSGFMT_PLURAL
-
-
-# AC_PROG_LIBTOOL_SANITYCHECK
-# ----------------------
-# Default configuration of libtool on solaris produces non-working
-# plugin modules, when gcc is used as compiler, and gcc does not
-# use gnu-ld
-AC_DEFUN([AC_PROG_LIBTOOL_SANITYCHECK],
- [dnl AC_REQUIRE(AC_PROG_CC)
- dnl AC_REQUIRE(AC_PROG_LD)
- dnl AC_REQUIRE(AC_PROG_LIBTOOL)
-
- case $host in
- *-*-solaris*)
- if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
- AC_MSG_CHECKING([if libtool can build working modules])
- cat > conftest1.c <<_ACEOF
-#undef NDEBUG
-#include <assert.h>
-int shlib_func(long long a, long long b) {
- assert(b);
- switch (a&3) {
- case 0: return a/b;
- case 1: return a%b;
- case 2: return (unsigned long long)a/b;
- case 3: return (unsigned long long)a%b;
- }
-}
-_ACEOF
-
- cat > conftest2.c <<_ACEOF
-#include <dlfcn.h>
-int main(){
- void *dl = dlopen(".libs/libconftest.so", RTLD_NOW);
- if (!dl) printf("%s\n", dlerror());
- exit(dl ? 0 : 1);
-}
-_ACEOF
-
- if ./libtool $CC -c conftest1.c >/dev/null 2>&1 && \
- ./libtool $CC -o libconftest.la conftest1.lo \
- -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
- ./libtool $CC -o conftest2 conftest2.c -ldl >/dev/null 2>&1
- then
- if ./conftest2 >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
- else
- dnl typical problem: dlopen'ed module not self contained, because
- dnl it wasn't linked with -lgcc
- AC_MSG_RESULT(no)
- if grep '^archive_cmds=.*$LD -G' libtool >/dev/null; then
- AC_MSG_CHECKING([if libtool can be fixed])
-
- dnl first try to update gcc2's spec file to add the
- dnl gcc3 -mimpure-text flag
-
- libtool_specs=""
-
- if $CC -dumpspecs | grep -- '-G -dy -z text' >/dev/null; then
- $CC -dumpspecs | \
- sed 's/-G -dy -z text/-G -dy %{!mimpure-text:-z text}/g' \
- > gcc-libtool-specs
- libtool_specs=" -specs=`pwd`/gcc-libtool-specs"
- fi
-
- sed -e "s,\$LD -G,\$CC${libtool_specs} -shared -mimpure-text,g" \
- -e 's/ -M / -Wl,-M,/' libtool >libtool-fixed
- chmod +x libtool-fixed
- if ./libtool-fixed $CC -o libconftest.la conftest1.lo \
- -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
- ./conftest2 >/dev/null 2>&1; then
-
- dnl the fixed libtool works
- AC_MSG_RESULT(yes)
- mv -f libtool-fixed libtool
-
- else
- AC_MSG_RESULT(no)
- fi
- fi
- fi
- else
- AC_MSG_RESULT(no)
- fi
- rm -f conftest1.c conftest1.lo conftest1.o conftest2.c \
- libconftest.la conftest libtool-fixed
- rm -rf .libs
- fi ;;
- esac
-])# AC_PROG_LIBTOOL_SANITYCHECK
-
-dnl Check for the type of the third argument of getsockname
-AC_DEFUN([AC_CHECK_SOCKLEN_T], [
- AC_MSG_CHECKING(for socklen_t)
- AC_LANG_PUSH(C++)
-
- AC_CACHE_VAL(ac_cv_socklen_t, [
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <sys/socket.h>
- ]], [[socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
- ]])],[ac_cv_socklen_t=socklen_t],[ac_cv_socklen_t=''])
- if test "x$ac_cv_socklen_t" = x; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <sys/socket.h>]], [[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);]])],
- [ac_cv_socklen_t=int],[ac_cv_socklen_t=size_t])
- fi
- ])
- AC_LANG_POP([C++])
-
- AC_MSG_RESULT($ac_cv_socklen_t)
- if test "$ac_cv_socklen_t" != "socklen_t"; then
- AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
- [Define the real type of socklen_t])
- fi
-])
diff --git a/m4/aa.m4 b/m4/aa.m4
deleted file mode 100644
index bab0d9d28..000000000
--- a/m4/aa.m4
+++ /dev/null
@@ -1,272 +0,0 @@
-dnl Configure path and dependencies for aalib.
-dnl
-dnl Copyright (C) 2001 Daniel Caujolle-Bert <segfault@club-internet.fr>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-dnl
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-dnl
-dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND ]]])
-dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS, AALIB_STATIC_LIBS.
-dnl
-dnl ***********************
-dnl 26/09/2001
-dnl * fixed --disable-aalibtest.
-dnl 17/09/2001
-dnl * use both aalib-config, and *last chance* aainfo for guessing.
-dnl 19/08/2001
-dnl * use aalib-config instead of aainfo now.
-dnl 17/06/2001
-dnl * First shot
-dnl
-
-dnl Internal bits, used by AM_PATH_AALIB.
-dnl Requires AALIB_CFLAGS and AALIB_FLAGS to be defined
-AC_DEFUN([_AALIB_CHECK_VERSION], [
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$AALIB_CFLAGS $CFLAGS"
- LIBS="$AALIB_LIBS $LIBS"
-
-dnl Now check if the installed AALIB is sufficiently new. (Also sanity
-dnl checks the results of aalib-config to some extent.)
-
- rm -f conf.aalibtest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <aalib.h>
-
-int main () {
- int major, minor;
- char *tmp_version;
-
- system ("touch conf.aalibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_aalib_version");
- if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
- printf("%s, bad version string\n", "$min_aalib_version");
- exit(1);
- }
-
- if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) &&
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR >= minor)
-#else
- (AA_LIB_MINOR >= minor)
-#endif
- )) {
- return 0;
- }
- else {
-#ifdef AA_LIB_MINNOR
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR);
-#else
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR);
-#endif
- printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor);
- printf("*** AALIB is always available from:\n");
- printf("*** http://www.ta.jcu.cz://aa\n");
- printf("***\n");
- }
- return 1;
-}
-]])],[],[no_aalib=yes],[no_aalib=cc])
- if test "x$no_aalib" = xcc; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <aalib.h>
-]], [[ return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ]])],[no_aalib=''],[no_aalib=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
-])
-
-
-AC_DEFUN([AM_PATH_AALIB],
-[dnl
-dnl
-AC_ARG_WITH(aalib-prefix,
- AS_HELP_STRING([--with-aalib-prefix=DIR], [prefix where AALIB is installed (optional)]),
- aalib_config_prefix="$withval", aalib_config_prefix="")
-AC_ARG_WITH(aalib-exec-prefix,
- AS_HELP_STRING([--with-aalib-exec-prefix=DIR], [exec prefix where AALIB is installed (optional)]),
- aalib_config_exec_prefix="$withval", aalib_config_exec_prefix="")
-AC_ARG_ENABLE(aalibtest,
- AS_HELP_STRING([--disable-aalibtest], [do not try to compile and run a test AALIB program]),
- enable_aalibtest=$enableval, enable_aalibtest=yes)
-
- AC_LANG_PUSH([C])
-
- if test x$aalib_config_exec_prefix != x ; then
- aalib_config_args="$aalib_config_args --exec-prefix=$aalib_config_exec_prefix"
- if test x${AALIB_CONFIG+set} != xset ; then
- AALIB_CONFIG=$aalib_config_exec_prefix/bin/aalib-config
- fi
- fi
- if test x$aalib_config_prefix != x ; then
- aalib_config_args="$aalib_config_args --prefix=$aalib_config_prefix"
- if test x${AALIB_CONFIG+set} != xset ; then
- AALIB_CONFIG=$aalib_config_prefix/bin/aalib-config
- fi
- fi
-
- min_aalib_version=ifelse([$1], ,1.4,$1)
-
- if test x"$enable_aalibtest" != "xyes"; then
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- else
- if test ! -x "$AALIB_CONFIG"; then
- AALIB_CONFIG=""
- fi
- AC_PATH_TOOL(AALIB_CONFIG, aalib-config, no)
-
- if test "$AALIB_CONFIG" = "no" ; then
-
-dnl aalib-config is missing, check for old aainfo
-
- AALIB_LIBS="$AALIB_LIBS -laa"
- if test x$aalib_config_exec_prefix != x ; then
- AALIB_CFLAGS="-I$aalib_config_exec_prefix/include"
- AALIB_LIBS="-L$aalib_config_exec_prefix/lib -laa"
- if test x${AAINFO+set} != xset ; then
- AAINFO=$aalib_config_exec_prefix/bin/aainfo
- fi
- fi
-
- if test x$aalib_config_prefix != x ; then
- AALIB_CFLAGS="-I$aalib_config_prefix/include"
- AALIB_LIBS="-L$aalib_config_prefix/lib -laa"
- if test x${AAINFO+set} != xset ; then
- AAINFO=$aalib_config_prefix/bin/aainfo
- fi
- fi
-
- if test x"$aalib_config_prefix" = "x"; then
- AC_PATH_TOOL(AAINFO, aainfo, no)
- else
- AC_MSG_CHECKING(for $AAINFO)
- if test -x $AAINFO; then
- AC_MSG_RESULT(yes)
- else
- AAINFO="no"
- AC_MSG_RESULT(no)
- fi
- fi
-
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- no_aalib=""
-
- if test x"$AAINFO" = "xno"; then
- no_aalib=yes
- else
- aalib_drivers="`$AAINFO --help | grep drivers | sed -e 's/available//g;s/drivers//g;s/\://g'`"
- for drv in $aalib_drivers; do
- if test $drv = "X11" -a x$x11dep = "x"; then
- AALIB_CFLAGS="$AALIB_CFLAGS `echo $X_CFLAGS|sed -e 's/\-I/\-L/g;s/include/lib/g'`"
- x11dep="yes"
- fi
-dnl if test $drv = "slang" -a x$slangdep = "x"; then
-dnl slangdep="yes"
-dnl fi
-dnl if test $drv = "gpm" -a x$gmpdep = "x"; then
-dnl gpmdep="yes"
-dnl fi
- done
-
- _AALIB_CHECK_VERSION
- fi
-
- else dnl AALIB_CONFIG
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- no_aalib=""
- AALIB_CFLAGS="`$AALIB_CONFIG $aalib_config_args --cflags`"
- AALIB_LIBS="`$AALIB_CONFIG $aalib_config_args --libs`"
- aalib_config_major_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- aalib_config_minor_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- aalib_config_sub_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- _AALIB_CHECK_VERSION
- fi dnl AALIB_CONFIG
- fi dnl enable_aalibtest
-
- if test "x$no_aalib" = x; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$AALIB_CONFIG" = "no"; then
- echo "*** The [aalib-config|aainfo] program installed by AALIB could not be found"
- echo "*** If AALIB was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or use --with-aalib-prefix to set the prefix"
- echo "*** where AALIB is installed."
- else
- if test -f conf.aalibtest ; then
- :
- else
- echo "*** Could not run AALIB test program, checking why..."
- CFLAGS="$CFLAGS $AALIB_CFLAGS"
- LIBS="$LIBS $AALIB_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <aalib.h>
-]], [[
- return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding AALIB or finding the wrong"
- echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means AALIB was incorrectly installed"
- echo "*** or that you have moved AALIB since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- AALIB_CFLAGS=""
- AALIB_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(AALIB_CFLAGS)
- AC_SUBST(AALIB_LIBS)
- AC_LANG_POP([C])
- rm -f conf.aalibtest
-])
diff --git a/m4/arts.m4 b/m4/arts.m4
deleted file mode 100644
index 079c21ba8..000000000
--- a/m4/arts.m4
+++ /dev/null
@@ -1,168 +0,0 @@
-# Configure paths for ARTS
-# Philip Stadermann 2001-06-21
-# stolen from esd.m4
-
-dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for ARTS, and define ARTS_CFLAGS and ARTS_LIBS
-dnl
-AC_DEFUN([AM_PATH_ARTS],
-[dnl
-dnl Get the cflags and libraries from the artsc-config script
-dnl
-AC_ARG_WITH(arts-prefix, AS_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)]),
- arts_prefix="$withval", arts_prefix="")
-AC_ARG_ENABLE(artstest, AS_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program]),
- enable_artstest=$enableval, enable_artstest=yes)
-
- if test x$arts_prefix != x ; then
- arts_args="$arts_args --arts-prefix=$arts_prefix"
- if test x${ARTS_CONFIG+set} != xset ; then
- ARTS_CONFIG=$arts_prefix/bin/artsc-config
- fi
- fi
-
- AC_PATH_TOOL(ARTS_CONFIG, artsc-config, no)
-
- min_arts_version=ifelse([$1], ,0.9.5,$1)
- AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version)
- no_arts=""
- if test "$ARTS_CONFIG" = "no" ; then
- no_arts=yes
- else
- ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags`
- ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs`
-
- arts_major_version=`$ARTS_CONFIG $arts_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- arts_minor_version=`$ARTS_CONFIG $arts_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_artstest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $ARTS_CFLAGS"
- LIBS="$LIBS $ARTS_LIBS"
-dnl
-dnl Check if the installed ARTS is actually available -- when cross-compiling,
-dnl we have probably detected the build system's version of artsc-config
-dnl
- AC_CHECK_LIB([artsc], [arts_init], [], [no_arts=yes], [$ARTS_LIBS])
-
-dnl
-dnl Now check if the installed ARTS is sufficiently new. (Also sanity
-dnl checks the results of artsc-config to some extent)
-dnl
- rm -f conf.artstest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <artsc.h>
-
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = malloc ((strlen (str) + 1) * sizeof(char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
-int main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.artstest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup("$min_arts_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_arts_version");
- exit(1);
- }
-
- if (($arts_major_version > major) ||
- (($arts_major_version == major) && ($arts_minor_version > minor)) ||
- (($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);
- printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);
- printf("*** best to upgrade to the required version.\n");
- printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");
- printf("*** to point to the correct copy of artsc-config, and remove the file\n");
- printf("*** config.cache before re-running configure\n");
- return 1;
- }
-}
-
-]])],[],[no_arts=yes],[no_arts=cc])
-
- if test "x$no_arts" = "xcc"; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <artsc.h>
-]], [[ return 0; ]])],[no_arts=''],[no_arts=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_arts" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$ARTS_CONFIG" = "no" ; then
- echo "*** The artsc-config script installed by ARTS could not be found"
- echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the ARTS_CONFIG environment variable to the"
- echo "*** full path to artsc-config."
- else
- if test -f conf.artstest ; then
- :
- else
- echo "*** Could not run ARTS test program, checking why..."
- CFLAGS="$CFLAGS $ARTS_CFLAGS"
- LIBS="$LIBS $ARTS_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <artsc.h>
-]], [[ return 0; ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding ARTS or finding the wrong"
- echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
- echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
- echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- ARTS_CFLAGS=""
- ARTS_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(ARTS_CFLAGS)
- AC_SUBST(ARTS_LIBS)
- rm -f conf.artstest
-])
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index 23b5f2ee4..1f4750a71 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -50,6 +50,24 @@ AC_DEFUN([CC_CHECK_CFLAGS], [
fi
])
+AC_DEFUN([CC_CHECK_LDFLAGS], [
+ AC_CACHE_CHECK([if $CC supports $1 flag],
+ AS_TR_SH([cc_cv_ldflags_$1]),
+ [ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $1"
+ AC_LINK_IFELSE([int a;],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
+ LDFLAGS="$ac_save_LDFLAGS"
+ ])
+
+ if eval test [x$]AS_TR_SH([cc_cv_ldflags_$1]) = xyes; then
+ ifelse([$2], , [:], [$2])
+ else
+ ifelse([$3], , [:], [$3])
+ fi
+])
+
dnl Check for a -Werror flag or equivalent. -Werror is the GCC
dnl and ICC flag that tells the compiler to treat all the warnings
dnl as fatal. We usually need this option to make sure that some
@@ -362,3 +380,50 @@ AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
ifelse([$2], , [:], [$2])
fi
])
+
+
+dnl AC_C_ALWAYS_INLINE
+dnl Define inline to something appropriate, including the new always_inline
+dnl attribute from gcc 3.1
+dnl Thanks to Michel LESPINASSE <walken@zoy.org>
+dnl __inline__ "check" added by Darren Salt
+AC_DEFUN([AC_C_ALWAYS_INLINE], [
+ AC_C_INLINE
+ if test x"$GCC" = x"yes" -a x"$ac_cv_c_inline" = x"inline"; then
+ AC_MSG_CHECKING([for always_inline])
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wall -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ ((__always_inline__)) void f (void);]])],
+ [ac_cv_always_inline=yes],[ac_cv_always_inline=no])
+ CFLAGS="$SAVE_CFLAGS"
+ AC_MSG_RESULT([$ac_cv_always_inline])
+ if test x"$ac_cv_always_inline" = x"yes"; then
+ AH_TOP([
+#ifdef inline
+/* the strange formatting below is needed to prevent config.status from rewriting it */
+# undef \
+ inline
+#endif
+ ])
+ AC_DEFINE_UNQUOTED([inline],[inline __attribute__ ((__always_inline__))])
+ fi
+ ac_cv_c___inline__=''
+ else
+ # FIXME: test the compiler to see if it supports __inline__
+ # instead of assuming that if it isn't gcc, it doesn't
+ case "$ac_cv_c_inline" in
+ yes)
+ ac_cv_c___inline__=inline
+ ;;
+ inline|__inline__)
+ ac_cv_c___inline__=''
+ ;;
+ *)
+ ac_cv_c___inline__="$ac_cv_c_inline"
+ ;;
+ esac
+ fi
+ if test x"$ac_cv_c___inline__" != x; then
+ AC_DEFINE_UNQUOTED([__inline__],[$ac_cv_c___inline__],[Define if the compiler doesn't recognise __inline__])
+ fi
+])
diff --git a/m4/audio_out.m4 b/m4/audio_out.m4
new file mode 100644
index 000000000..cdfe8b65d
--- /dev/null
+++ b/m4/audio_out.m4
@@ -0,0 +1,239 @@
+dnl -----------------
+dnl Audio out plugins
+dnl -----------------
+AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, alsa is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - Alsa is Linux only
+ dnl - aRts is Linux only
+ dnl - CoreAudio is Mac OS X only
+ dnl - EsounD is reported to be available on most platforms
+ dnl - FusionSound is Linux only, but don't enable it by default
+ dnl - Jack is Linux and Mac OS X primarily
+ dnl - OSS is most unix variants
+ dnl - PulseAudio has been tested on Linux, Solaris, FreeBSD, Windows
+ dnl - SunAudio is NetBSD, OpenBSD, Solaris (anything else?)
+
+ default_enable_coreaudio=disable
+ default_enable_irixal=disable
+ default_enable_oss=enable
+ default_enable_sunaudio=disable
+
+ default_with_alsa=without
+ default_with_arts=without
+ default_with_esound=with
+ default_with_fusionsound=without
+ default_with_jack=without
+ default_with_pulseaudio=without
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_oss=disable
+ default_with_pulseaudio=with
+ ;;
+ darwin*)
+ default_enable_coreaudio=enable
+ default_with_jack=with
+ default_enable_oss=disable
+ ;;
+ freebsd*)
+ default_with_pulseaudio=with
+ ;;
+ irix*)
+ default_enable_irixal=enable
+ default_enable_oss=disable
+ ;;
+ linux*)
+ default_with_alsa=with
+ default_with_arts=with
+ default_with_jack=with
+ default_with_pulseaudio=with
+ ;;
+ netbsd*)
+ default_enable_sunaudio=enable
+ ;;
+ openbsd*)
+ default_enable_sunaudio=enable
+ ;;
+ solaris*)
+ default_with_pulseaudio=with
+ default_enable_sunaudio=enable
+ ;;
+ esac
+
+
+ dnl Alsa support
+ AC_ARG_WITH([alsa],
+ [AS_HELP_STRING([--with-alsa], [Build with ALSA audio output support])],
+ [test x"$withval" != x"no" && with_alsa="yes"],
+ [test $default_with_alsa = without && with_alsa="no"])
+ if test x"$with_alsa" != x"no"; then
+ PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no])
+ if test x"$with_alsa" = x"yes" && test x"$have_alsa" != x"yes"; then
+ AC_MSG_ERROR([ALSA support requested but not found.])
+ elif test x"$have_alsa" = x"yes"; then
+ dnl This is needed by src/input/input_v4l.c
+ AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"])
+
+
+ dnl aRts support
+ AC_ARG_WITH([arts],
+ [AS_HELP_STRING([--with-arts], [Build with aRts audio output support])],
+ [test x"$withval" != x"no" && with_arts="yes"],
+ [test $default_with_arts = without && with_arts="no"])
+ if test x"$with_arts" != x"no"; then
+ ACX_PACKAGE_CHECK([ARTS], [0.9.5], [artsc-config], [have_arts=yes], [have_arts=no])
+ if test x"$with_arts" = x"yes" && test x"$have_arts" != x"yes"; then
+ AC_MSG_ERROR([aRts support requested, but aRts not found])
+ elif test x"$have_arts" = x"yes"; then
+ AC_DEFINE([HAVE_ARTS], 1, [Define this if you have aRts (libartsc) installed])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_ARTS], [test x"$have_arts" = x"yes"])
+
+
+ dnl CoreAudio for Mac OS X
+ AC_ARG_ENABLE([coreaudio],
+ [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])],
+ [test x"$enableval" != x"no" && enable_coreaudio="yes"],
+ [test $default_enable_coreaudio = disable && enable_coreaudio="no"])
+ if test x"$enable_coreaudio" != x"no"; then
+ AC_MSG_CHECKING([for CoreAudio frameworks])
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreAudio -framework AudioUnit"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_coreaudio=yes], [have_coreaudio=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_coreaudio])
+ if test x"$enable_coreaudio" = x"yes" && test x"$have_coreaudio" != x"yes"; then
+ AC_MSG_ERROR([CoreAudio support requested, but CoreAudio not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" = x"yes"])
+
+
+ dnl EsounD support
+ AC_ARG_WITH([esound],
+ [AS_HELP_STRING([--with-esound], [Build with EsounD audio output support])],
+ [test x"$withval" != x"no" && with_esound="yes"],
+ [test $default_with_esound = without && with_esound="no"])
+ if test x"$with_esound" != x"no"; then
+ PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no])
+ if test x"$with_esound" = x"yes" && test x"$have_esound" != x"yes"; then
+ AC_MSG_ERROR([EsounD support requested, but EsounD not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"])
+
+
+ dnl FusionSound support
+ AC_ARG_WITH([fusionsound],
+ [AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio output support])],
+ [test x"$withval" != x"no" && with_fusionsound="yes"],
+ [test $default_with_fusionsound = without && with_fusionsound="no"])
+ if test x"$with_fusionsound" != x"no"; then
+ PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], [have_fusionsound=yes], [have_fusionsound=no])
+ if test x"$with_fusionsound" = x"yes" && test x"$have_fusionsound" != x"yes"; then
+ AC_MSG_ERROR([FusionSound support requested, but FusionSound not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$have_fusionsound" = x"yes"])
+
+
+ dnl IRIX style audio interface
+ AC_ARG_ENABLE([irixal],
+ [AS_HELP_STRING([--enable-irixal], [Enable support for IRIX libaudio])],
+ [test x"$enableval" != x"no" && enable_irixal="yes"],
+ [test $default_enable_irixal = disable && enable_irixal="no"])
+ if test x"$enable_irixal" != x"no"; then
+ AC_CACHE_CHECK([for IRIX libaudio support], [am_cv_have_irixal],
+ [AC_CHECK_HEADER([dmedia/audio.h],
+ [am_cv_have_irixal=yes], [am_cv_have_irixal=no])])
+ if test x"$am_cv_have_irixal" = x"yes"; then
+ AC_DEFINE([HAVE_IRIXAL], 1, [Define this if you have a usable IRIX al interface available])
+ IRIXAL_LIBS="-laudio"
+ IRIXAL_STATIC_LIB="/usr/lib/libaudio.a"
+ AC_SUBST(IRIXAL_LIBS)
+ AC_SUBST(IRIXAL_STATIC_LIB)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"])
+
+
+ dnl JACK support
+ AC_ARG_WITH([jack],
+ [AS_HELP_STRING([--with-jack], [Build with Jack support])],
+ [test x"$withval" != x"no" && with_jack="yes"],
+ [test $default_with_jack = without && with_jack="no"])
+ if test x"$with_jack" != x"no"; then
+ PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no])
+ if test x"$with_jack" = x"yes" && test x"$have_jack" != x"yes"; then
+ AC_MSG_ERROR([Jack support requested, but Jack not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_JACK], [test x"$have_jack" = x"yes"])
+
+
+ dnl OSS (Open Sound System)
+ AC_ARG_ENABLE([oss],
+ [AS_HELP_STRING([--enable-oss], [Enable OSS (Open Sound System) support])],
+ [test x"$enableval" != x"no" && enable_oss="yes"],
+ [test $default_enable_oss = disable && enable_oss="no"])
+ if test x"$enable_oss" != x"no"; then
+ AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break])
+ AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no],
+ [#ifdef HAVE_SYS_SOUNDCARD_H
+ # include <sys/soundcard.h>
+ #endif
+ #ifdef HAVE_MACHINE_SOUNDCARD_H
+ # include <sys/soundcard.h>
+ #endif
+ #ifdef HAVE_SOUNDCARD_H
+ # include <soundcard.h>
+ #endif])
+ if test x"$enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then
+ AC_MSG_ERROR([OSS support requested, but OSS not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_OSS], [test x"$have_oss" = x"yes"])
+
+
+ dnl PulseAudio
+ AC_ARG_WITH([pulseaudio],
+ [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio support])],
+ [test x"$withval" != x"no" && with_pulseaudio="yes"],
+ [test $default_with_pulseaudio = without && with_pulseaudio="no"])
+ if test x"$with_pulseaudio" != x"no"; then
+ PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"])
+ if test x"$with_pulseaudio" = x"yes" && test x"$have_pulseaudio" != x"yes"; then
+ AC_MSG_ERROR([PulseAudio support requested, but PulseAudio not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"])
+
+
+ dnl SUN style audio interface
+ AC_ARG_ENABLE([sunaudio],
+ [AS_HELP_STRING([--enable-sunaudio], [Enable Sun audio support])],
+ [test x"$enableval" != x"no" && enable_sunaudio="yes"],
+ [test $default_enable_sunaudio = disable && enable_sunaudio="no"])
+ if test x"$enable_sunaudio" != x"no"; then
+ AC_MSG_CHECKING([for Sun audio support])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/audioio.h>]],
+ [[audio_info_t audio_info; AUDIO_INITINFO(&audio_info)]])],
+ [have_sunaudio=yes], [have_sunaudio=no])
+ AC_MSG_RESULT([$have_sunaudio])
+ if test x"$enable_sunaudio" = x"yes" && test x"$have_sunaudio" != x"yes"; then
+ AC_MSG_ERROR([Sun audio support requested, but Sun audio not found])
+ elif test x"$have_sunaudio" = x"yes"; then
+ dnl NetBSD and OpenBSD don't have this, but check for it
+ dnl rather than assuming that it doesn't happen elsewhere.
+ AC_CHECK_MEMBERS([audio_info_t.output_muted])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"])
+])dnl XINE_AUDIO_OUT_PLUGINS
diff --git a/m4/decoders.m4 b/m4/decoders.m4
new file mode 100644
index 000000000..58d1c56e5
--- /dev/null
+++ b/m4/decoders.m4
@@ -0,0 +1,489 @@
+dnl ---------------------------
+dnl Decoder and Demuxer Plugins
+dnl ---------------------------
+AC_DEFUN([XINE_DECODER_PLUGINS], [
+ dnl a52dec (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([a52dec],
+ [AS_HELP_STRING([--enable-a52dec], [Enable support for a52dec decoding library (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_a52dec="yes"])
+ AC_ARG_WITH([external-a52dec],
+ [AS_HELP_STRING([--with-external-a52dec], [Use external a52dec library (not recommended)])],
+ [test x"$withval" != x"no" && with_external_a52dec="yes"], [with_external_a52dec="no"])
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$with_external_a52dec" != x"no"; then
+ AC_CHECK_LIB([a52], [a52_init],
+ [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], [have_external_a52dec=yes], [have_external_a52dec=no],
+ [#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_INTTYPES_H
+ # include <inttypes.h>
+ #endif
+ #ifdef HAVE_STDINT_H
+ # include <stdint.h>
+ #endif
+ #include <a52dec/a52.h>])], [have_external_a52dec=no], [-lm])
+ if test x"$have_external_a52dec" = x"no"; then
+ AC_MSG_RESULT([*** no usable version of a52dec found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included a52dec support])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_A52DEC], [test x"$enable_a52dec" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_A52DEC], [test x"$have_external_a52dec" = x"yes"])
+
+
+ dnl ASF (optional; enabled by default)
+ AC_ARG_ENABLE([asf],
+ [AS_HELP_STRING([--enable-asf], [Enable support for ASF demuxer (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_asf="yes"])
+ AM_CONDITIONAL([ENABLE_ASF], [test x"$enable_asf" != x"no"])
+
+
+ dnl FAAD (optional; enabled by default)
+ AC_ARG_ENABLE([faad],
+ [AS_HELP_STRING([--enable-faad], [Enable support for FAAD decoder (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_faad="yes"])
+ AM_CONDITIONAL([ENABLE_FAAD], [test x"$enable_faad" != x"no"])
+
+
+ dnl ffmpeg (required; external version allowed)
+ AC_ARG_WITH([external-ffmpeg],
+ [AS_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])],
+ [], [with_external_ffmpeg="no"])
+ AC_ARG_ENABLE([ffmpeg_uncommon_codecs],
+ [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs])],
+ [test x"$enableval" != x"no" && enable_ffmpeg_uncommon_codecs="yes"])
+ AC_ARG_ENABLE([ffmpeg_popular_codecs],
+ [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs])],
+ [test x"$enableval" != x"no" && enable_ffmpeg_popular_codecs="yes"])
+ case x"$with_external_ffmpeg" in
+ x"no") with_external_ffmpeg=no ;;
+ x"soft")
+ PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [with_external_ffmpeg=yes], [with_external_ffmpeg=no])
+ ;;
+ x*)
+ PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [with_external_ffmpeg=yes])
+ ;;
+ esac
+ if test x"$with_external_ffmpeg" != x"no"; then
+ PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
+ AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have ffmpeg library])
+
+ AC_MSG_NOTICE([
+*********************************************************************
+xine-lib is configured with external ffmpeg.
+
+This requires the same version of ffmpeg what is included in xine and
+you should know what you do. If some problems occur, please try to
+use internal ffmpeg.
+*********************************************************************])
+ else
+ AC_MSG_RESULT([Using included ffmpeg])
+ fi
+ AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"])
+ AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" != x"no"])
+
+
+ dnl gdk-pixbuf (optional; enabled by default)
+ AC_ARG_ENABLE([gdkpixbuf],
+ [AS_HELP_STRING([--enable-gdkpixbuf], [Enable GdkPixbuf support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_gdkpixbuf="yes"])
+ if test x"$enable_gdkpixbuf" != x"no"; then
+ PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [have_gdkpixbuf=yes], [have_gdkpixbuf=no])
+ if test x"$enable_gdkpixbuf" = x"yes" && test x"$have_gdkpixbuf" != x"yes"; then
+ AC_MSG_ERROR([GdkPixbuf support requested, but GdkPixbuf not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$have_gdkpixbuf" = x"yes"])
+
+
+ dnl ImageMagick (optional; enabled by default)
+ AC_ARG_WITH([imagemagick],
+ [AS_HELP_STRING([--with-imagemagick], [Enable ImageMagick image decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_imagemagick="yes"])
+ if test x"$with_imagemagick" != x"no"; then
+ PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [have_imagemagick=no])
+ if test x"$with_imagemagick" = x"yes" && test x"$have_imagemagick" = x"no"; then
+ AC_MSG_ERROR([ImageMagick support requested, but ImageMagick not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" = x"yes"])
+
+
+ dnl libdts (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([dts],
+ [AS_HELP_STRING([--enable-dts], [Enable support for DTS decoding library (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_dts="yes"])
+ AC_ARG_WITH([external-libdts],
+ [AS_HELP_STRING([--with-external-libdts], [Use external libdts/libdca library (not recommended)])],
+ [test x"$withval" != x"no" && with_external_libdts="yes"], [with_external_libdts="no"])
+ if test x"$enable_dts" != x"no"; then
+ if test x"$with_external_libdts" != x"no"; then
+ PKG_CHECK_MODULES([LIBDTS], [libdts], [have_external_dts=yes], [have_external_dts=no])
+ if test x"$have_external_dts" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included libdts support])
+ fi
+ if test x"$have_external_libdts" != x"yes"; then
+ LIBDTS_CFLAGS='-I$(top_srcdir)/contrib/libdca/include'
+ LIBDTS_DEPS='$(top_builddir)/contrib/libdca/libdca.la'
+ LIBDTS_LIBS='$(top_builddir)/contrib/libdca/libdca.la'
+ AC_SUBST(LIBDTS_DEPS)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_external_libdts" = x"yes"])
+
+
+ dnl libFLAC (optional; disabled by default)
+ AC_ARG_WITH([libflac],
+ [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer])],
+ [test x"$withval" != x"no" && with_libflac="yes"], [with_libflac="no"])
+ AC_ARG_WITH([libFLAC-prefix],
+ [AS_HELP_STRING([--with-libFLAC-prefix=DIR], [prefix where libFLAC is installed (optional)])])
+ AC_ARG_WITH([libFLAC-libraries],
+ [AS_HELP_STRING([--with-libFLAC-libraries=DIR], [directory where libFLAC library is installed (optional)])])
+ AC_ARG_WITH([libFLAC-includes],
+ [AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)])])
+ if test x"$with_libflac" != x"no"; then
+ AC_MSG_CHECKING([libdir name])
+ case "$host_or_hostalias" in
+ *-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ xine_cv_cc_64bit_output=no
+ if AC_TRY_EVAL(ac_compile); then
+ case `"$MAGIC_CMD" conftest.$ac_objext` in
+ *"ELF 64"*) xine_cv_cc_64bit_output=yes ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+ case "$host_cpu:$xine_cv_cc_64bit_output" in
+ powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+ XINE_LIBDIRNAME="lib64" ;;
+ *:*)
+ XINE_LIBDIRNAME="lib" ;;
+ esac
+ AC_MSG_RESULT([$XINE_LIBDIRNAME])
+
+ if test x"$with_libFLAC_includes" != x""; then
+ LIBFLAC_CFLAGS="-I$with_libFLAC_includes"
+ elif test x"$with_libFLAC_prefix" != x""; then
+ LIBFLAC_CFLAGS="-I$with_libFLAC_prefix/include"
+ elif test x"$prefix" != x"NONE"; then
+ LIBFLAC_CFLAGS="-I$prefix/include"
+ fi
+ AC_SUBST(LIBFLAC_CFLAGS)
+
+ if test x"$with_libFLAC_libraries" != x""; then
+ LIBFLAC_LIBS="-L$with_libFLAC_libraries"
+ elif test x"$with_libFLAC_prefix" != x""; then
+ LIBFLAC_LIBS="-L$with_libFLAC_prefix/$XINE_LIBDIRNAME"
+ elif test x"$prefix" != x"NONE"; then
+ LIBFLAC_LIBS="-L$prefix/$XINE_LIBDIRNAME"
+ fi
+ AC_SUBST(LIBFLAC_LIBS)
+
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LIBFLAC_CFLAGS"
+ AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new],
+ [AC_CHECK_HEADERS([FLAC/stream_decoder.h],
+ [have_libflac=yes LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm"],
+ [have_libflac=no])],
+ [have_libflac=no], [-lm])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ if test x"$with_libflac" = x"yes" && test x"$have_libflac" != x"yes"; then
+ AC_MSG_ERROR([libFLAC-based decoder support requested, but libFLAC not found])
+ elif test x"$have_libflac" != x"yes"; then
+ LIBFLAC_CFLAGS="" LIBFLAC_LIBS=""
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_LIBFLAC], [test x"$have_libflac" = x"yes"])
+
+
+ dnl libmad (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([mad],
+ [AS_HELP_STRING([--enable-mad], [Enable support for MAD decoding library (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_mad="yes"])
+ AC_ARG_WITH([external-libmad],
+ [AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)])],
+ [test x"$withval" != x"no" && with_external_libmad="yes"], [with_external_libmad="no"])
+ if test x"$enable_mad" != x"no"; then
+ if test x"$with_external_libmad" != x"no"; then
+ PKG_CHECK_MODULES([LIBMAD], [mad],
+ [AC_CHECK_HEADERS([mad.h], [have_external_libmad=yes], [have_external_libmad=no])],
+ [have_external_libmad=no])
+ if test x"$have_external_libmad" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included libmad support])
+ fi
+ if test x"$have_external_libmad" != x"no"; then
+ case "$host_or_hostalias" in
+ i?86-* | k?-* | athlon-* | pentium*-)
+ AC_DEFINE([FPM_INTEL], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ x86_64-*)
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ ppc-* | powerpc-*)
+ AC_DEFINE([FPM_PPC], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ sparc*-*)
+ if test "$GCC" = yes; then
+ AC_DEFINE([FPM_SPARC], 1, [Define to select libmad fixed point arithmetic implementation])
+ else
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ fi
+ ;;
+ mips-*)
+ AC_DEFINE([FPM_MIPS], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ alphaev56-* | alpha* | ia64-* | hppa*-linux-*)
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ arm*-*)
+ AC_DEFINE([FPM_ARM], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ universal-*)
+ ;;
+ *)
+ AC_DEFINE([FPM_DEFAULT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ esac
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_external_libmad" = x"yes"])
+
+
+ dnl libmodplug (optional; enabled by default)
+ AC_ARG_ENABLE([modplug],
+ [AS_HELP_STRING([--enable-modplug], [Enable MODPlug support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_modplug="yes"])
+ if test x"$enable_modplug" != x"no"; then
+ PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], [have_modplug=yes], [have_modplug=no])
+ if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then
+ AC_MSG_ERROR([MODPlug support requested, but MODPlug not found])
+ elif test x"$have_modplug" = x"yes"; then
+ AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"])
+
+
+ dnl libmpcdec (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([musepack],
+ [AS_HELP_STRING([--enable-musepack], [Enable support for Musepack decoding (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_musepack="yes"])
+ AC_ARG_WITH([external-libmpcdec],
+ [AS_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library])],
+ [test x"$withval" != x"no" && with_external_libmpcdec="yes"], [with_external_libmpcdec="no"])
+ if test x"$enable_musepack" != x"no"; then
+ if test x"$with_external_libmpcdec" != x"no"; then
+ AC_CHECK_LIB([mpcdec], [mpc_decoder_decode],
+ [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [have_external_libmpcdec=yes], [have_external_libmpcdec=no])],
+ [have_external_libmpcdec=no])
+ if test x"$have_external_libmpcdec" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libmpcdec found, using internal copy ***])
+ else
+ MPCDEC_CFLAGS=""
+ MPCDEC_DEPS=""
+ MPCDEC_LIBS="-lmpcdec"
+ fi
+ else
+ AC_MSG_RESULT([Using included libmpcdec (Musepack)])
+ fi
+ if test x"$have_external_libmpcdec" != x"yes"; then
+ MPCDEC_CFLAGS='-I$(top_srcdir)/contrib/libmpcdec'
+ MPCDEC_LIBS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
+ MPCDEC_DEPS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
+ fi
+ AC_SUBST(MPCDEC_CFLAGS)
+ AC_SUBST(MPCDEC_DEPS)
+ AC_SUBST(MPCDEC_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_external_libmpcdec" = x"yes"])
+
+
+ dnl mlib
+ AC_ARG_ENABLE([mlib],
+ [AS_HELP_STRING([--enable-mlib], [do not build Sun mediaLib support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_mlib="yes"])
+ AC_ARG_ENABLE([mlib-lazyload],
+ [AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])],
+ [test x"$enableval" != x"no" && enable_mlib_lazyload="yes"], [enable_mlib_lazyload="no"])
+ if test x"$enable_mlib" != x"no"; then
+ mlibhome="$MLIBHOME" test x"$mlibhome" = x"" && mlibhome="/opt/SUNWmlib"
+ AC_CHECK_LIB([mlib], [mlib_VideoAddBlock_U8_S16],
+ [saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$mlibhome/include"
+ AC_CHECK_HEADERS([mlib_video.h],
+ [if test x"$enable_mlib_lazyload" != x"no"; then
+ if test "$GCC" = yes; then
+ MLIB_LIBS="-L$mlibhome/lib -Wl,-z,lazyload,-lmlib,-z,nolazyload"
+ else
+ MLIB_LIBS="-L$mlibhome/lib -z lazyload -lmlib -z nolazyload"
+ fi
+ AC_DEFINE([MLIB_LAZYLOAD], 1, [Define this if you want to load mlib lazily])
+ else
+ MLIB_LIBS="-L$mlibhome/lib -lmlib"
+ fi
+ MLIB_CFLAGS="-I$mlibhome/include"
+ AC_SUBST(MLIB_LIBS)
+ AC_SUBST(MLIB_CFLAGS)
+ dnl TODO: src/video_out/yuv2rgb.c and src/xine-utils/cpu_accel.c should be changed to use LIBMPEG2_MLIB
+ dnl and HAVE_MLIB should go away.
+ AC_DEFINE([HAVE_MLIB], 1, [Define this if you have mlib installed])
+ AC_DEFINE([LIBMPEG2_MLIB], 1, [Define this if you have mlib installed])
+ have_mlib=yes])
+ CPPFLAGS="$saved_CPPFLAGS"], [], ["-L$mlibhome/lib"])
+ fi
+ AM_CONDITIONAL([HAVE_MLIB], [test x"$have_mlib" = x"yes"])
+
+
+ dnl mng (optional; enabled by default)
+ AC_ARG_ENABLE([mng],
+ [AS_HELP_STRING([--enable-mng], [Enable MNG decoder support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_mng="yes"])
+ if test x"$with_mng" != x"no"; then
+ AC_CHECK_LIB([mng], [mng_initialize],
+ [AC_CHECK_HEADERS([libmng.h], [have_mng=yes], [have_mng=no])], [have_mng=no])
+ if test x"$with_mng" = x"yes" && test x"$have_mng" != x"yes"; then
+ AC_MSG_ERROR([MNG support requested, but libmng not found])
+ elif test x"$have_mng" = x"yes"; then
+ MNG_LIBS="-lmng"
+ AC_SUBST(MNG_LIBS)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MNG], [test x"$have_mng" = x"yes"])
+
+
+ dnl Ogg/Speex (optional; enabled by default; external)
+ AC_ARG_WITH([speex],
+ [AS_HELP_STRING([--with-speex], [Enable Speex audio decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_speex="yes"])
+ if test x"$with_speex" != x"no"; then
+ PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no])
+ if test x"$with_speex" = x"yes" && test x"$have_speex" != x"yes"; then
+ AC_MSG_ERROR([Speex support requested, but libspeex not found])
+ elif test x"$have_speex" = x"yes"; then
+ AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SPEEX], [test x"$have_speex" = x"yes"])
+
+
+ dnl Ogg/Theora (optional; enabled by default; external)
+ AC_ARG_WITH([theora],
+ [AS_HELP_STRING([--with-theora], [Enable Theora video decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_theora="yes"])
+ if test x"$with_theora" != x"no"; then
+ PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], [have_theora=no])
+ if test x"$with_theora" = x"yes" && test x"$have_theora" = x"no"; then
+ AC_MSG_ERROR([Theora support requested, but libtheora not found])
+ elif test x"$have_theora" = x"yes"; then
+ AC_DEFINE([HAVE_THEORA], 1, [Define this if you have theora])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_THEORA], [test x"$have_theora" = x"yes"])
+
+
+ dnl Ogg/Vorbis (optional; enabled by default; external)
+ AC_ARG_WITH([vorbis],
+ [AS_HELP_STRING([--with-vorbis], [Enable Vorbis audio decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_vorbis="yes"])
+ if test x"$with_vorbis" != x"no"; then
+ PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], [have_vorbis=no])
+ if test x"$with_vorbis" = x"yes" && test x"$have_vorbis" = "xno"; then
+ AC_MSG_ERROR([Vorbis support requested, but libvorbis not found])
+ elif test x"$have_vorbis" = x"yes"; then
+ AC_DEFINE([HAVE_VORBIS], 1, [Define this if you have vorbis])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"])
+
+
+ dnl real (optional; enabled by default)
+ dnl On some systems, we cannot enable Real codecs support to begin with.
+ dnl This includes Darwin, because it uses Mach-O rather than ELF.
+ AC_ARG_ENABLE([real-codecs],
+ [AS_HELP_STRING([--enable-real-codecs], [Enable Real binary codecs support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_real_codecs="yes"])
+ AC_ARG_WITH([real-codecs-path],
+ [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])])
+ if test x"$enable_real_codecs" != x"no"; then
+ case "$host_os" in
+ darwin*) have_real_codecs=no ;;
+ *)
+ have_real_codecs=yes
+
+ dnl For those that have a replacement, break at the first one found
+ AC_CHECK_SYMBOLS([__environ _environ environ], [break], [need_weak_aliases=yes])
+ AC_CHECK_SYMBOLS([stderr __stderrp], [break], [need_weak_aliases=yes])
+
+ dnl For these there are no replacements
+ AC_CHECK_SYMBOLS([___brk_addr __ctype_b])
+
+ if test x"$need_weak_aliases" = x"yes"; then
+ CC_ATTRIBUTE_ALIAS([], [have_real_codecs=no])
+ fi
+ ;;
+ esac
+ if test x"$enable_real_codecs" = x"yes" && test x"$have_real_codecs" != x"yes"; then
+ AC_MSG_ERROR([Binary Real codec support requested, but it is not available])
+ elif test x"$have_real_codecs" = x"yes"; then
+ if test "${with_real_codecs_path+set}" = "set"; then
+ AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$with_real_codecs_path"], [Default path in which to find Real binary codecs])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_REAL], [test x"$have_real_codecs" = x"yes"])
+
+
+ dnl w32dll (optional; x86 only; enabled if using GNU as; GNU as required)
+ AC_ARG_ENABLE([w32dll],
+ [AS_HELP_STRING([--enable-w32dll], [Enable Win32 DLL support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_w32dll="yes"],
+ [test x"$with_gnu_as" != x"yes" && enable_w32dll="no"])
+ AC_ARG_WITH([w32-path],
+ [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])],
+ [w32_path="$withval"], [w32_path="/usr/lib/codecs"])
+ if test x"$enable_w32dll" != x"no"; then
+ case "$host_or_hostalias" in
+ *-mingw* | *-cygwin) have_w32dll=no ;;
+ i?86-* | k?-* | athlon-* | pentium*-) have_w32dll="$with_gnu_as" ;;
+ *) enable_w32dll=no ;;
+ esac
+ if test x"$enable_w32dll" = x"yes" && test x"$have_w32dll" != x"yes"; then
+ AC_MSG_ERROR([Win32 DLL support requested, but Win32 DLL support is not available])
+ fi
+ fi
+ AC_SUBST(w32_path)
+ AM_CONDITIONAL([ENABLE_W32DLL], [test x"$have_w32dll" = x"yes"])
+
+
+ dnl wavpack (optional; disabled by default)
+ AC_ARG_WITH([wavpack],
+ [AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)])],
+ [test x"$withval" != x"no" && with_wavpack="yes"], [with_wavpack="no"])
+ if test x"$with_wavpack" != x"no"; then
+ PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes], [have_wavpack=no])
+ if test x"$with_wavpack" = x"yes" && test x"$have_wavpack" != x"yes"; then
+ AC_MSG_ERROR([Wavpack decoder support requested, but libwavpack not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"])
+
+
+ dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled
+ AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$have_gdkpixbuf" = x"yes"])
+])
diff --git a/m4/directx.m4 b/m4/directx.m4
index 6d023528e..4417023ee 100644
--- a/m4/directx.m4
+++ b/m4/directx.m4
@@ -10,62 +10,40 @@ dnl It looks for DirectX, defines DIRECTX_CPPFLAGS, DIRECTX_AUDIO_LIBS and
dnl DIRECTX_VIDEO_LIBS.
dnl
AC_DEFUN([AM_PATH_DIRECTX], [
-
-AC_ARG_WITH(dxheaders, AS_HELP_STRING([--with-dxheaders], [specify location of DirectX headers]),
- [dxheaders_prefix="$withval"],
- [dxheaders_prefix="no"]
-)
-
-if test x"$dxheaders_prefix" != "xno"; then
- DIRECTX_CPPFLAGS="-I${dxheaders_prefix} ${DIRECTX_CPPFLAGS}"
-fi
-
-AC_MSG_CHECKING(for DirectX)
-DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw"
-DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound"
-AC_LANG_PUSH([C])
-ac_save_CPPFLAGS="$CPPFLAGS"
-ac_save_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS"
-LIBS="$LIBS $DIRECTX_VIDEO_LIBS $DIRECTX_AUDIO_LIBS"
-AC_COMPILE_IFELSE(
- [
-#include <stddef.h>
-
-#include <windows.h>
-#include <ddraw.h>
-#include <dsound.h>
-
-int main() {
- DirectDrawCreate(0, NULL, 0);
- DirectsoundCreate(0, NULL, 0);
-
- return 0;
-}
- ],
- [have_directx=yes
- AC_DEFINE(HAVE_DIRECTX,1,[Define this if you have DirectX])],,)
-CPPFLAGS=$ac_save_CPPFLAGS
-LIBS=$ac_save_LIBS
-AC_LANG_POP([C])
-
-if test x$have_directx = xyes ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- AC_MSG_RESULT(*** All DirectX dependent parts will be disabled ***)
-fi
-
-AC_SUBST(DIRECTX_CPPFLAGS)
-AC_SUBST(DIRECTX_AUDIO_LIBS)
-AC_SUBST(DIRECTX_VIDEO_LIBS)
-AM_CONDITIONAL(HAVE_DIRECTX, test x$have_directx = "xyes")
-
-dnl result
-if test x"$have_directx" = "xyes"; then
- ifelse([$1], , :, [$1])
-else
- ifelse([$2], , :, [$2])
-fi
-
+ AC_ARG_WITH([dxheaders],
+ [AS_HELP_STRING([--with-dxheaders], [specify location of DirectX headers])],
+ [dxheaders_prefix="$withval"], [dxheaders_prefix="no"])
+ if test x"$dxheaders_prefix" != x"no"; then
+ DIRECTX_CPPFLAGS="-I$dxheaders_prefix $DIRECTX_CPPFLAGS"
+ fi
+
+ AC_MSG_CHECKING([for DirectX])
+ DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound"
+ DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw"
+
+ AC_LANG_PUSH([C])
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS"
+ ac_save_LIBS="$LIBS" LIBS="$LIBS $DIRECTX_VIDEO_LIBS $DIRECTX_AUDIO_LIBS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ #include <windows.h>
+ #include <ddraw.h>
+ #include <dsound.h>]],
+ [[DirectDrawCreate(0, NULL, 0); DirectsoundCreate(0, NULL, 0)]])],
+ [have_directx=yes], [have_directx=no])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+ AC_LANG_POP([C])
+
+ AC_SUBST(DIRECTX_CPPFLAGS)
+ AC_SUBST(DIRECTX_AUDIO_LIBS)
+ AC_SUBST(DIRECTX_VIDEO_LIBS)
+ AM_CONDITIONAL([ENABLE_DIRECTX], [test x"$have_directx" = x"yes"])
+
+ AC_MSG_RESULT([$have_directx])
+ if test x"$have_directx" = x"yes"; then
+ AC_DEFINE([HAVE_DIRECTX], 1, [Define this if you have DirectX])
+ ifelse([$1], , :, [$1])
+ else
+ ifelse([$2], , :, [$2])
+ fi
])
diff --git a/m4/dl.m4 b/m4/dl.m4
deleted file mode 100644
index 30ea00b1c..000000000
--- a/m4/dl.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl
-dnl Check for dlopen symbol and set DYNAMIC_LD_LIBS.
-dnl
-dnl AM_DL()
-dnl
-
-AC_DEFUN([AM_DL], [
- AC_CHECK_LIB(c, dlopen,
- [DYNAMIC_LD_LIBS=""
- have_dl=yes])
-
- if test x$have_dl != "xyes"; then
- AC_CHECK_LIB(dl, dlopen,
- [DYNAMIC_LD_LIBS="-ldl"
- have_dl=yes])
- fi
-
- if test x$have_dl != "xyes"; then
- AC_MSG_CHECKING(for dlopen under win32)
- AC_LANG_PUSH([C])
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LIBS="$LIBS"
- CPPFLAGS="-I${srcdir}/win32/include $CPPFLAGS"
- LIBS="$LIBS -lkernel32"
- AC_COMPILE_IFELSE([
-#include <stddef.h>
-#include <dlfcn.h>
-
-int main() {
- dlopen(NULL, 0);
- return 0;
-}
-],
- [DYNAMIC_LD_LIBS=-lkernel32
- have_dl=yes
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no)
- )
-
- CPPFLAGS=$ac_save_CPPFLAGS
- LIBS=$ac_save_LIBS
-
- AC_LANG_POP([C])
- fi
-
- if test x$have_dl != "xyes"; then
- AC_MSG_ERROR(dynamic linker needed)
- fi
-
- AC_SUBST(DYNAMIC_LD_LIBS)
-
-])
diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4
deleted file mode 100644
index 0f24080f7..000000000
--- a/m4/dvdnav.m4
+++ /dev/null
@@ -1,187 +0,0 @@
-dnl Configure paths for DVDNAV
-dnl
-dnl Copyright (C) 2001 Daniel Caujolle-Bert <segfault@club-internet.fr>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-dnl
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-dnl
-
-dnl AM_PATH_DVDNAV([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for DVDNAV, and define DVDNAV_CFLAGS and DVDNAV_LIBS
-dnl
-AC_DEFUN([AM_PATH_DVDNAV],
-[dnl
-dnl Get the cflags and libraries from the dvdnav-config script
-dnl
-AC_ARG_WITH(dvdnav-prefix,
- AS_HELP_STRING([--with-dvdnav-prefix=DIR], [prefix where DVDNAV is installed (optional)]),
- dvdnav_config_prefix="$withval", dvdnav_config_prefix="")
-AC_ARG_WITH(dvdnav-exec-prefix,
- AS_HELP_STRING([--with-dvdnav-exec-prefix=DIR], [exec prefix where DVDNAV is installed (optional)]),
- dvdnav_config_exec_prefix="$withval", dvdnav_config_exec_prefix="")
-AC_ARG_ENABLE(dvdnavtest,
- AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]),
- enable_dvdnavtest=$enableval, enable_dvdnavtest=yes)
-
- AC_LANG_PUSH([C])
-
- if test x$dvdnav_config_exec_prefix != x ; then
- dvdnav_config_args="$dvdnav_config_args --exec-prefix=$dvdnav_config_exec_prefix"
- if test x${DVDNAV_CONFIG+set} != xset ; then
- DVDNAV_CONFIG=$dvdnav_config_exec_prefix/bin/dvdnav-config
- fi
- fi
- if test x$dvdnav_config_prefix != x ; then
- dvdnav_config_args="$dvdnav_config_args --prefix=$dvdnav_config_prefix"
- if test x${DVDNAV_CONFIG+set} != xset ; then
- DVDNAV_CONFIG=$dvdnav_config_prefix/bin/dvdnav-config
- fi
- fi
-
- min_dvdnav_version=ifelse([$1], ,0.0.0,$1)
- if test "x$enable_dvdnavtest" != "xyes" ; then
- AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version])
- else
- AC_PATH_TOOL(DVDNAV_CONFIG, dvdnav-config, no)
- AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version])
- no_dvdnav=""
- if test "$DVDNAV_CONFIG" = "no" ; then
- no_dvdnav=yes
- else
- DVDNAV_CFLAGS=`$DVDNAV_CONFIG $dvdnav_config_args --cflags`
- DVDNAV_LIBS=`$DVDNAV_CONFIG $dvdnav_config_args --libs`
- dvdnav_config_major_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- dvdnav_config_minor_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- dvdnav_config_sub_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- dnl if test "x$enable_dvdnavtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $DVDNAV_CFLAGS"
- LIBS="$DVDNAV_LIBS $LIBS"
-dnl
-dnl Now check if the installed DVDNAV is sufficiently new. (Also sanity
-dnl checks the results of dvdnav-config to some extent
-dnl
- rm -f conf.dvdnavtest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <dvdnav.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- int major, minor, sub;
- char *tmp_version;
-
- system ("touch conf.dvdnavtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_dvdnav_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) {
- printf("%s, bad version string\n", "$min_dvdnav_version");
- exit(1);
- }
-
- if (($dvdnav_config_major_version > major) ||
- (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version > minor)) ||
- (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version == minor) && ($dvdnav_config_sub_version >= sub))) {
- return 0;
- } else {
- printf("\n*** An old version of libdvdnav (%d.%d.%d) was found.\n",
- $dvdnav_config_major_version, $dvdnav_config_minor_version, $dvdnav_config_sub_version);
- printf("*** You need a version of libdvdnav newer than %d.%d.%d. The latest version of\n",
- major, minor, sub);
- printf("*** libdvdnav is always available from:\n");
- printf("*** http://dvd.sourceforge.net\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the dvdnav-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of libdvdnav, but you can also set the DVDNAV_CONFIG environment to point to the\n");
- printf("*** correct copy of dvdnav-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- return 1;
-}
-]])],[],[no_dvdnav=yes],[no_dvdnav=cc])
- if test "x$no_dvdnav" = xcc; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <dvdnav.h>
-#include <stdio.h>
-]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_dvdnav" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$DVDNAV_CONFIG" = "no" ; then
- echo "*** The dvdnav-config script installed by DVDNAV could not be found"
- echo "*** If DVDNAV was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the DVDNAV_CONFIG environment variable to the"
- echo "*** full path to dvdnav-config."
- else
- if test -f conf.dvdnavtest ; then
- :
- else
- echo "*** Could not run DVDNAV test program, checking why..."
- CFLAGS="$CFLAGS $DVDNAV_CFLAGS"
- LIBS="$LIBS $DVDNAV_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <dvdnav.h>
-#include <stdio.h>
-]], [[ return 0; ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding DVDNAV or finding the wrong"
- echo "*** version of DVDNAV. If it is not finding DVDNAV, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means DVDNAV was incorrectly installed"
- echo "*** or that you have moved DVDNAV since it was installed. In the latter case, you"
- echo "*** may want to edit the dvdnav-config script: $DVDNAV_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- DVDNAV_CFLAGS=""
- DVDNAV_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(DVDNAV_CFLAGS)
- AC_SUBST(DVDNAV_LIBS)
- AC_LANG_POP([C])
- rm -f conf.dvdnavtest
-])
diff --git a/m4/gas.m4 b/m4/gas.m4
index 923c3f90c..a3c600793 100644
--- a/m4/gas.m4
+++ b/m4/gas.m4
@@ -10,111 +10,98 @@ dnl modifications, as long as this notice is preserved.
dnl AC_PROG_AS
dnl ----------
dnl find the pathname to the GNU or non-GNU assembler
-AC_DEFUN([CC_PROG_AS],
-[AC_ARG_WITH([gnu-as],
- [AS_HELP_STRING([--with-gnu-as],
- [assume the C compiler uses GNU as @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_as=yes],
- [with_gnu_as=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-cc_prog=as
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=as gives a path.
- AC_MSG_CHECKING([for as used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=as) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=as) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of as
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$AS" && AS="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=as
- ;;
- *)
- # If it is relative, then search for the first as in PATH.
- with_gnu_as=unknown
- ;;
- esac
-elif test "$with_gnu_as" = yes; then
- AC_MSG_CHECKING([for GNU as])
-else
- AC_MSG_CHECKING([for non-GNU as])
-fi
-AC_CACHE_VAL(cc_cv_path_AS,
-[if test -z "$AS"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_AS="$ac_dir/$ac_prog"
- # Check to see if the program is GNU as. I'd rather use --version,
- # but apparently some variants of GNU as only accept -v.
- # Break only if it was the GNU/non-GNU as that we prefer.
- case `"$cc_cv_path_AS" -v 2>&1 </dev/null` in
- dnl Apple's assembler reports itself as GNU as 1.38;
- dnl but it doesn't provide the functions we need.
- *Apple*)
- test "$with_gnu_as" != yes && break
- ;;
- *GNU* | *'with BFD'*)
- test "$with_gnu_as" != no && break
- ;;
- *)
- test "$with_gnu_as" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- cc_cv_path_AS="$AS" # Let the user override the test with a path.
-fi])
-AS="$cc_cv_path_AS"
-if test -n "$AS"; then
- AC_MSG_RESULT($AS)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$AS" && AC_MSG_ERROR([no acceptable as found in \$PATH])
-CC_PROG_AS_GNU
-])
+dnl based on AC_PROG_LD from libtool
+AC_DEFUN([CC_PROG_AS], [
+ AC_REQUIRE([LT_AC_PROG_SED])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AM_PROG_AS])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+
+ AC_ARG_WITH([gnu-as],
+ [AS_HELP_STRING([--with-gnu-as], [assume the C compiler uses GNU as @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_as=yes], [with_gnu_as=unknown])
+ if test x"$with_gnu_as" = x"unknown"; then
+ dnl If CCAS is not the same as CC, check to see if it's GCC.
+ if test x"$CCAS" = x"$CC"; then
+ ccas_is_gnu="$GCC"
+ else
+ AC_CACHE_CHECK([whether $CCAS is a GNU compiler], [ac_cv_CCAS_compiler_gnu],
+ [saved_CC="$CC" CC="$CCAS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __GNUC__
+ choke me
+ #endif]])],
+ [ac_cv_CCAS_compiler_gnu=yes], [ac_cv_CCAS_compiler_gnu=no])
+ CC="$saved_CC"])
+ ccas_is_gnu="$ac_cv_CCAS_compiler_gnu"
+ fi
+ dnl Try to figure out the assembler command. Fallback to as.
+ ac_prog=""
+ if test x"$AS" = x""; then
+ AC_MSG_CHECKING([for as used by $CCAS])
+ if test x"$ccas_is_gnu" = x"yes"; then
+ # Check if gcc -print-prog-name=as gives a path.
+ case "$host_or_hostalias" in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CCAS -print-prog-name=as) 2>&5 | tr -d '\015'`
+ ;;
+ *)
+ ac_prog=`($CCAS -print-prog-name=as) 2>&5`
+ ;;
+ esac
+
+ case "$ac_prog" in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of as
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ ;;
+ *) ac_prog="" ;;
+ esac
+ fi
+ fi
+ if test x"$ac_prog" = x""; then
+ # If it fails, then pretend we aren't using GCC.
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/as" || test -f "$ac_dir/as$ac_exeext"; then
+ ac_prog="$ac_dir/as"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ fi
+ if test x"$ac_prog" = x""; then
+ AC_MSG_RESULT([unknown])
+ else
+ AS="$ac_prog"
+ AC_MSG_RESULT([$AS])
+ fi
+ fi
-dnl AC_PROG_AS_GNU
-dnl --------------
-AC_DEFUN([CC_PROG_AS_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the assembler ($AS) is GNU as], cc_cv_prog_gnu_as,
-[# I'd rather use --version here, but apparently some GNU as's only accept -v.
-case `$AS -v 2>&1 </dev/null` in
-dnl Apple's assembler reports itself as GNU as 1.38;
-dnl but it doesn't provide the functions we need.
-*Apple*)
- cc_cv_prog_gnu_as=no
- ;;
-*GNU* | *'with BFD'*)
- cc_cv_prog_gnu_as=yes
- ;;
-*)
- cc_cv_prog_gnu_as=no
- ;;
-esac])
-with_gnu_as=$cc_cv_prog_gnu_as
+ test -z "$AS" && AC_MSG_ERROR([no acceptable as found in \$PATH])
+ AC_CACHE_CHECK([if the assembler ($AS) is GNU as], [cc_cv_prog_gnu_as], [
+ # I'd rather use --version here, but apparently some GNU as's only accept -v.
+ case `"$AS" -v 2>&1 </dev/null` in
+ *Apple*)
+ # Apple's assembler reports itself as GNU as 1.38;
+ # but it doesn't provide the functions we need.
+ cc_cv_prog_gnu_as=no
+ ;;
+ *GNU* | *'with BFD'*)
+ cc_cv_prog_gnu_as=yes
+ ;;
+ *)
+ cc_cv_prog_gnu_as=no
+ ;;
+ esac])
+ with_gnu_as="$cc_cv_prog_gnu_as"
])
diff --git a/m4/gettext/Makefile.am b/m4/gettext/Makefile.am
new file mode 100644
index 000000000..d5f2fe6f0
--- /dev/null
+++ b/m4/gettext/Makefile.am
@@ -0,0 +1,32 @@
+include $(top_srcdir)/misc/Makefile.common
+
+EXTRA_DIST = \
+ codeset.m4 \
+ gettext.m4 \
+ glibc2.m4 \
+ glibc21.m4 \
+ iconv.m4 \
+ intdiv0.m4 \
+ intmax.m4 \
+ inttypes-pri.m4 \
+ inttypes.m4 \
+ inttypes_h.m4 \
+ isc-posix.m4 \
+ lcmessage.m4 \
+ lib-ld.m4 \
+ lib-link.m4 \
+ lib-prefix.m4 \
+ longdouble.m4 \
+ longlong.m4 \
+ nls.m4 \
+ po.m4 \
+ printf-posix.m4 \
+ progtest.m4 \
+ signed.m4 \
+ size_max.m4 \
+ stdint_h.m4 \
+ uintmax_t.m4 \
+ ulonglong.m4 \
+ wchar_t.m4 \
+ wint_t.m4 \
+ xsize.m4
diff --git a/m4/codeset.m4 b/m4/gettext/codeset.m4
index a6e67ec49..a6e67ec49 100644
--- a/m4/codeset.m4
+++ b/m4/gettext/codeset.m4
diff --git a/m4/gettext.m4 b/m4/gettext/gettext.m4
index 624a80785..91c345e99 100644
--- a/m4/gettext.m4
+++ b/m4/gettext/gettext.m4
@@ -1,5 +1,5 @@
-# gettext.m4 serial 37 (gettext-0.14.4)
-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+# gettext.m4 serial 59 (gettext-0.16.1)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
dnl Macro to add for using GNU gettext.
@@ -63,8 +63,13 @@ AC_DEFUN([AM_GNU_GETTEXT],
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
- define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
AC_REQUIRE([AM_PO_SUBDIRS])dnl
ifelse(gt_included_intl, yes, [
@@ -78,7 +83,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl Sometimes libintl requires libiconv, so first search for libiconv.
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
- dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
@@ -94,7 +99,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
gt_INTL_MACOSX
dnl Set USE_NLS.
- AM_NLS
+ AC_REQUIRE([AM_NLS])
ifelse(gt_included_intl, yes, [
BUILD_INCLUDED_LIBINTL=no
@@ -104,6 +109,15 @@ AC_DEFUN([AM_GNU_GETTEXT],
LTLIBINTL=
POSUB=
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
@@ -122,28 +136,35 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl to use. If GNU gettext is available we use this. Else we have
dnl to fall back to GNU NLS library.
- dnl Add a version number to the cache macros.
- define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
- define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
- define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
-
- AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
- [AC_TRY_LINK([#include <libintl.h>
-]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;],
[bindtextdomain ("", "");
-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
- gt_cv_func_gnugettext_libc=yes,
- gt_cv_func_gnugettext_libc=no)])
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
- if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
dnl Sometimes libintl requires libiconv, so first search for libiconv.
ifelse(gt_included_intl, yes, , [
AM_ICONV_LINK
@@ -154,52 +175,40 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
dnl even if libiconv doesn't exist.
AC_LIB_LINKFLAGS_BODY([intl])
AC_CACHE_CHECK([for GNU gettext in libintl],
- gt_cv_func_gnugettext_libintl,
+ [$gt_func_gnugettext_libintl],
[gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
dnl Now see whether libintl exists and does not depend on libiconv.
AC_TRY_LINK([#include <libintl.h>
-]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-changequote(,)dnl
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
- gt_cv_func_gnugettext_libintl=yes,
- gt_cv_func_gnugettext_libintl=no)
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
dnl Now see whether libintl exists and depends on libiconv.
- if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <libintl.h>
-]ifelse([$2], [need-formatstring-macros],
-[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-changequote(,)dnl
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-], [])[extern int _nl_msg_cat_cntr;
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
-return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
[LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- gt_cv_func_gnugettext_libintl=yes
+ eval "$gt_func_gnugettext_libintl=yes"
])
fi
CPPFLAGS="$gt_save_CPPFLAGS"
@@ -210,8 +219,8 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
dnl use it. But if this macro is used in GNU gettext, and GNU
dnl gettext is already preinstalled in libintl, we update this
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
- if test "$gt_cv_func_gnugettext_libc" = "yes" \
- || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
&& test "$PACKAGE" != gettext-runtime \
&& test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
@@ -234,8 +243,8 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
dnl Mark actions used to generate GNU NLS library.
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
- LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
- LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi
@@ -271,7 +280,7 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
if test "$USE_NLS" = "yes"; then
AC_MSG_CHECKING([where the gettext function comes from])
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
gt_source="external libintl"
else
gt_source="libc"
@@ -285,7 +294,7 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
AC_MSG_CHECKING([how to link with libintl])
AC_MSG_RESULT([$LIBINTL])
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
@@ -353,134 +362,6 @@ return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)],
])
-dnl Checks for all prerequisites of the intl subdirectory,
-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-AC_DEFUN([AM_INTL_SUBDIR],
-[
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])dnl
- AC_REQUIRE([gt_GLIBC2])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([bh_C_SIGNED])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
- AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
- AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
- AC_REQUIRE([gt_TYPE_WINT_T])dnl
- AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
- AC_REQUIRE([gl_AC_HEADER_STDINT_H])
- AC_REQUIRE([gt_TYPE_INTMAX_T])
- AC_REQUIRE([gt_PRINTF_POSIX])
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
- AC_REQUIRE([gl_GLIBC21])dnl
- AC_REQUIRE([gt_INTDIV0])dnl
- AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
- AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
- AC_REQUIRE([gt_INTTYPES_PRI])dnl
- AC_REQUIRE([gl_XSIZE])dnl
- AC_REQUIRE([gt_INTL_MACOSX])dnl
-
- AC_CHECK_TYPE([ptrdiff_t], ,
- [AC_DEFINE([ptrdiff_t], [long],
- [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
- ])
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-stdlib.h string.h unistd.h sys/param.h])
- AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
-mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
-strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
-__fsetlocking])
-
- dnl Use the _snprintf function only if it is declared (because on NetBSD it
- dnl is defined as a weak alias of snprintf; we prefer to use the latter).
- gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
- gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
-
- dnl Use the *_unlocked functions only if they are declared.
- dnl (because some of them were defined without being declared in Solaris
- dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
- dnl on Solaris 2.5.1 to run on Solaris 2.6).
- dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
- gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
- gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
- gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
-
- case $gt_cv_func_printf_posix in
- *yes) HAVE_POSIX_PRINTF=1 ;;
- *) HAVE_POSIX_PRINTF=0 ;;
- esac
- AC_SUBST([HAVE_POSIX_PRINTF])
- if test "$ac_cv_func_asprintf" = yes; then
- HAVE_ASPRINTF=1
- else
- HAVE_ASPRINTF=0
- fi
- AC_SUBST([HAVE_ASPRINTF])
- if test "$ac_cv_func_snprintf" = yes; then
- HAVE_SNPRINTF=1
- else
- HAVE_SNPRINTF=0
- fi
- AC_SUBST([HAVE_SNPRINTF])
- if test "$ac_cv_func_wprintf" = yes; then
- HAVE_WPRINTF=1
- else
- HAVE_WPRINTF=0
- fi
- AC_SUBST([HAVE_WPRINTF])
-
- AM_ICONV
- AM_LANGINFO_CODESET
- if test $ac_cv_header_locale_h = yes; then
- gt_LC_MESSAGES
- fi
-
- if test -n "$INTL_MACOSX_LIBS"; then
- CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
- fi
-
- dnl intl/plural.c is generated from intl/plural.y. It requires bison,
- dnl because plural.y uses bison specific features. It requires at least
- dnl bison-1.26 because earlier versions generate a plural.c that doesn't
- dnl compile.
- dnl bison is only needed for the maintainer (who touches plural.y). But in
- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
- dnl the rule in general Makefile. Now, some people carelessly touch the
- dnl files or have a broken "make" program, hence the plural.c rule will
- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
- dnl present or too old.
- AC_CHECK_PROGS([INTLBISON], [bison])
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- dnl Found it, now check the version.
- AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- AC_MSG_RESULT([$ac_prog_version])
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
- fi
-])
-
-
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
@@ -488,15 +369,12 @@ AC_DEFUN([gt_INTL_MACOSX],
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
- [gt_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
- gt_save_LIBS="$LIBS"
- LIBS="$LIBS -framework CoreFoundation"
- AC_TRY_LINK([#include <CFPreferences.h>],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
- CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
@@ -504,14 +382,11 @@ AC_DEFUN([gt_INTL_MACOSX],
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
- [gt_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
- gt_save_LIBS="$LIBS"
- LIBS="$LIBS -framework CoreFoundation"
- AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
- CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
@@ -525,23 +400,18 @@ AC_DEFUN([gt_INTL_MACOSX],
])
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
[
- AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
- [AC_TRY_COMPILE([$2], [
-#ifndef $1
- char *p = (char *) $1;
-#endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
- if test $ac_cv_have_decl_$1 = yes; then
- gt_value=1
- else
- gt_value=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
- [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
])
diff --git a/m4/glibc2.m4 b/m4/gettext/glibc2.m4
index e8f5bfe6e..e8f5bfe6e 100644
--- a/m4/glibc2.m4
+++ b/m4/gettext/glibc2.m4
diff --git a/m4/glibc21.m4 b/m4/gettext/glibc21.m4
index d95fd9861..d95fd9861 100644
--- a/m4/glibc21.m4
+++ b/m4/gettext/glibc21.m4
diff --git a/m4/iconv.m4 b/m4/gettext/iconv.m4
index 5ed7c43ae..654c41589 100644
--- a/m4/iconv.m4
+++ b/m4/gettext/iconv.m4
@@ -15,22 +15,6 @@ AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
AC_LIB_LINKFLAGS_BODY([iconv])
-
- dnl
- dnl xine: added the prefix /usr/local on FreeBSD if none specified
- dnl
- if test -z "$INCICONV"; then
- case "$host" in
- *-*-freebsd*)
- dir=/usr/local
- if test -d $dir/include; then INCICONV="$INCICONV -I$dir/include"; fi
- if test -d $dir/lib; then
- LIBICONV="$LIBICONV -L$dir/lib"
- LTLIBICONV="$LTLIBICONV -L$dir/lib"
- fi
- ;;
- esac
- fi
])
AC_DEFUN([AM_ICONV_LINK],
diff --git a/m4/intdiv0.m4 b/m4/gettext/intdiv0.m4
index b8d78176a..b8d78176a 100644
--- a/m4/intdiv0.m4
+++ b/m4/gettext/intdiv0.m4
diff --git a/m4/intmax.m4 b/m4/gettext/intmax.m4
index d99c999fd..d99c999fd 100644
--- a/m4/intmax.m4
+++ b/m4/gettext/intmax.m4
diff --git a/m4/inttypes-pri.m4 b/m4/gettext/inttypes-pri.m4
index 4d56a9ad3..4d56a9ad3 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/gettext/inttypes-pri.m4
diff --git a/m4/inttypes.m4 b/m4/gettext/inttypes.m4
index 779bcea05..779bcea05 100644
--- a/m4/inttypes.m4
+++ b/m4/gettext/inttypes.m4
diff --git a/m4/inttypes_h.m4 b/m4/gettext/inttypes_h.m4
index a5d075d96..a5d075d96 100644
--- a/m4/inttypes_h.m4
+++ b/m4/gettext/inttypes_h.m4
diff --git a/m4/isc-posix.m4 b/m4/gettext/isc-posix.m4
index 74dc8f26d..74dc8f26d 100644
--- a/m4/isc-posix.m4
+++ b/m4/gettext/isc-posix.m4
diff --git a/m4/lcmessage.m4 b/m4/gettext/lcmessage.m4
index 19aa77e4f..19aa77e4f 100644
--- a/m4/lcmessage.m4
+++ b/m4/gettext/lcmessage.m4
diff --git a/m4/lib-ld.m4 b/m4/gettext/lib-ld.m4
index 96c4e2c33..96c4e2c33 100644
--- a/m4/lib-ld.m4
+++ b/m4/gettext/lib-ld.m4
diff --git a/m4/lib-link.m4 b/m4/gettext/lib-link.m4
index ea0b0c4ea..f95b7ba88 100644
--- a/m4/lib-link.m4
+++ b/m4/gettext/lib-link.m4
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-link.m4 serial 9 (gettext-0.16)
+dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -126,6 +126,7 @@ dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl By default, look in $includedir and $libdir.
@@ -148,7 +149,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
@@ -197,9 +198,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test -n "$shlibext" \
+ && { test -f "$additional_libdir/lib$name.$shlibext" \
+ || { test "$shlibext" = dll \
+ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_so="$additional_libdir/lib$name.$shlibext"
+ else
+ found_so="$additional_libdir/lib$name.dll.a"
+ fi
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
@@ -219,9 +227,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test -n "$shlibext" \
+ && { test -f "$dir/lib$name.$shlibext" \
+ || { test "$shlibext" = dll \
+ && test -f "$dir/lib$name.dll.a"; }; }; then
found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.$shlibext"; then
+ found_so="$dir/lib$name.$shlibext"
+ else
+ found_so="$dir/lib$name.dll.a"
+ fi
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi
@@ -248,7 +263,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -334,8 +349,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Assume the include files are nearby.
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
additional_includedir="$basedir/include"
;;
esac
@@ -396,9 +411,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -551,3 +566,79 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
fi
done
])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/gettext/lib-prefix.m4
index e0736ce1c..a8684e17e 100644
--- a/m4/lib-prefix.m4
+++ b/m4/gettext/lib-prefix.m4
@@ -1,4 +1,4 @@
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
+# lib-prefix.m4 serial 5 (gettext-0.15)
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,7 @@ dnl From Bruno Haible.
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
dnl require excessive bracketing.
-ifdef([AS_HELP_STRING],
+ifdef([AC_HELP_STRING],
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
@@ -24,6 +24,7 @@ AC_DEFUN([AC_LIB_PREFIX],
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
dnl By default, look in $includedir and $libdir.
use_additional=yes
@@ -45,7 +46,7 @@ AC_DEFUN([AC_LIB_PREFIX],
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
@@ -87,7 +88,7 @@ AC_DEFUN([AC_LIB_PREFIX],
dnl 2. if it's already present in $LDFLAGS,
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
for x in $LDFLAGS; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
@@ -97,7 +98,7 @@ AC_DEFUN([AC_LIB_PREFIX],
fi
done
if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux*) haveit=yes;;
@@ -151,3 +152,34 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
diff --git a/m4/longdouble.m4 b/m4/gettext/longdouble.m4
index 40cd7ce02..40cd7ce02 100644
--- a/m4/longdouble.m4
+++ b/m4/gettext/longdouble.m4
diff --git a/m4/longlong.m4 b/m4/gettext/longlong.m4
index 7b399e012..7b399e012 100644
--- a/m4/longlong.m4
+++ b/m4/gettext/longlong.m4
diff --git a/m4/nls.m4 b/m4/gettext/nls.m4
index 2082c3b24..7967cc2f9 100644
--- a/m4/nls.m4
+++ b/m4/gettext/nls.m4
@@ -1,5 +1,5 @@
-# nls.m4 serial 2 (gettext-0.14.3)
-dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,23 +29,3 @@ AC_DEFUN([AM_NLS],
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
])
-
-AC_DEFUN([AM_MKINSTALLDIRS],
-[
- dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
- dnl Try to locate it.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- case "$ac_aux_dir" in
- /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
- *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
- esac
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
-])
diff --git a/m4/po.m4 b/m4/gettext/po.m4
index f2795eea0..00133ef36 100644
--- a/m4/po.m4
+++ b/m4/gettext/po.m4
@@ -1,5 +1,5 @@
-# po.m4 serial 7 (gettext-0.14.3)
-dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
AC_REQUIRE([AM_NLS])dnl
dnl Perform the following tests also if --disable-nls has been given,
@@ -39,6 +39,22 @@ AC_DEFUN([AM_PO_SUBDIRS],
:)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
dnl Search for GNU xgettext 0.12 or newer in the PATH.
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
dnl The second test excludes FreeBSD xgettext.
@@ -49,44 +65,26 @@ AC_DEFUN([AM_PO_SUBDIRS],
dnl Remove leftover from FreeBSD xgettext call.
rm -f messages.po
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU msgfmt.
- if test "$GMSGFMT" != ":"; then
- dnl If it is no GNU msgfmt we define it as : so that the
- dnl Makefiles still can work.
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
- AC_MSG_RESULT(
- [found $GMSGFMT program is not GNU msgfmt; ignore it])
- GMSGFMT=":"
- fi
- fi
-
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
- (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
- fi
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
- AC_OUTPUT_COMMANDS([
+ AC_CONFIG_COMMANDS([po-directories], [[
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
@@ -123,11 +121,12 @@ AC_DEFUN([AM_PO_SUBDIRS],
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
# Compute POFILES
@@ -197,10 +196,10 @@ AC_DEFUN([AM_PO_SUBDIRS],
fi
;;
esac
- done],
+ done]],
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
- # from automake.
+ # from automake < 1.5.
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
# Capture the value of LINGUAS because we need it to compute CATALOGS.
LINGUAS="${LINGUAS-%UNSET%}"
@@ -286,7 +285,7 @@ x
changequote([,])dnl
# Set POTFILES to the value of the Makefile variable POTFILES.
- sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
# Compute POTFILES_DEPS as
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
@@ -305,10 +304,10 @@ changequote([,])dnl
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
- sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
fi
- # Hide the ALL_LINGUAS assigment from automake.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
# Compute POFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
diff --git a/m4/printf-posix.m4 b/m4/gettext/printf-posix.m4
index af10170af..af10170af 100644
--- a/m4/printf-posix.m4
+++ b/m4/gettext/printf-posix.m4
diff --git a/m4/progtest.m4 b/m4/gettext/progtest.m4
index a56365cd3..a56365cd3 100644
--- a/m4/progtest.m4
+++ b/m4/gettext/progtest.m4
diff --git a/m4/signed.m4 b/m4/gettext/signed.m4
index 048f59369..048f59369 100644
--- a/m4/signed.m4
+++ b/m4/gettext/signed.m4
diff --git a/m4/size_max.m4 b/m4/gettext/size_max.m4
index 4fe81c7b0..4fe81c7b0 100644
--- a/m4/size_max.m4
+++ b/m4/gettext/size_max.m4
diff --git a/m4/stdint_h.m4 b/m4/gettext/stdint_h.m4
index 3355f35aa..3355f35aa 100644
--- a/m4/stdint_h.m4
+++ b/m4/gettext/stdint_h.m4
diff --git a/m4/uintmax_t.m4 b/m4/gettext/uintmax_t.m4
index bf83ed746..bf83ed746 100644
--- a/m4/uintmax_t.m4
+++ b/m4/gettext/uintmax_t.m4
diff --git a/m4/ulonglong.m4 b/m4/gettext/ulonglong.m4
index dee10ccc3..dee10ccc3 100644
--- a/m4/ulonglong.m4
+++ b/m4/gettext/ulonglong.m4
diff --git a/m4/wchar_t.m4 b/m4/gettext/wchar_t.m4
index cde2129a9..cde2129a9 100644
--- a/m4/wchar_t.m4
+++ b/m4/gettext/wchar_t.m4
diff --git a/m4/wint_t.m4 b/m4/gettext/wint_t.m4
index b8fff9c86..b8fff9c86 100644
--- a/m4/wint_t.m4
+++ b/m4/gettext/wint_t.m4
diff --git a/m4/xsize.m4 b/m4/gettext/xsize.m4
index 85bb721e4..85bb721e4 100644
--- a/m4/xsize.m4
+++ b/m4/gettext/xsize.m4
diff --git a/m4/input.m4 b/m4/input.m4
new file mode 100644
index 000000000..76ad12ad9
--- /dev/null
+++ b/m4/input.m4
@@ -0,0 +1,280 @@
+dnl -------------
+dnl Input Plugins
+dnl -------------
+AC_DEFUN([XINE_INPUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, v4l is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - dvb is Linux only
+ dnl - v4l is Linux only
+
+ default_enable_dvb=disable
+ default_enable_gnomevfs=enable
+ default_enable_samba=enable
+ default_enable_v4l=disable
+ default_enable_vcd=enable
+ default_enable_vcdo=disable
+
+ default_with_internal_vcdlibs=without
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_gnomevfs=disable
+ default_enable_samba=disable
+ ;;
+ darwin*)
+ default_enable_gnomevfs=disable
+ default_enable_samba=disable
+ ;;
+ freebsd*)
+ default_enable_vcdo=enable
+ ;;
+ linux*)
+ default_enable_dvb=enable
+ default_enable_v4l=enable
+ default_enable_vcdo=enable
+ ;;
+ solaris*)
+ default_enable_vcdo=enable
+ ;;
+ esac
+
+ dnl dvb
+ AC_ARG_ENABLE([dvb],
+ [AS_HELP_STRING([--enable-dvb], [Enable support for the DVB plugin (Linux only)])],
+ [test x"$enableval" != x"no" && enable_dvb="yes"],
+ [test $default_enable_dvb = disable && enable_dvb="no"])
+ if test x"$enable_dvb" != x"no"; then
+ case "$host_os" in
+ linux*) have_dvb=yes ;;
+ *) have_dvb=no ;;
+ esac
+ if test x"$enable_dvb" = x"yes" && test x"$have_dvb" != x"yes"; then
+ AC_MSG_ERROR([DVB support requested, but DVB not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DVB], [test x"$have_dvb" = x"yes"])
+
+
+ dnl gnome-vfs
+ AC_ARG_ENABLE([gnomevfs],
+ [AS_HELP_STRING([--enable-gnomevfs], [Enable support for the Gnome-VFS plugin])],
+ [test x"$enableval" != x"no" && enable_gnomevfs="yes"],
+ [test $default_enable_gnomevfs = disable && enable_gnomevfs="no"])
+ if test x"$enable_gnomevfs" != x"no"; then
+ PKG_CHECK_MODULES([GNOME_VFS], [gnome-vfs-2.0], [have_gnomevfs=yes], [have_gnome_vfs=no])
+ if test x"$enable_gnomevfs" = x"yes" && test x"$have_gnomevfs" != x"yes"; then
+ AC_MSG_ERROR([Gnome-VFS support requested, but Gnome-VFS not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$have_gnomevfs" = x"yes"])
+
+
+ dnl libsmbclient
+ AC_ARG_ENABLE([samba],
+ [AS_HELP_STRING([--enable-samba], [Enable support for the Samba plugin])],
+ [test x"$enableval" != x"no" && enable_samba="yes"],
+ [test $default_enable_samba = disable && enable_samba="no"])
+ if test x"$enable_samba" != x"no"; then
+ AC_CHECK_LIB([smbclient], [smbc_init],
+ [AC_CHECK_HEADERS([libsmbclient.h], [have_samba=yes LIBSMBCLIENT_LIBS="-lsmbclient"])])
+ AC_SUBST(LIBSMBCLIENT_LIBS)
+ if test x"$enable_samba" = x"yes" && test x"$have_samba" != x"yes"; then
+ AC_MSG_ERROR([Samba support requested, but Samba not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_samba" = x"yes"])
+
+
+ dnl video-for-linux (v4l)
+ AC_ARG_ENABLE([v4l],
+ [AS_HELP_STRING([--enable-v4l], [Enable Video4Linux support])],
+ [test x"$enableval" != x"no" && enable_v4l="yes"],
+ [test $default_enable_v4l = disable && enable_v4l="no"])
+ if test x"$enable_v4l" != x"no"; then
+ AC_CHECK_HEADERS([linux/videodev.h], [have_v4l=yes], [have_v4l=no])
+ AC_CHECK_HEADERS([asm/types.h])
+ if test x"$enable_v4l" = x"yes" && test x"$have_v4l" != x"yes"; then
+ AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_V4L], [test x"$have_v4l" = x"yes"])
+
+
+ dnl dvdnav
+ dnl XXX: This could be cleaned up so that code does not have to ifdef so much
+ AC_ARG_WITH([external-dvdnav],
+ [AS_HELP_STRING([--with-external-dvdnav], [Use external dvdnav library (not recommended)])],
+ [test x"$withval" != x"no" && with_external_dvdnav="yes"], [with_external_dvdnav="no"])
+ if test x"$with_external_dvdnav" != x"no"; then
+ ACX_PACKAGE_CHECK([DVDNAV], [0.1.9], [dvdnav-config],
+ [AC_DEFINE([HAVE_DVDNAV], 1, [Define this if you have a suitable version of libdvdnav])],
+ [AC_MSG_RESULT([*** no usable version of libdvdnav found, using internal copy ***])])
+ else
+ AC_MSG_RESULT([Using included DVDNAV support])
+ fi
+ AM_CONDITIONAL([WITH_EXTERNAL_DVDNAV], [test x"$with_external_dvdnav" != x"no"])
+
+
+ dnl Video CD
+ dnl XXX: This could be cleaned up so that code does not have it ifdef so much
+ AC_ARG_ENABLE([vcd],
+ [AS_HELP_STRING([--enable-vcd], [Enable VCD (VideoCD) support])],
+ [test x"$enableval" != x"no" && enable_vcd="yes"],
+ [test $default_enable_vcd = disable && enable_vcd="no"])
+ AC_ARG_WITH([internal-vcdlibs],
+ [AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo])],
+ [test x"$withval" != x"no" && with_internal_vcdlibs="yes"],
+ [test $default_with_internal_vcdlibs = without && with_internal_vcdlibs="no"])
+ if test x"$enable_vcd" != x"no"; then
+ dnl check twice - fallback is to use internal vcdlibs
+ if test x"$with_internal_vcdlibs" = x"no"; then
+ PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71], [], [with_internal_vcdlibs=yes])
+ PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [with_internal_vcdlibs=yes])
+ if test x"$with_internal_vcdlibs" = x"yes"; then
+ AC_MSG_RESULT([Using included libcdio/libvcdinfo support])
+ fi
+ fi
+ if test x"$with_internal_vcdlibs" = x"no"; then
+ AC_DEFINE([HAVE_VCDNAV], 1, [Define this if you use external libcdio/libvcdinfo])
+ else
+ AC_DEFINE_UNQUOTED([HOST_ARCH], ["$host_os/$host_cpu"], [host os/cpu identifier])
+ AC_DEFINE([_DEVELOPMENT_], [], [enable warnings about being development release])
+
+ dnl
+ dnl bitfield order
+ dnl
+ AC_MSG_CHECKING([bitfield ordering in structs])
+
+ dnl basic compile test for all platforms
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+ __attribute__((packed))
+ #endif
+ bf = { 1,1,1,1 };
+ switch (0) case 0: case sizeof(bf) == 1:;]])],
+ [], [AC_MSG_ERROR([compiler doesn't support bitfield structs])])
+
+
+ dnl run test
+ AC_RUN_IFELSE([[
+ int main() {
+ struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+ __attribute__((packed))
+ #endif
+ bf = { 1,1,1,1 };
+ if (sizeof (bf) != 1) return 1;
+ return *((unsigned char*) &bf) != 0x4b;
+ }]], [bf_lsbf=1], [
+ AC_RUN_IFELSE([[
+ int main() {
+ struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+ __attribute__((packed))
+ #endif
+ bf = { 1,1,1,1 };
+ if (sizeof (bf) != 1) return 1;
+ return *((unsigned char*) &bf) != 0xa5;
+ }]], [bf_lsbf=0], [AC_MSG_ERROR([unsupported bitfield ordering])])],
+ [case "$host" in
+ *-*-mingw32* | *-*-cygwin* | i?86-* | k?-* | athlon-* | pentium*- | x86_64-*)
+ bf_lsbf=1
+ ;;
+ universal-*-darwin*)
+ bf_lsbf=2
+ ;;
+ powerpc-* | powerpc64-* | ppc-* | sparc*-* | mips-*)
+ bf_lsbf=0
+ ;;
+ *)
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([value of bitfield test isn't known for $host
+ *********************************************************************
+ Value of bitfield test can't be found out for cross-compiling and we
+ don't know its value for host "$host".
+
+ Because it's needed for VCD plugin, disable VCD by configure option
+ --disable-vcd or use external VCD library.
+ *********************************************************************])
+ ;;
+ esac])
+
+ if test "x$cross_compiling" = "xyes"; then
+ TEXT=" (guessed)"
+ else
+ TEXT=""
+ fi
+ if test "x$bf_lsbf" = "x1"; then
+ AC_MSG_RESULT([LSBF${TEXT}])
+ AC_DEFINE([BITFIELD_LSBF], [], [compiler does lsbf in struct bitfields])
+ else
+ if test "x$bf_lsbf" = "x2"; then
+ AC_MSG_RESULT([indeterminate (universal build)])
+ else
+ AC_MSG_RESULT([MSBF${TEXT}])
+ fi
+ fi
+
+ LIBCDIO_CFLAGS='-I$(top_srcdir)/src/input/vcd/libcdio'
+ LIBCDIO_LIBS='$(top_builddir)/src/input/vcd/libcdio/libcdio.la'
+ LIBISO9660_LIBS='$(top_builddir)/src/input/vcd/libcdio/libiso9660.la'
+ LIBVCD_CFLAGS='-I$(top_srcdir)/src/input/vcd/libvcd'
+ LIBVCD_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcd.la'
+ LIBVCDINFO_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcdinfo.la'
+
+ case "$host_os" in
+ bsdi*)
+ AC_CHECK_HEADERS([dvd.h],
+ [AC_DEFINE([HAVE_BSDI_CDROM], 1, [Define 1 if you have BSDI-type CD-ROM support])])
+ ;;
+ cygwin*)
+ AC_DEFINE([CYGWIN], 1, [Define 1 if you are compiling using cygwin])
+ AC_DEFINE([HAVE_WIN32_CDROM], 1, [Define 1 if you have MinGW CD-ROM support])
+ LIBCDIO_LIBS="$LIBCDIO_LIBS -lwinmm"
+ LIBVCD_LIBS="$LIBVCD_LIBS -lwinmm"
+ ;;
+ darwin*)
+ AC_CHECK_HEADERS([IOKit/IOKitLib.h CoreFoundation/CFBase.h],
+ [AC_DEFINE([HAVE_DARWIN_CDROM], 1, [Define 1 if you have Darwin OS X-type CD-ROM support])])
+ LIBVCD_LIBS="$LIBVCD_LIBS -framework CoreFoundation -framework IOKit"
+ ;;
+ freebsd4.*)
+ AC_DEFINE([HAVE_FREEBSD_CDROM], 1, [Define 1 if you have FreeBSD CD-ROM support])
+ ;;
+ linux*)
+ AC_CHECK_HEADERS([linux/version.h])
+ ;;
+ mingw*)
+ AC_DEFINE([MINGW32], 1, [Define 1 if you are compiling using MinGW])
+ AC_DEFINE([HAVE_WIN32_CDROM], 1, [Define 1 if you have MinGW CD-ROM support])
+ ;;
+ sunos*|sun*|solaris*)
+ AC_CHECK_HEADERS([sys/cdio.h],
+ [AC_DEFINE([HAVE_SOLARIS_CDROM], 1, [Define 1 if you have Solaris CD-ROM support])])
+ ;;
+ *)
+ AC_MSG_WARN([Don't have OS CD-reading support for ${host_os} ... Will use generic support.])
+ ;;
+ esac
+
+ fi
+ fi
+
+ enable_vcdo=no
+ test $default_enable_vcdo = enable && test x"$enable_vcd" != x"no" && enable_vcdo=yes
+
+ AC_DEFINE([LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
+ AC_DEFINE([EXTERNAL_LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
+ AC_SUBST(LIBCDIO_CFLAGS)
+ AC_SUBST(LIBCDIO_LIBS)
+ AC_SUBST(LIBISO9660_LIBS)
+ AC_SUBST(LIBVCD_CFLAGS)
+ AC_SUBST(LIBVCD_LIBS)
+ AC_SUBST(LIBVCDINFO_LIBS)
+ AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" = x"no"])
+ AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" != x"no"])
+ AM_CONDITIONAL([ENABLE_VCDO], [test x"$enable_vcdo" != x"no"])
+])
diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4
deleted file mode 100644
index c6d12258e..000000000
--- a/m4/ioctl_request.m4
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl Simple macro to find the type of the ioctl request parameter
-dnl Copyright (c) 2007 xine project
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2, or (at your option)
-dnl any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-dnl 02110-1301, USA.
-dnl
-dnl As a special exception, the xine project, as copyright owner of the
-dnl macro gives unlimited permission to copy, distribute and modify the
-dnl configure scripts that are the output of Autoconf when processing the
-dnl Macro. You need not follow the terms of the GNU General Public
-dnl License when using or distributing such scripts, even though portions
-dnl of the text of the Macro appear in them. The GNU General Public
-dnl License (GPL) does govern all other use of the material that
-dnl constitutes the Autoconf Macro.
-dnl
-dnl This special exception to the GPL applies to versions of the
-dnl Autoconf Macro released by the xine project. When you make and
-dnl distribute a modified version of the Autoconf Macro, you may extend
-dnl this special exception to the GPL to apply to your modified version as
-dnl well.
-
-
-dnl Usage AC_IOCTL_REQUEST
-AC_DEFUN([AC_IOCTL_REQUEST], [
- AC_CACHE_CHECK([type of request parameter for ioctl()],
- ac_cv_ioctl_request,
- [for ac_ioctl_request_type in "unsigned long" "int"
- do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #include <sys/ioctl.h>
- int ioctl(int fd, $ac_ioctl_request_type request, ...);
- ]], [[]])],[ac_cv_ioctl_request=$ac_ioctl_request_type],[])
- done])
-
- if test "x$ac_cv_ioctl_request" = "x"; then
- AC_MSG_ERROR([Unable to determine the type for ioctl() request parameter])
- fi
-
- AC_DEFINE_UNQUOTED([IOCTL_REQUEST_TYPE], $ac_cv_ioctl_request, [Type of the request parameter for ioctl()])
-])
diff --git a/m4/irixal.m4 b/m4/irixal.m4
deleted file mode 100644
index 3ff633cf8..000000000
--- a/m4/irixal.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl AM_CHECK_IRIXAL ([ACTION-IF-YES], [ACTION-IF-NO])
-dnl Configure paths/version for IRIX AL
-AC_DEFUN([AM_CHECK_IRIXAL],
- [AC_CACHE_CHECK([for IRIX libaudio support],
- [am_cv_have_irixal],
- [AC_CHECK_HEADER([dmedia/audio.h],
- am_cv_have_irixal=yes, am_cv_have_irixal=no)])
- if test "x$am_cv_have_irixal" = xyes ; then
- IRIXAL_LIBS="-laudio"
- IRIXAL_STATIC_LIB="/usr/lib/libaudio.a"
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(IRIXAL_CFLAGS)
- AC_SUBST(IRIXAL_STATIC_LIB)
- AC_SUBST(IRIXAL_LIBS)
-])
-
diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4
index 9ecf8dd51..9778d25d6 100644
--- a/m4/libFLAC.m4
+++ b/m4/libFLAC.m4
@@ -13,6 +13,33 @@ AC_ARG_WITH(libFLAC-libraries, AS_HELP_STRING([--with-libFLAC-libraries=DIR], [d
AC_ARG_WITH(libFLAC-includes, AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)]), libFLAC_includes="$withval", libFLAC_includes="")
AC_ARG_ENABLE(libFLACtest, AS_HELP_STRING([--disable-libFLACtest], [do not try to compile and run a test libFLAC program]), enable_libFLACtest=$enableval, enable_libFLACtest=yes)
+ AC_MSG_CHECKING([libdir name])
+ case $host_or_hostalias in
+ *-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ xine_cv_cc_64bit_output=no
+ if AC_TRY_EVAL(ac_compile); then
+ case `"$MAGIC_CMD" conftest.$ac_objext` in
+ *"ELF 64"*)
+ xine_cv_cc_64bit_output=yes
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
+ case $host_cpu:$xine_cv_cc_64bit_output in
+ powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+ XINE_LIBNAME="lib64"
+ ;;
+ *:*)
+ XINE_LIBNAME="lib"
+ ;;
+ esac
+ AC_MSG_RESULT([$XINE_LIBNAME])
+
if test "x$libFLAC_libraries" != "x" ; then
LIBFLAC_LIBS="-L$libFLAC_libraries"
elif test "x$libFLAC_prefix" != "x" ; then
diff --git a/m4/libfame.m4 b/m4/libfame.m4
deleted file mode 100644
index 5fc34cc56..000000000
--- a/m4/libfame.m4
+++ /dev/null
@@ -1,183 +0,0 @@
-dnl AM_PATH_LIBFAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for libfame, and define LIBFAME_CFLAGS and LIBFAME_LIBS
-dnl Vivien Chappelier 12/11/00
-dnl stolen from ORBit autoconf
-dnl
-AC_DEFUN([AM_PATH_LIBFAME],
-[dnl
-dnl Get the cflags and libraries from the libfame-config script
-dnl
-AC_ARG_WITH(libfame-prefix, AS_HELP_STRING([--with-libfame-prefix=DIR], [prefix where libfame is installed (optional)]),
- libfame_config_prefix="$withval", libfame_config_prefix="")
-AC_ARG_WITH(libfame-exec-prefix, AS_HELP_STRING([--with-libfame-exec-prefix=DIR], [exec prefix where libfame is installed (optional)]),
- libfame_config_exec_prefix="$withval", libfame_config_exec_prefix="")
-AC_ARG_ENABLE(libfametest, AS_HELP_STRING([--disable-libfametest], [do not try to compile and run a test libfame program]),
- enable_libfametest=$enableval, enable_libfametest=yes)
-
- if test x$libfame_config_exec_prefix != x ; then
- libfame_config_args="$libfame_config_args --exec-prefix=$libfame_config_exec_prefix"
- if test x${LIBFAME_CONFIG+set} != xset ; then
- LIBFAME_CONFIG=$libfame_config_exec_prefix/bin/libfame-config
- fi
- fi
- if test x$libfame_config_prefix != x ; then
- libfame_config_args="$libfame_config_args --prefix=$libfame_config_prefix"
- if test x${LIBFAME_CONFIG+set} != xset ; then
- LIBFAME_CONFIG=$libfame_config_prefix/bin/libfame-config
- fi
- fi
-
- AC_PATH_TOOL(LIBFAME_CONFIG, libfame-config, no)
- min_libfame_version=ifelse([$1], , 0.9.0, $1)
- AC_MSG_CHECKING(for libfame - version >= $min_libfame_version)
- no_libfame=""
- if test "$LIBFAME_CONFIG" = "no" ; then
- no_libfame=yes
- else
- LIBFAME_CFLAGS=`$LIBFAME_CONFIG $libfame_config_args --cflags`
- LIBFAME_LIBS=`$LIBFAME_CONFIG $libfame_config_args --libs`
- libfame_config_major_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- libfame_config_minor_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- libfame_config_micro_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_libfametest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
- LIBS="$LIBFAME_LIBS $LIBS"
-dnl
-dnl Now check if the installed LIBFAME is sufficiently new. (Also sanity
-dnl checks the results of libfame-config to some extent
-dnl
- rm -f conf.libfametest
- AC_TRY_RUN([
-#include <fame.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.libfametest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = strdup("$min_libfame_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_libfame_version");
- exit(1);
- }
-
- if ((libfame_major_version != $libfame_config_major_version) ||
- (libfame_minor_version != $libfame_config_minor_version) ||
- (libfame_micro_version != $libfame_config_micro_version))
- {
- printf("\n*** 'libfame-config --version' returned %d.%d.%d, but Libfame (%d.%d.%d)\n",
- $libfame_config_major_version, $libfame_config_minor_version, $libfame_config_micro_version,
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- printf ("*** was found! If libfame-config was correct, then it is best\n");
- printf ("*** to remove the old version of libfame. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If libfame-config was wrong, set the environment variable LIBFAME_CONFIG\n");
- printf("*** to point to the correct copy of libfame-config, and remove the file config.cache\n");
- printf("*** before re-running configure\n");
- }
-#if defined (LIBFAME_MAJOR_VERSION) && defined (LIBFAME_MINOR_VERSION) && defined (LIBFAME_MICRO_VERSION)
- else if ((libfame_major_version != LIBFAME_MAJOR_VERSION) ||
- (libfame_minor_version != LIBFAME_MINOR_VERSION) ||
- (libfame_micro_version != LIBFAME_MICRO_VERSION))
- {
- printf("*** libfame header files (version %d.%d.%d) do not match\n",
- LIBFAME_MAJOR_VERSION, LIBFAME_MINOR_VERSION, LIBFAME_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- }
-#endif /* defined (LIBFAME_MAJOR_VERSION) ... */
- else
- {
- if ((libfame_major_version > major) ||
- ((libfame_major_version == major) && (libfame_minor_version > minor)) ||
- ((libfame_major_version == major) && (libfame_minor_version == minor) && (libfame_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of libfame (%d.%d.%d) was found.\n",
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- printf("*** You need a version of libfame newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** libfame is always available from http://www-eleves.enst-bretagne.fr/~chappeli/fame\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the libfame-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of libfame, but you can also set the LIBFAME_CONFIG environment to point to the\n");
- printf("*** correct copy of libfame-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_libfame=yes,
- AC_TRY_LINK([
-#include <fame.h>
-#include <stdio.h>
-], [ return 0; ],, no_libfame=yes))
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_libfame" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$LIBFAME_CONFIG" = "no" ; then
- echo "*** The libfame-config script installed by libfame could not be found"
- echo "*** If libfame was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the LIBFAME_CONFIG environment variable to the"
- echo "*** full path to libfame-config."
- else
- if test -f conf.libfametest ; then
- :
- else
- echo "*** Could not run libfame test program, checking why..."
- CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
- LIBS="$LIBS $LIBFAME_LIBS"
- AC_TRY_LINK([
-#include <fame.h>
-#include <stdio.h>
-], [ return ((libfame_major_version) || (libfame_minor_version) || (libfame_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding libfame or finding the wrong"
- echo "*** version of LIBFAME. If it is not finding libfame, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means libfame was incorrectly installed"
- echo "*** or that you have moved libfame since it was installed. In the latter case, you"
- echo "*** may want to edit the libfame-config script: $LIBFAME_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- ifelse([$3], , :, [$3])
- fi
-
- AC_SUBST(LIBFAME_CFLAGS)
- AC_SUBST(LIBFAME_LIBS)
- rm -f conf.libfametest
-])
diff --git a/m4/libtool15.m4 b/m4/libtool15.m4
deleted file mode 100644
index 1f0567787..000000000
--- a/m4/libtool15.m4
+++ /dev/null
@@ -1,6168 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-##
-## This file is free software; the Free Software Foundation gives
-## unlimited permission to copy and/or distribute it, with or without
-## modifications, as long as this notice is preserved.
-
-# serial 47 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
- [],
- [m4_define([AC_PROVIDE_IFELSE],
- [m4_ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
- ])])
-dnl And a similar setup for Fortran 77 support
- AC_PROVIDE_IFELSE([AC_PROG_F77],
- [AC_LIBTOOL_F77],
- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ],
- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-[$]*
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
- echo_test_string="`eval $cmd`" &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
- then
- break
- fi
- done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
-else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
- ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $rm conftest*
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$5], , :, [$5])
-else
- ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$4], , :, [$4])
-else
- ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- *)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
- = "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}]
-EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_unknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $rm -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
- $SED '/^$/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w .
- $rm conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
- $rm out/* && rmdir out
- cd ..
- rmdir conftest
- $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
- test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existant directories.
- if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_AC_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_AC_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
-fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"; shrext="$shrext_cmds"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- shrext_cmds=".dll"; shrext="$shrext_cmds"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'; shrext="$shrext_cmds"
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-kfreebsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- *) # from 3.2 on
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case "$host_cpu" in
- ia64*)
- shrext_cmds='.so'; shrext="$shrext_cmds"
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'; shrext="$shrext_cmds"
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'; shrext="$shrext_cmds"
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-nto-qnx*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"; shrext="$shrext_cmds"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-sco3.2v5*)
- version_type=osf
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
- [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@],
- [include additional configurations @<:@automatic@:>@])],
- [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
- if test ! -f "${ofile}"; then
- AC_MSG_WARN([output file `$ofile' does not exist])
- fi
-
- if test -z "$LTCC"; then
- eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
- if test -z "$LTCC"; then
- AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
- else
- AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
- fi
- fi
-
- # Extract list of available tagged configurations in $ofile.
- # Note that this assumes the entire list is on one line.
- available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for tagname in $tagnames; do
- IFS="$lt_save_ifs"
- # Check whether tagname contains only valid characters
- case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
- "") ;;
- *) AC_MSG_ERROR([invalid tag name: $tagname])
- ;;
- esac
-
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
- then
- AC_MSG_ERROR([tag name \"$tagname\" already exists])
- fi
-
- # Update the list of available tags.
- if test -n "$tagname"; then
- echo appending configuration tag \"$tagname\" to $ofile
-
- case $tagname in
- CXX)
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_LIBTOOL_LANG_CXX_CONFIG
- else
- tagname=""
- fi
- ;;
-
- F77)
- if test -n "$F77" && test "X$F77" != "Xno"; then
- AC_LIBTOOL_LANG_F77_CONFIG
- else
- tagname=""
- fi
- ;;
-
- GCJ)
- if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
- AC_LIBTOOL_LANG_GCJ_CONFIG
- else
- tagname=""
- fi
- ;;
-
- RC)
- AC_LIBTOOL_LANG_RC_CONFIG
- ;;
-
- *)
- AC_MSG_ERROR([Unsupported tag name: $tagname])
- ;;
- esac
-
- # Append the new tag name to the list of available tags.
- if test -n "$tagname" ; then
- available_tags="$available_tags $tagname"
- fi
- fi
- done
- IFS="$lt_save_ifs"
-
- # Now substitute the updated list of available tags.
- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
- mv "${ofile}T" "$ofile"
- chmod +x "$ofile"
- else
- rm -f "${ofile}T"
- AC_MSG_ERROR([unable to update list of available tagged configurations.])
- fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
- [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | kfreebsd*-gnu | dragonfly*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case "$host_cpu" in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-nto-qnx*)
- lt_cv_deplibs_check_method=unknown
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/${ac_tool_prefix}nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- esac
- fi
- done
- IFS="$lt_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
-# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!). If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, lt_dlinit,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- LTDLINCL=
- fi
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-# _LT_AC_PROG_CXXCPP
-# ---------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-fi
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# --------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
- case $host_os in
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
- ;;
- esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
- AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
- _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
- fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
- $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
- [],
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-# Report which librarie types wil actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cc
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
- unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
-else
- unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- AC_PROG_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
- grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
- GXX=no
- with_gnu_ld=no
- wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GXX" = yes ; then
- lt_int_apple_cc_single_mod=no
- output_verbose_link_cmd='echo'
- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
- lt_int_apple_cc_single_mod=yes
- fi
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- fi
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before switch to ELF
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- freebsd-elf*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- ;;
- gnu*)
- ;;
- hpux9*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- *)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case "$host_cpu" in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case "$host_cpu" in
- ia64*|hppa*64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
- fi
- fi
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
- linux*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc*)
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC*)
- # Portland Group C++ compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- esac
- ;;
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd='echo'
- ;;
- osf3*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
- $rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- psos*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- sco*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
- ;;
- esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | grep -v '^2\.7' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
- fi
-
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- fi
- ;;
- esac
- ;;
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- # The `*' in the case matches for architectures that use `case' in
- # $output_verbose_cmd can trigger glob expansion during the loop
- # eval without this substitution.
- output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
-
- for p in `eval $output_verbose_link_cmd`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" \
- || test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
- _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
- _LT_AC_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
- _LT_AC_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-aix4* | aix5*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined. Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars. Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- # See if we are running on zsh, and set the options which allow our commands through
- # without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
- SED SHELL STRIP \
- libname_spec library_names_spec soname_spec extract_expsyms_cmds \
- old_striplib striplib file_magic_cmd finish_cmds finish_eval \
- deplibs_check_method reload_flag reload_cmds need_locks \
- lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
- lt_cv_sys_global_symbol_to_c_name_address \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- old_postinstall_cmds old_postuninstall_cmds \
- _LT_AC_TAGVAR(compiler, $1) \
- _LT_AC_TAGVAR(CC, $1) \
- _LT_AC_TAGVAR(LD, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
- _LT_AC_TAGVAR(old_archive_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
- _LT_AC_TAGVAR(predep_objects, $1) \
- _LT_AC_TAGVAR(postdep_objects, $1) \
- _LT_AC_TAGVAR(predeps, $1) \
- _LT_AC_TAGVAR(postdeps, $1) \
- _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
- _LT_AC_TAGVAR(archive_cmds, $1) \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
- _LT_AC_TAGVAR(postinstall_cmds, $1) \
- _LT_AC_TAGVAR(postuninstall_cmds, $1) \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
- _LT_AC_TAGVAR(allow_undefined_flag, $1) \
- _LT_AC_TAGVAR(no_undefined_flag, $1) \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
- _LT_AC_TAGVAR(hardcode_automatic, $1) \
- _LT_AC_TAGVAR(module_cmds, $1) \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) \
- _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
- _LT_AC_TAGVAR(exclude_expsyms, $1) \
- _LT_AC_TAGVAR(include_expsyms, $1); do
-
- case $var in
- _LT_AC_TAGVAR(old_archive_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
- _LT_AC_TAGVAR(archive_cmds, $1) | \
- _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(module_cmds, $1) | \
- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
- _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
- extract_expsyms_cmds | reload_cmds | finish_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- case $lt_echo in
- *'\[$]0 --fallback-echo"')
- lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
- ;;
- esac
-
-ifelse([$1], [],
- [cfgfile="${ofile}T"
- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
- $rm -f "$cfgfile"
- AC_MSG_NOTICE([creating $ofile])],
- [cfgfile="$ofile"])
-
- cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'; shrext="$shrext_cmds"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
- case $host_os in
- aix3*)
- cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-EOF
- ;;
- esac
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" || \
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-])
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
- if test -f "$ltmain_in"; then
- test -f Makefile && make "$ltmain"
- fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-linux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDGIRSTW]]'
- lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris* | sysv5*)
- symcode='[[BDRT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#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.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if grep ' nm_test_var$' "$nlist" >/dev/null; then
- if grep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | os2* | pw32*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case "$host_cpu" in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix4* | aix5*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | kfreebsd*-gnu | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- case "$host_cpu" in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux*)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- icpc* | ecpc*)
- # Intel C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC*)
- # Portland Group C++ compiler.
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- sco*)
- case $cc_basename in
- CC*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- *)
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- unixware*)
- ;;
- vxworks*)
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
-
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case "$host_cpu" in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- case $cc_basename in
- xlc*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
-
- mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case "$host_cpu" in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- newsos6)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- linux*)
- case $cc_basename in
- icc* | ecc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgcc* | pgf77* | pgf90*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- ccc*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- esac
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- sco3.2v5*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
- ;;
-
- solaris*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- unicos*)
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
- _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
- [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case "$host_os" in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix4* | aix5*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- *)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-],[
- runpath_var=
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)=
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
- _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_AC_TAGVAR(hardcode_automatic, $1)=no
- _LT_AC_TAGVAR(module_cmds, $1)=
- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_AC_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- extract_expsyms_cmds=
- # Just being paranoid about ensuring that cc_basename is set.
- _LT_CC_BASENAME([$compiler])
- case $host_os in
- cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>/dev/null` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- fi
- ;;
-
- amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can't use
- # them.
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32*)
- # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- linux*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- tmp_addflag=
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test $supports_anon_versioning = yes; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- $echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sunos4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_AC_TAGVAR(archive_cmds, $1)=''
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- else
- # We have old collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an empty executable.
- _LT_AC_SYS_LIBPATH_AIX
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # -bexpall does not export symbols beginning with underscore (_)
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
- # Exported symbols can be pulled into shared objects from archives
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds it's shared libraries.
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- # see comment about different semantics on the GNU ld section
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- bsdi[[45]]*)
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"; shrext="$shrext_cmds"
- # FIXME: Setting linknames here is a bad hack.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
- _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
- ;;
- *) # Darwin 1.3 on
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- else
- case ${MACOSX_DEPLOYMENT_TARGET} in
- 10.[[012]])
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
- ;;
- 10.*)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
- ;;
- esac
- fi
- ;;
- esac
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- if test "$GCC" = yes ; then
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- else
- case $cc_basename in
- xlc*)
- output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- ;;
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
- ;;
-
- dgux*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu | dragonfly*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10* | hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case "$host_cpu" in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- case "$host_cpu" in
- hppa*64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- *)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- sco3.2v5*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
- solaris*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
- else
- wlarc=''
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
- esac
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_AC_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4.2uw2*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- runpath_var='LD_RUN_PATH'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv5*)
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -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
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_AC_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
- AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_MSG_RESULT([$SED])
-])
diff --git a/m4/macosx.m4 b/m4/macosx.m4
new file mode 100644
index 000000000..0151b41e9
--- /dev/null
+++ b/m4/macosx.m4
@@ -0,0 +1,43 @@
+AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [
+ AC_ARG_ENABLE([macosx-universal],
+ AS_HELP_STRING([--enable-macosx-universal], [build universal binaries for Mac OS X)]),
+ [], [enable_macosx_universal="no"])
+ if test x"$enable_macosx_universal" != x"no" ; then
+ case "$host_os" in
+ *darwin*)
+ dnl x64_64 and ppc64 binaries could also be built, but there is no
+ dnl version of Mac OS X currently shipping that can run them, so
+ dnl do not enable them by default for now.
+ if test x"$enable_macosx_universal" = x"yes" ; then
+ UNIVERSAL_ARCHES="i386 ppc"
+ else
+ UNIVERSAL_ARCHES=`echo "$enable_macosx_universal" | sed -e 's/,/ /g'`
+ fi
+ ;;
+ *)
+ AC_MSG_ERROR([Universal binaries can only be built on Darwin])
+ ;;
+ esac
+ AC_SUBST(UNIVERSAL_ARCHES)
+
+ CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+ LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
+
+ if test x"$UNIVERSAL_ARCHES" != x"" ; then
+ # Forcibly disable dependency tracking for Universal builds, because -M
+ # does not work with multiple -arch arguments on the gcc command-line.
+ ac_tool_warned=yes
+ cross_compiling=yes
+ enable_dependency_tracking=no
+ host="`echo $host | sed -e s/$host_cpu/universal/g`"
+ host_cpu=universal
+
+ AC_DEFINE([XINE_MACOSX_UNIVERSAL_BINARY], 1, [Define this if a universal binary is being built for Mac OS X])
+ for arch in $UNIVERSAL_ARCHES ; do
+ UNIVERSAL_CFLAGS="$UNIVERSAL_CFLAGS -arch $arch"
+ UNIVERSAL_LDFLAGS="$UNIVERSAL_LDFLAGS -arch $arch"
+ done
+ fi
+ fi
+ AM_CONDITIONAL([MACOSX_UNIVERSAL_BINARY], [test x"$enable_macosx_universal" = x"yes"])
+])dnl MACOSX_UNIVERSAL_BINARIES
diff --git a/m4/objc.m4 b/m4/objc.m4
new file mode 100644
index 000000000..73dd8b6a0
--- /dev/null
+++ b/m4/objc.m4
@@ -0,0 +1,253 @@
+# Extracted from autoconf 2.61 to obtain Objective C macros.
+# Only expand if the version of autoconf in use doesn't have the macro itself.
+m4_ifdef([AC_PROG_OBJC], [], [
+
+# This file is part of Autoconf. -*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf. You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them. The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf. We call these the "data" portions. The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case. We call these
+# comments and executable code the "non-data" portions. Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation. When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with. (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.) If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Akim Demaille, Paul Eggert,
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# ------------------------------ #
+# 1d. The Objective C language. #
+# ------------------------------ #
+
+
+# AC_LANG(Objective C)
+# --------------------
+m4_define([AC_LANG(Objective C)],
+[ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+])
+
+
+# AC_LANG_OBJC
+# ------------
+AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)])
+
+
+# _AC_LANG_ABBREV(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_ABBREV(Objective C)], [objc])
+
+
+# _AC_LANG_PREFIX(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC])
+
+
+# ------------------------- #
+# 2d. Objective C sources. #
+# ------------------------- #
+
+# AC_LANG_SOURCE(Objective C)(BODY)
+# ---------------------------------
+m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)])
+
+
+# AC_LANG_PROGRAM(Objective C)([PROLOGUE], [BODY])
+# ------------------------------------------------
+m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(Objective C)])
+
+
+# AC_LANG_CALL(Objective C)(PROLOGUE, FUNCTION)
+# ---------------------------------------------
+m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(Objective C)])
+
+
+# AC_LANG_FUNC_LINK_TRY(Objective C)(FUNCTION)
+# --------------------------------------------
+m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(Objective C)])
+
+
+# AC_LANG_BOOL_COMPILE_TRY(Objective C)(PROLOGUE, EXPRESSION)
+# -----------------------------------------------------------
+m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(Objective C)])
+
+
+# AC_LANG_INT_SAVE(Objective C)(PROLOGUE, EXPRESSION)
+# ---------------------------------------------------
+m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(Objective C)])
+
+
+# ------------------------------ #
+# 3d. The Objective C compiler. #
+# ------------------------------ #
+
+# AC_LANG_PREPROC(Objective C)
+# ----------------------------
+# Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+m4_defun([AC_LANG_PREPROC(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJCPP])])
+
+
+# AC_PROG_OBJCPP
+# --------------
+# Find a working Objective C preprocessor.
+AC_DEFUN([AC_PROG_OBJCPP],
+[AC_REQUIRE([AC_PROG_OBJC])dnl
+AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+AC_LANG_PUSH(Objective C)dnl
+AC_MSG_CHECKING([how to run the Objective C preprocessor])
+if test -z "$OBJCPP"; then
+ AC_CACHE_VAL(ac_cv_prog_OBJCPP,
+ [dnl
+ # Double quotes because OBJCPP needs to be expanded
+ for OBJCPP in "$OBJC -E" "/lib/cpp"
+ do
+ _AC_PROG_PREPROC_WORKS_IFELSE([break])
+ done
+ ac_cv_prog_OBJCPP=$OBJCPP
+ ])dnl
+ OBJCPP=$ac_cv_prog_OBJCPP
+else
+ ac_cv_prog_OBJCPP=$OBJCPP
+fi
+AC_MSG_RESULT([$OBJCPP])
+_AC_PROG_PREPROC_WORKS_IFELSE([],
+ [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])])
+AC_SUBST(OBJCPP)dnl
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJCPP
+
+
+# AC_LANG_COMPILER(Objective C)
+# -----------------------------
+# Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+m4_defun([AC_LANG_COMPILER(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJC])])
+
+
+
+# AC_PROG_OBJC([LIST-OF-COMPILERS])
+# ---------------------------------
+# LIST-OF-COMPILERS is a space separated list of Objective C compilers to
+# search for (if not specified, a default list is used). This just gives
+# the user an opportunity to specify an alternative search list for the
+# Objective C compiler.
+# objcc StepStone Objective-C compiler (also "standard" name for OBJC)
+# objc David Stes' POC. If you installed this, you likely want it.
+# cc Native C compiler (for instance, Apple).
+# CC You never know.
+AN_MAKEVAR([OBJC], [AC_PROG_OBJC])
+AN_PROGRAM([objcc], [AC_PROG_OBJC])
+AN_PROGRAM([objc], [AC_PROG_OBJC])
+AC_DEFUN([AC_PROG_OBJC],
+[AC_LANG_PUSH(Objective C)dnl
+AC_ARG_VAR([OBJC], [Objective C compiler command])dnl
+AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+dnl _AC_ARG_VAR_LIBS()dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+_AC_ARG_VAR_PRECIOUS([OBJC])dnl
+AC_CHECK_TOOLS(OBJC,
+ [m4_default([$1], [gcc objcc objc cc CC])],
+ gcc)
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+_AC_LANG_COMPILER_GNU
+GOBJC=`test $ac_compiler_gnu = yes && echo yes`
+_AC_PROG_OBJC_G
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJC
+
+
+# _AC_PROG_OBJC_G
+# ---------------
+# Check whether -g works, even if OBJCFLAGS is set, in case the package
+# plays around with OBJCFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
+# Don't consider -g to work if it generates warnings when plain compiles don't.
+m4_define([_AC_PROG_OBJC_G],
+[ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g,
+ [ac_save_objc_werror_flag=$ac_objc_werror_flag
+ ac_objc_werror_flag=yes
+ ac_cv_prog_objc_g=no
+ OBJCFLAGS="-g"
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_prog_objc_g=yes],
+ [OBJCFLAGS=""
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [],
+ [ac_objc_werror_flag=$ac_save_objc_werror_flag
+ OBJCFLAGS="-g"
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_prog_objc_g=yes])])])
+ ac_objc_werror_flag=$ac_save_objc_werror_flag])
+if test "$ac_test_OBJCFLAGS" = set; then
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-g -O2"
+ else
+ OBJCFLAGS="-g"
+ fi
+else
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-O2"
+ else
+ OBJCFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_OBJC_G
+])dnl m4_ifdef([AC_PROG_OBJC])
diff --git a/m4/opengl.m4 b/m4/opengl.m4
deleted file mode 100644
index 2c12949d9..000000000
--- a/m4/opengl.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-dnl
-dnl Check for OpenGL & GLU
-dnl
-dnl AM_PATH_OPENGL([ACTION IF FOUND [, ACTION IF NOT FOUND]])
-dnl
-
-AC_DEFUN([AM_PATH_OPENGL], [
-
- AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [do not build OpenGL plugin]),
- [enableopengl=$enableval],
- [enableopengl="yes"]
- )
- AC_ARG_ENABLE(glu, AS_HELP_STRING([--disable-glu], [build OpenGL plugin without GLU (no verbose errors)]),
- [enableglu=$enableval],
- [enableglu="yes"]
- )
-
- if test x$enableopengl = "xyes"; then
- AC_CHECK_LIB(GL, glBegin,
- [AC_CHECK_LIB(m, tan,
- [AC_CHECK_HEADER(GL/gl.h,
- [ac_have_opengl="yes"
- OPENGL_LIBS="-lGL -lm"
- AC_DEFINE(HAVE_OPENGL,1,[Define this if you have OpenGL support available])
- dnl
- dnl need to check with some test if this linking with -lGLU actually works...
- dnl check for GLU
- dnl
- if test x$enableglu = "xyes"; then
- AC_CHECK_LIB(GLU, gluPerspective,
- [AC_CHECK_HEADER(GL/glu.h,
- [AC_MSG_CHECKING([if GLU is sane])
- ac_save_LIBS="$LIBS"
- LIBS="$X_LIBS $XPRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h>
-#include <GL/glu.h>]], [[ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ]])],
- [ ac_have_glu="yes"
- GLU_LIBS="-lGLU"
- AC_DEFINE(HAVE_GLU,1,[Define this if you have GLU support available])
- AC_MSG_RESULT(yes)],
- [ AC_MSG_RESULT(no)
- echo "*** GLU doesn't link with GL; GLU is disabled ***"])
- LIBS="$ac_save_LIBS"]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS]
- )
- fi
- ]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS -lGL -lm $X_EXTRA_LIBS]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS]
- )
- if test x$ac_have_opengl = "xyes"; then
- ac_use_opengl=yes
- fi
- fi
-
- AC_SUBST(OPENGL_CFLAGS)
- AC_SUBST(OPENGL_LIBS)
- AC_SUBST(GLU_LIBS)
- AM_CONDITIONAL(HAVE_OPENGL, [test x$ac_use_opengl = "xyes"])
-
- dnl result
- if test x$ac_use_opengl = "xyes"; then
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
-
-])
diff --git a/m4/optimizations.m4 b/m4/optimizations.m4
deleted file mode 100644
index cc5e7c524..000000000
--- a/m4/optimizations.m4
+++ /dev/null
@@ -1,259 +0,0 @@
-dnl
-dnl M4 macro to add support for extra optimizations
-dnl
-dnl It understand --enable/--disable-optimizations .
-dnl when optimizations are disabled, it does not touch cflags
-dnl
-dnl Note: always disable while crosscompiling
-dnl
-
-AC_DEFUN([AC_OPTIMIZATIONS], [
- AC_ARG_ENABLE([optimizations],
- AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable]))
-
- if test "x$enable_optimizations" != "xno"; then
- INLINE_FUNCTIONS=-finline-functions
-
- if test "$GCC" = yes; then
- dnl
- dnl check cflags not supported by all gcc versions
- AC_TRY_CFLAGS("-fschedule-insns2", f_si="-fschedule-insns2", f_si="")
- AC_TRY_CFLAGS("-mwide-multiply", m_wm="-mwide-multiply", m_wm="")
- dnl
- dnl gcc 3.1 uses the -f version
- dnl
- AC_TRY_CFLAGS("-falign-functions=4", f_af="-falign-functions=4",
- f_af="-malign-functions=4")
- AC_TRY_CFLAGS("-falign-loops=4", f_al="-falign-loops=4",
- f_al="-malign-loops=4")
- AC_TRY_CFLAGS("-falign-jumps=4", f_aj="-falign-jumps=4",
- f_aj="-malign-jumps=4")
- dnl
- dnl Check for some optimization disabling
- dnl needed for win32 code
- dnl
- AC_TRY_CFLAGS("-fno-omit-frame-pointer", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-omit-frame-pointer",)
- AC_TRY_CFLAGS("-fno-inline-functions", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions",)
- AC_TRY_CFLAGS("-fno-rename-registers", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers",)
- AC_SUBST(W32_NO_OPTIMIZE)
- dnl
- dnl Multipass compilation
- dnl
- AC_TRY_CFLAGS("-fprofile-arcs", PASS1_CFLAGS="-fprofile_arcs $PASS1_CFLAGS",)
- AC_TRY_CFLAGS("-fbranch-probabilities", PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS",)
- AC_SUBST(PASS1_CFLAGS)
- AC_SUBST(PASS2_CFLAGS)
- dnl
- dnl Warnings
- dnl
- CFLAGS="-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes $CFLAGS"
- CFLAGS="-Wnested-externs -Wcast-align $CFLAGS"
- dnl some combinations of gcc+glibc produce useless warnings on memset
- dnl when compiling with -Wpointer-arith, so we check for this first
- AC_MSG_CHECKING(for sane -Wpointer-arith)
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="-O2 -Wpointer-arith -Werror $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int));]])],
- [AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"],
- [AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]);
-
- dnl gcc 3.3.5 (at least) is known to be buggy wrt optimisation and
- dnl -finline-functions. Use -fno-inline-functions for gcc < 3.4.0.
-
- AC_MSG_CHECKING(for gcc 3.4.0 or later)
- newGCC="`"$CC" -dumpversion |
- awk -F. '{ if ((@S|@1 * 10000 + @S|@2 * 100 + @S|@3) >= 30400) { print "yes" } }'
- `"
- AC_MSG_RESULT(${newGCC:-no - assuming bugginess in -finline-functions})
- test "$newGCC" = yes || INLINE_FUNCTIONS=-fno-inline-functions
- fi
-
- dnl Flags not supported by all *cc* variants
- AC_TRY_CFLAGS("-Wall", wall="-Wall", wall="")
-
- CFLAGS="$wall ${CFLAGS}"
- DEBUG_CFLAGS="$wall ${DEBUG_CFLAGS}"
-
- if test "$enable_macosx_universal"; then
- optimize_for_host="universal-darwin"
- else
- optimize_for_host="$host_or_hostalias"
- fi
-
- case "$optimize_for_host" in
- i?86-* | k?-* | athlon-* | pentium*)
- if test "$GCC" = yes -o "${CC##*/}x" = "iccx" ; then
-
- if test "$GCC" = yes; then
- dnl Check for gcc cpu optimization support
- AC_TRY_CFLAGS("-mtune=i386",
- sarchopt="-mtune",
- AC_TRY_CFLAGS("-mcpu=i386",
- sarchopt="-mcpu",
- AC_TRY_CFLAGS("-march=i386",
- sarchopt="-march",
- [ AC_MSG_RESULT(** no cpu optimization supports **)
- sarchopt=no
- ]
- )
- )
- )
-
- dnl special check for k7 cpu CC support
- AC_TRY_CFLAGS("$sarchopt=athlon", k7cpu="athlon", k7cpu="i686")
-
- dnl add x86 specific gcc CFLAGS
- CFLAGS="-O3 -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
-
- DEBUG_CFLAGS="-O $DEBUG_CFLAGS"
-
- if test x"$sarchopt" != "xno"; then
- archopt_val=
-
- case "$host_or_hostalias" in
- i386-*)
- archopt_val="i386" ;;
- i486-*)
- archopt_val="i486" ;;
- i586-*)
- archopt_val="pentium"
- ;;
- pentium-mmx-*)
- archopt_val="pentium-mmx"
- ;;
- pentiumpro-* | pentium2-* | i686-*)
- archopt_val="pentiumpro"
- if test x"$check_athlon" = "xyes"; then
- if test -f /proc/cpuinfo; then
- modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d':' -f2`
- case "$modelname" in
- *Athlon* | *Duron* | *K7*)
- archopt_val="$k7cpu"
- ;;
- VIAEzra)
- archopt_val="c3"
- ;;
- esac
- fi
- fi
- ;;
- k6-2-* | k6-3-*)
- archopt_val="k6-2"
- ;;
- k6-*)
- archopt_val="k6"
- ;;
- pentium3-*)
- archopt_val="pentium3"
- ;;
- pentium4-*)
- archopt_val="pentium4"
- ;;
- athlon-4-* | athlon-xp-* | athlon-mp-*)
- archopt_val="athlon-4"
- ;;
- k7-* | athlon-tbird-* | athlon-*)
- archopt_val="athlon"
- ;;
-
- esac
- if test x"$archopt_val" != x; then
- CFLAGS="$sarchopt=$archopt_val $CFLAGS"
- DEBUG_CFLAGS="$sarchopt=$archopt_val $DEBUG_CFLAGS"
- fi
- fi
- else
- dnl we have the Intel compiler
- CFLAGS="-unroll -ipo -ipo_obj -O3 $CFLAGS"
- PASS1_CFLAGS="-prof_genx -prof_dir \$(PWD)/\$(top_builddir)/ $PASS1_CFLAGS"
- PASS2_CFLAGS="-prof_use -prof_dir \$(PWD)/\$(top_builddir)/ $PASS2_CFLAGS"
- AC_SUBST(PASS1_CFLAGS)
- AC_SUBST(PASS2_CFLAGS)
- fi
-
- else
- dnl add x86 specific cc CFLAGS
- CFLAGS="-O $CFLAGS"
- DEBUG_CFLAGS="-O $DEBUG_CFLAGS"
- AC_DEFINE_UNQUOTED(FPM_64BIT,,[Define to select libmad fixed point arithmetic implementation])
- fi
- ;;
- alphaev56-*)
- CFLAGS="-O3 -mcpu=ev56 -mieee $CFLAGS"
- DEBUG_CFLAGS="-O3 -mcpu=ev56 -mieee $DEBUG_CFLAGS"
- ;;
- alpha*)
- CFLAGS="-O3 -mieee $CFLAGS"
- DEBUG_CFLAGS="-O3 -mieee $DEBUG_CFLAGS"
- ;;
- *darwin*)
- CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS -no-cpp-precomp -D_INTL_REDIRECT_MACROS $CFLAGS"
- OBJCFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS -no-cpp-precomp -D_INTL_REDIRECT_MACROS $CFLAGS"
- DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS"
- ;;
- ppc-*-linux* | powerpc-*)
- CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS"
- ;;
- sparc*-*-linux*)
- CFLAGS="-O3 $cpu_cflags $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-O $cpu_cflags $INLINE_FUNCTIONS $DEBUG_CFLAGS"
-
- case `uname -m` in
- sparc)
- cpu_cflags="-mcpu=supersparc -mtune=supersparc" ;;
- sparc64)
- cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc" ;;
- esac
- ;;
- sparc-*-solaris*)
- if test "$GCC" = yes; then
- case `uname -m` in
- sun4c) cpu_cflags="-mcpu=v7 -mtune=supersparc" ;;
- sun4m) cpu_cflags="-mcpu=v8 -mtune=supersparc" ;;
- sun4u)
- case `$CC --version 2>/dev/null` in
- 1.*|2.*)
- # -mcpu=ultrasparc triggers a GCC 2.95.x compiler bug when
- # compiling video_out.c:
- # gcc: Internal compiler error: program cc1 got fatal signal 11
- # avoid -mcpu=ultrasparc with gcc 2.*
- cpu_cflags="-mcpu=v8 -mtune=ultrasparc"
- ;;
- *)
- # GCC 3 or newer should have no problem with -mcpu=ultrasparc
- cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc"
- ;;
- esac
- ;;
- esac
- cc_optimize_cflags="-O3 $cpu_cflags $INLINE_FUNCTIONS"
- cc_debug_cflags="-O $cpu_cflags $INLINE_FUNCTIONS"
- else
- case `uname -m` in
- sun4c) cpu_cflags="-xarch=v7" ;;
- sun4m) cpu_cflags="-xarch=v8" ;;
- sun4u) cpu_cflags="-xarch=v8plusa" ;;
- esac
- cc_optimize_cflags="-fast $cpu_cflags -xCC"
- cc_debug_cflags="-O"
- fi
-
- CFLAGS="$cc_optimize_cflags $CFLAGS"
- DEBUG_CFLAGS="$cc_debug_cflags $DEBUG_CFLAGS"
- ;;
- x86_64-*)
- CFLAGS="-O3 -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-g $DEBUG_CFLAGS"
- ;;
- armv4l-*-linux*)
- CFLAGS="-O2 -fsigned-char -ffast-math -mcpu=strongarm1100 -fomit-frame-pointer -fthread-jumps -fregmove $CFLAGS"
- dnl CFLAGS="-O1 -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 $INLINE_FUNCTIONS -fsigned-char -fomit-frame-pointer -march=armv4 -mtune=strongarm $CFLAGS"
- DEBUG_CFLAGS="-O2 $DEBUG_CFLAGS"
- ;;
- esac
- fi
-])
-
-dnl Kate modeline: leave at the end
-dnl kate: indent-width 2; replace-trailing-space-save 1; space-indent 1; backspace-indents 1;
diff --git a/m4/package.m4 b/m4/package.m4
new file mode 100644
index 000000000..69f721440
--- /dev/null
+++ b/m4/package.m4
@@ -0,0 +1,72 @@
+dnl _ACX_VERSION_PARSE(version)
+AC_DEFUN([_ACX_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v;
+my @v = split(" ", $v); $v = $v[[@S|@#v]]; $v =~ s/[[^0-9.]].*$//; @v = split (/\./, $v);
+push @v, 0 while $[#v] < 2; print $v[[0]] * 10000 + $v[[1]] * 100 + $v[[2]], "\n"'`])
+
+dnl ACX_VERSION_CHECK(required, actual)
+AC_DEFUN([ACX_VERSION_CHECK], [
+ required_version=ifelse([$1], , [0.0.0], [$1])
+ required_version_parsed=_ACX_VERSION_PARSE([$required_version])
+ actual_version=ifelse([$2], , [0.0.0], [$2])
+ actual_version_parsed=_ACX_VERSION_PARSE([$actual_version])
+ if test $required_version_parsed -le $actual_version_parsed; then
+ ifelse([$3], , [:], [$3])
+ else
+ ifelse([$4], , [:], [$4])
+ fi
+])
+
+AC_DEFUN([ASX_TR_LOWER], [m4_translit([[$1]], [ABCDEFGHIJKLMNOPQRSTUVWXYZ], [abcdefghijklmnopqrstuvwxyz])])
+
+dnl ACX_PACKAGE_CHECK(VARIABLE-PREFIX, MINIMUM-VERSION, CONFIG-SCRIPT,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([ACX_PACKAGE_CHECK], [
+ AC_ARG_VAR([$1][_CONFIG], [Full path to $3])
+ AC_ARG_WITH(ASX_TR_LOWER([$1][-prefix]),
+ [AS_HELP_STRING(ASX_TR_LOWER([--with-][$1][-prefix])[=PATH], [prefix where $3 is installed (optional)])],
+ [package_config_prefix="$withval"], [package_config_prefix=""])
+ AC_ARG_WITH(ASX_TR_LOWER([$1][-exec-prefix]),
+ [AS_HELP_STRING(ASX_TR_LOWER([--with-][$1][-exec-prefix])[=PATH], [exec prefix where $3 is installed (optional)])],
+ [package_config_exec_prefix="$withval"], [package_config_exec_prefix=""])
+ package_config_args=""
+ if test x"$package_config_exec_prefix" != x""; then
+ package_config_args="$package_config_args --exec-prefix=$package_config_exec_prefix"
+ test x"${[$1][_CONFIG]+set}" != x"set" && [$1][_CONFIG]="$package_config_exec_prefix/bin/$3"
+ fi
+ if test x"$package_config_prefix" != x""; then
+ package_config_args="$package_config_args --prefix=$package_config_prefix"
+ test x"${[$1][_CONFIG]+set}" != x"set" && [$1][_CONFIG]="$package_config_prefix/bin/$3"
+ fi
+
+ min_package_version=ifelse([$2], , [0.0.0], [$2])
+ AC_PATH_TOOL([[$1][_CONFIG]], [$3], [no])
+ AC_MSG_CHECKING([for $1 version >= $min_package_version])
+ if test x"$[$1][_CONFIG]" = x"no"; then
+ AC_MSG_RESULT([unknown])
+ AC_MSG_NOTICE([The $3 script installed by $1 could not be found.
+*** If $1 was installed in PREFIX, make sure PREFIX/bin is in your path, or
+*** set the $1][_CONFIG environment variable to the full path to the program.])
+ else
+ [$1][_CFLAGS]="`$[$1][_CONFIG] $package_config_args --cflags`"
+ [$1][_LIBS]="`$[$1][_CONFIG] $package_config_args --libs`"
+ [$1][_VERSION]="`$[$1][_CONFIG] $package_config_args --version`"
+ ACX_VERSION_CHECK([$min_package_version], [$[$1][_VERSION]],
+ [package_version_ok=yes; AC_MSG_RESULT([yes -- $[$1][_VERSION]])],
+ [[$1][_CFLAGS]="" [$1][_LIBS]=""; AC_MSG_RESULT([no -- $[$1][_VERSION]])
+ AC_MSG_NOTICE([If you have already installed a sufficiently new version,
+*** this error probably means that the wrong copy of the $3
+*** shell script is being found. The easiest way to fix this is to remove the
+*** old version, but you can also set the $1][_CONFIG environment
+*** variable to point to the correct copy. In this case, you will have to
+*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf
+*** so that the correct libraries are found at run-time.])])
+ fi
+
+ if test x"$package_version_ok" = x"yes"; then
+ ifelse([$4], , [:], [$4])
+ else
+ ifelse([$5], , [:], [$5])
+ fi
+ AC_SUBST([$1][_CFLAGS])
+ AC_SUBST([$1][_LIBS])
+])
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index cbb46dbf8..69445f39a 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -136,7 +136,8 @@ installed software in a non-standard prefix.
_PKG_TEXT
])],
- [$4])
+ [AC_MSG_RESULT([no])
+ $4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
@@ -146,7 +147,8 @@ path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
- [$4])
+ [AC_MSG_RESULT([no])
+ $4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
diff --git a/m4/programs.m4 b/m4/programs.m4
new file mode 100644
index 000000000..493888a0a
--- /dev/null
+++ b/m4/programs.m4
@@ -0,0 +1,124 @@
+dnl AC_PROG_GMSGFMT_PLURAL
+dnl ----------------------
+dnl Validate the GMSGFMT program found by gettext.m4; reject old versions
+dnl of GNU msgfmt that do not support the "msgid_plural" extension.
+AC_DEFUN([AC_PROG_GMSGFMT_PLURAL],
+ [dnl AC_REQUIRE(AM_GNU_GETTEXT)
+
+ if test "$GMSGFMT" != ":"; then
+ AC_MSG_CHECKING([for plural forms in GNU msgfmt])
+
+ changequote(,)dnl We use [ and ] in in .po test input
+
+ dnl If the GNU msgfmt does not accept msgid_plural we define it
+ dnl as : so that the Makefiles still can work.
+ cat >conftest.po <<_ACEOF
+msgid "channel"
+msgid_plural "channels"
+msgstr[0] "canal"
+msgstr[1] "canal"
+
+_ACEOF
+ changequote([,])dnl
+
+ if $GMSGFMT -o /dev/null conftest.po >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_RESULT(
+ [found GNU msgfmt program is too old, it does not support plural forms; ignore it])
+ GMSGFMT=":"
+ fi
+ rm -f conftest.po
+ fi
+])dnl AC_PROG_GMSGFMT_PLURAL
+
+
+# AC_PROG_LIBTOOL_SANITYCHECK
+# ----------------------
+# Default configuration of libtool on solaris produces non-working
+# plugin modules, when gcc is used as compiler, and gcc does not
+# use gnu-ld
+AC_DEFUN([AC_PROG_LIBTOOL_SANITYCHECK],
+ [dnl AC_REQUIRE(AC_PROG_CC)
+ dnl AC_REQUIRE(AC_PROG_LD)
+ dnl AC_REQUIRE(AC_PROG_LIBTOOL)
+
+ case $host in
+ *-*-solaris*)
+ if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
+ AC_MSG_CHECKING([if libtool can build working modules])
+ cat > conftest1.c <<_ACEOF
+#undef NDEBUG
+#include <assert.h>
+int shlib_func(long long a, long long b) {
+ assert(b);
+ switch (a&3) {
+ case 0: return a/b;
+ case 1: return a%b;
+ case 2: return (unsigned long long)a/b;
+ case 3: return (unsigned long long)a%b;
+ }
+}
+_ACEOF
+
+ cat > conftest2.c <<_ACEOF
+#include <dlfcn.h>
+int main(){
+ void *dl = dlopen(".libs/libconftest.so", RTLD_NOW);
+ if (!dl) printf("%s\n", dlerror());
+ exit(dl ? 0 : 1);
+}
+_ACEOF
+
+ if ./libtool $CC -c conftest1.c >/dev/null 2>&1 && \
+ ./libtool $CC -o libconftest.la conftest1.lo \
+ -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
+ ./libtool $CC -o conftest2 conftest2.c -ldl >/dev/null 2>&1
+ then
+ if ./conftest2 >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ dnl typical problem: dlopen'ed module not self contained, because
+ dnl it wasn't linked with -lgcc
+ AC_MSG_RESULT(no)
+ if grep '^archive_cmds=.*$LD -G' libtool >/dev/null; then
+ AC_MSG_CHECKING([if libtool can be fixed])
+
+ dnl first try to update gcc2's spec file to add the
+ dnl gcc3 -mimpure-text flag
+
+ libtool_specs=""
+
+ if $CC -dumpspecs | grep -- '-G -dy -z text' >/dev/null; then
+ $CC -dumpspecs | \
+ sed 's/-G -dy -z text/-G -dy %{!mimpure-text:-z text}/g' \
+ > gcc-libtool-specs
+ libtool_specs=" -specs=`pwd`/gcc-libtool-specs"
+ fi
+
+ sed -e "s,\$LD -G,\$CC${libtool_specs} -shared -mimpure-text,g" \
+ -e 's/ -M / -Wl,-M,/' libtool >libtool-fixed
+ chmod +x libtool-fixed
+ if ./libtool-fixed $CC -o libconftest.la conftest1.lo \
+ -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
+ ./conftest2 >/dev/null 2>&1; then
+
+ dnl the fixed libtool works
+ AC_MSG_RESULT(yes)
+ mv -f libtool-fixed libtool
+
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+ rm -f conftest1.c conftest1.lo conftest1.o conftest2.c \
+ libconftest.la conftest libtool-fixed
+ rm -rf .libs
+ fi ;;
+ esac
+])# AC_PROG_LIBTOOL_SANITYCHECK
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4
index 363a8b4b2..d68cd13c8 100644
--- a/m4/pthreads.m4
+++ b/m4/pthreads.m4
@@ -61,3 +61,28 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
ifelse([$2], , [:], [$2])
fi
])
+
+AC_DEFUN([CC_PTHREAD_RECURSIVE_MUTEX], [
+ AC_REQUIRE([CC_PTHREAD_FLAGS])
+ AC_MSG_CHECKING([for recursive mutex support in pthread])
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $PTHREAD_LIBS"
+ AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
+
+int main() {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ return 0;
+}
+ ]), [have_recursive_mutex=yes], [have_recursive_mutex=no])
+ LIBS="$ac_save_LIBS"
+
+ AC_MSG_RESULT([$have_recursive_mutex])
+
+ if test x"$have_recursive_mutex" = x"yes"; then
+ ifelse([$1], , [:], [$1])
+ else
+ ifelse([$2], , [:], [$2])
+ fi
+])
diff --git a/m4/summary.m4 b/m4/summary.m4
new file mode 100644
index 000000000..792c5d319
--- /dev/null
+++ b/m4/summary.m4
@@ -0,0 +1,364 @@
+AC_DEFUN([XINE_LIB_SUMMARY], [
+ dnl ---------------------------------------------
+ dnl Some infos:
+ dnl ---------------------------------------------
+
+ echo "xine-lib summary:"
+ echo "----------------"
+
+ dnl Input
+ echo " * input plugins:"
+ echo " - file - net"
+ echo " - stdin_fifo - rtp"
+ echo " - http - mms"
+ echo " - pnm - rtsp"
+ if test x"$enable_vcd" != x"no"; then
+ if test x"$enable_vcdo" != x"no"; then
+ if test x"$with_internal_vcdlibs" = x"no"; then
+ echo " - vcdo - vcd (external libs)"
+ else
+ echo " - vcdo - vcd (internal libs)"
+ fi
+ else
+ if test x"$with_internal_vcdlibs" = x"no"; then
+ echo " - vcd (external libs)"
+ else
+ echo " - vcd (internal libs)"
+ fi
+ fi
+ fi
+ if test x"$with_external_dvdnav" != x"no"; then
+ echo " - dvd (external libs)"
+ else
+ echo " - dvd (internal libs)"
+ fi
+ test x"$have_dvb" = x"yes" && echo " - dvb - vdr"
+ test x"$have_gnomevfs" = x"yes" && echo " - gnome-vfs"
+ test x"$have_samba" = x"yes" && echo " - smb"
+ test x"$have_v4l" = x"yes" && echo " - v4l"
+ echo " - cdda"
+ echo ""
+
+ dnl Demuxers
+ echo " * demultiplexer plugins:"
+ echo " - avi - mpeg"
+ echo " - mpeg_block - mpeg_audio"
+ echo " - mpeg_elem - mpeg_pes"
+ echo " - mpeg_ts - qt/mpeg-4"
+ echo " - film - roq"
+ echo " - fli - smjpeg"
+ echo " - idcin - wav"
+ echo " - wc3 mve - voc"
+ echo " - vqa - aiff"
+ echo " - cdda - snd/au"
+ echo " - yuv4mpeg2 - real/realaudio"
+ echo " - ea wve - raw dv"
+ echo " - interplay mve - psx str"
+ echo " - ws aud - pva"
+ echo " - vox - nsf"
+ echo " - nsv - 4xm"
+ echo " - FLAC - aac"
+ echo " - iff - matroska"
+ echo " - vmd - flv"
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_external_a52dec" = x"yes"; then
+ echo " - ac3 (external library)"
+ else
+ echo " - ac3 (internal library)"
+ fi
+ fi
+ test x"$enable_asf" != x"no" && echo " - asf"
+ test x"$enable_mng" != x"no" && echo " - mng"
+ test x"$have_modplug" = x"yes" && echo " - mod"
+ test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)"
+ test x"$have_vorbis" = x"yes" && echo " - ogg"
+ test x"$have_wavpack" = x"yes" && echo " - WavPack"
+ echo ""
+
+ dnl video decoders
+ echo " * video decoder plugins:"
+ echo " - MPEG 1,2 - Amiga Bitplane"
+ echo " - Raw RGB - Raw YUV"
+ test x"$have_dxr3" = x"yes" && echo " - dxr3_video"
+ test x"$have_gdkpixbuf" = x"yes" && echo " - gdk-pixbuf"
+ test x"$have_imagemagick" = x"yes" && echo " - image"
+ test x"$have_theora" = x"yes" && echo " - theora"
+ test x"$have_w32dll" = x"yes" && echo " - w32dll"
+ if test x"$with_external_ffmpeg" != x"no"; then
+ echo " - ffmpeg (external library)"
+ else
+ echo " - ffmpeg (internal library):"
+ echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)"
+ echo " - Creative YUV - Motion JPEG"
+ echo " - Cinepak - MS Video-1"
+ echo " - FLI/FLC - MS RLE"
+ echo " - Id RoQ - Id Cin"
+ echo " - Apple Graphics - Apple Video"
+ echo " - Apple Animation - Interplay Video"
+ echo " - Westwood VQA - Origin Xan"
+ echo " - H.263 - Intel Indeo 3"
+ echo " - SVQ1 - SVQ3"
+ echo " - Real Video 1.0 - Real Video 2.0"
+ echo " - 4X Video - Sierra Video"
+ echo " - Asus v1/v2 - HuffYUV"
+ echo " - On2 VP3 - DV"
+ echo " - 8BPS - Duck TrueMotion v1"
+ echo " - ATI VCR1 - Flash Video"
+ echo " - ZLIB - MSZH"
+ fi
+ echo ""
+
+ dnl audio decoders
+ echo " * audio decoder plugins:"
+ echo " - GSM 06.10"
+ echo " - linear PCM - Nosefart (NSF)"
+ test x"$enable_faad" != x"no" && echo " - faad"
+ test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)"
+ test x"$have_speex" = x"yes" && echo " - speex"
+ test x"$have_vorbis" = x"yes" && echo " - vorbis"
+ test x"$have_w32dll" = x"yes" && echo " - w32dll"
+ test x"$have_wavpack" = x"yes" && echo " - WavPack"
+ if test x"$enable_mad" != x"no"; then
+ if test x"$have_external_libmad" = x"yes"; then
+ echo " - MAD (MPG 1/2/3) (external library)"
+ else
+ echo " - MAD (MPG 1/2/3) (internal library)"
+ fi
+ fi
+ if test x"$enable_libdts" != x"no"; then
+ if test x"$have_external_libdts" = x"yes"; then
+ echo " - DTS (external library)"
+ else
+ echo " - DTS (internal library)"
+ fi
+ fi
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_external_a52dec" = x"yes"; then
+ echo " - A52/ra-dnet (external library)"
+ else
+ echo " - A52/ra-dnet (internal library)"
+ fi
+ fi
+ if test x"$enable_musepack" != x"no"; then
+ if test x"$have_external_libmpcdec" = x"yes"; then
+ echo " - Musepack (external library)"
+ else
+ echo " - Musepack (internal library)"
+ fi
+ fi
+ if test x"$with_external_ffmpeg" = x"yes"; then
+ echo " - ffmpeg (external library)"
+ else
+ echo " - ffmpeg (internal library):"
+ echo " - Windows Media Audio v1/v2"
+ echo " - DV - logarithmic PCM"
+ echo " - 14k4 - 28k8"
+ echo " - MS ADPCM - IMA ADPCM"
+ echo " - XA ADPCM - Game DPCM/ADPCM"
+ echo " - Mace 3:13 - Mace 6:1"
+ echo " - FLAC"
+ fi
+ echo ""
+
+ dnl spu decoders
+ echo " * subtitle decoder plugins:"
+ echo " - spu - spucc"
+ echo " - spucmml - sputext"
+ echo " - spudvb"
+ test x"$have_dxr3" = x"yes" && echo " - dxr3_spu"
+ echo ""
+
+ dnl post plugins
+ echo " * post effect plugins:"
+ echo " * planar video effects:"
+ echo " - invert - expand"
+ echo " - eq - eq2"
+ echo " - boxblur - denoise3d"
+ echo " - unsharp - tvtime"
+ test x"$have_dvb" = x"yes" && echo " - vdr"
+ echo " * SFX:"
+ echo " - goom - oscope"
+ echo " - fftscope - mosaico"
+ echo ""
+
+ dnl Video plugins
+ echo " * video driver plugins:"
+ if test x"$no_x" != x"yes"; then
+ echo " - XShm (X11 shared memory)"
+ if test x"$have_syncfb" = x"yes"; then
+ echo " - SyncFB (for Matrox G200/G400 cards)"
+ fi
+ if test x"$have_xv" = x"yes"; then
+ if test x"$have_xv_static" = x"yes"; then
+ echo " - Xv (XVideo *static*)"
+ else
+ echo " - Xv (XVideo *shared*)"
+ fi
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ if test x"$have_vldexts" = x"yes"; then
+ echo " - XxMC (XVideo extended motion compensation)"
+ else
+ echo " - XxMC (XVideo motion compensation - vld extensions DISABLED)"
+ fi
+ fi
+ if test x"$have_xvmc" = x"yes"; then
+ echo " - XvMC (XVideo motion compensation)"
+ fi
+ if test x"$have_opengl" = x"yes"; then
+ if test x"$have_glu" = x"yes"; then
+ echo " - OpenGL (with GLU support)"
+ else
+ echo " - OpenGL"
+ fi
+ fi
+ if test x"$have_sunfb" = x"yes"; then
+ if test x"$have_sundga" = x"yes"; then
+ echo " - PGX64 (for Sun XVR100/PGX64/PGX24 cards)"
+ echo " - PGX32 (for Sun PGX32 cards)"
+ fi
+ fi
+ fi
+ if test x"$have_xcb" = x"yes"; then
+ if test x"$have_xcbshm" = x"yes"; then
+ echo " - xcb-shm (X shared memory using XCB)"
+ fi
+ if test x"$have_xcbxv" = x"yes"; then
+ echo " - xcb-xv (XVideo using XCB)"
+ fi
+ fi
+
+
+ test x"$have_aalib" = x"yes" && echo " - aa (Ascii ART)"
+ test x"$have_caca" = x"yes" && echo " - caca (Color AsCii Art)"
+ test x"$have_directfb" = x"yes" && echo " - directfb (DirectFB driver)"
+ test x"$have_directx" = x"yes" && echo " - directx (DirectX video driver)"
+ test x"$have_fb" = x"yes" && echo " - fb (Linux framebuffer device)"
+ test x"$have_libstk" = x"yes" && echo " - stk (Libstk Set-top Toolkit)"
+ test x"$have_macosx_video" = x"yes" && echo " - Mac OS X OpenGL"
+ test x"$have_sdl" = x"yes" && echo " - sdl (Simple DirectMedia Layer)"
+
+
+ if test x"$have_dxr3" = x"yes"; then
+ if test x"$have_encoder" = x"yes"; then
+ echo " - dxr3 (Hollywood+ and Creative dxr3, both mpeg and non-mpeg video)"
+ else
+ echo " - dxr3 (Hollywood+ and Creative dxr3, mpeg video only)"
+ fi
+ fi
+ if test x"$have_vidix" = x"yes"; then
+ echo $ECHO_N " - vidix ("
+
+ if test x"$no_x" != x"yes"; then
+ echo $ECHO_N "X11"
+ if test x"$have_fb" = x"yes"; then
+ echo $ECHO_N " and "
+ fi
+ fi
+
+ if test x"$have_fb" = x"yes"; then
+ echo $ECHO_N "framebuffer"
+ fi
+
+ echo $ECHO_N " support"
+
+ if test x"$enable_dha_kmod" != x"no"; then
+ echo " with dhahelper)"
+ else
+ echo ")"
+ fi
+ fi
+
+ echo ""
+
+ dnl Audio plugins
+ echo " * audio driver plugins:"
+ test x"$have_alsa" = x"yes" && echo " - alsa (ALSA - Advanced Linux Sound Architecture)"
+ test x"$have_arts" = x"yes" && echo " - arts (aRts - KDE soundserver)"
+ test x"$have_coreaudio" = x"yes" && echo " - CoreAudio (Mac OS X audio driver)"
+ test x"$have_directx" = x"yes" && echo " - directx (DirectX audio driver)"
+ test x"$have_esound" = x"yes" && echo " - esd (Enlightened Sound Daemon)"
+ test x"$have_fusionsound" = x"yes" && echo " - fusionsound (FusionSound driver)"
+ test x"$am_cv_have_irixal" = x"yes" && echo " - irixal (Irix audio library)"
+ test x"$have_jack" = x"yes" && echo " - Jack"
+ test x"$have_oss" = x"yes" && echo " - oss (Open Sound System)"
+ test x"$have_pulseaudio" = x"yes" && echo " - pulseaudio (PulseAudio sound server)"
+ test x"$have_sunaudio" = x"yes" && echo " - sun (Sun audio interface)"
+ echo "---"
+
+
+ dnl ---------------------------------------------
+ dnl some user warnings
+ dnl ---------------------------------------------
+
+ dnl some levels of variable expansion to get final install paths
+ final_libdir="`eval eval eval eval echo $libdir`"
+ final_bindir="`eval eval eval eval echo $bindir`"
+
+ if test -r /etc/ld.so.conf && ! grep -x "$final_libdir" /etc/ld.so.conf >/dev/null ; then
+ if test "$final_libdir" != "/lib" -a "$final_libdir" != "/usr/lib" ; then
+ if ! echo "$LD_LIBRARY_PATH" | egrep "(:|^)$final_libdir(/?:|/?$)" >/dev/null ; then
+ echo
+ echo "****************************************************************"
+ echo "xine-lib will be installed to $final_libdir"
+ echo
+ echo "This path is not mentioned among the linker search paths in your"
+ echo "/etc/ld.so.conf. This means it is possible that xine-lib will"
+ echo "not be found when you try to compile or run a program using it."
+ echo "If this happens, you should add $final_libdir to"
+ echo "the environment variable LD_LIBRARY_PATH like that:"
+ echo
+ echo "export LD_LIBRARY_PATH=$final_libdir:\$LD_LIBRARY_PATH"
+ echo
+ echo "Alternatively you can add a line \"$final_libdir\""
+ echo "to your /etc/ld.so.conf."
+ echo "****************************************************************"
+ echo
+ fi
+ fi
+ fi
+
+ if ! echo "$PATH" | egrep "(:|^)$final_bindir(/?:|/?$)" >/dev/null ; then
+ echo
+ echo "****************************************************************"
+ echo "xine-config will be installed to $final_bindir"
+ echo
+ echo "This path is not in your search path. This means it is possible"
+ echo "that xine-config will not be found when you try to compile a"
+ echo "program using xine-lib. This will result in build failures."
+ echo "If this happens, you should add $final_bindir to"
+ echo "the environment variable PATH like that:"
+ echo
+ echo "export PATH=$final_bindir:\$PATH"
+ echo
+ echo "Note that this is only needed for compilation. It is not needed"
+ echo "to have xine-config in your search path at runtime. (Although"
+ echo "it will not cause any harm either.)"
+ echo "****************************************************************"
+ echo
+ fi
+
+ dnl warn if no X11 plugins will be built
+ if test "x$no_x" = "xyes"; then
+ case $host in
+ *mingw*|*-cygwin) ;;
+ *-darwin*) ;;
+ *)
+ echo
+ echo "****************************************************************"
+ echo "WARNING! No X11 output plugins will be built."
+ echo
+ echo "For some reason, the requirements for building the X11 video"
+ echo "output plugins are not met. That means, that you will NOT be"
+ echo "able to use the resulting xine-lib to watch videos in a window"
+ echo "on any X11-based display (e.g. your desktop)."
+ echo
+ echo "If this is not what you want, provide the necessary X11 build"
+ echo "dependencies (usually done by installing a package called"
+ echo "XFree86-devel or similar) and run configure again."
+ echo "****************************************************************"
+ echo
+ ;;
+ esac
+ fi
+])
diff --git a/m4/types.m4 b/m4/types.m4
new file mode 100644
index 000000000..bf13428cb
--- /dev/null
+++ b/m4/types.m4
@@ -0,0 +1,215 @@
+dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
+dnl abort if the given type does not have the supposed size
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], [
+ AC_MSG_CHECKING(that size of $1 is $2)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],
+ [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([can not build a default inttypes.h])])
+])
+
+
+dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
+dnl generate a default inttypes.h if the header file does not exist already
+AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
+ [AC_CHECK_HEADER([inttypes.h],,
+ [if test ! -d $1; then mkdir $1; fi
+ AC_CHECK_HEADER([stdint.h],
+ [cat >$1/inttypes.h << EOF
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+/* helper inttypes.h for people who do not have it on their system */
+
+#include <stdint.h>
+EOF
+ ],
+ [AC_COMPILE_CHECK_SIZEOF([char],[1])
+ AC_COMPILE_CHECK_SIZEOF([short],[2])
+ AC_COMPILE_CHECK_SIZEOF([int],[4])
+ AC_COMPILE_CHECK_SIZEOF([long long],[8])
+ cat >$1/inttypes.h << EOF
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+/* default inttypes.h for people who do not have it on their system */
+#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+#ifdef ARCH_X86
+typedef signed long long int64_t;
+#endif
+#endif
+#if (!defined __uint8_t_defined) && (!defined _LINUX_TYPES_H)
+#define __uint8_t_defined
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#ifdef ARCH_X86
+typedef unsigned long long uint64_t;
+#endif
+#endif
+EOF
+ ])
+ cat >>$1/inttypes.h << EOF
+
+#ifdef WIN32
+# define PRI64_PREFIX "I64"
+#else
+# define PRI64_PREFIX "l"
+#endif
+
+#ifndef PRId8
+# define PRId8 "d"
+#endif
+#ifndef PRId16
+# define PRId16 "d"
+#endif
+#ifndef PRId32
+# define PRId32 "d"
+#endif
+#ifndef PRId64
+# define PRId64 PRI64_PREFIX "d"
+#endif
+
+#ifndef PRIu8
+# define PRIu8 "u"
+#endif
+#ifndef PRIu16
+# define PRIu16 "u"
+#endif
+#ifndef PRIu32
+# define PRIu32 "u"
+#endif
+#ifndef PRIu64
+# define PRIu64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIx8
+# define PRIx8 "x"
+#endif
+#ifndef PRIx16
+# define PRIx16 "x"
+#endif
+#ifndef PRIx32
+# define PRIx32 "x"
+#endif
+#ifndef PRIx64
+# define PRIx64 PRI64_PREFIX "x"
+#endif
+
+#ifndef PRIX8
+# define PRIX8 "X"
+#endif
+#ifndef PRIX16
+# define PRIX16 "X"
+#endif
+#ifndef PRIX32
+# define PRIX32 "X"
+#endif
+#ifndef PRIX64
+# define PRIX64 PRI64_PREFIX "X"
+#endif
+
+#ifndef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#ifndef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#ifndef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#ifndef PRIdFAST64
+# define PRIdFAST64 "d"
+#endif
+
+#ifndef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#ifndef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#ifndef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#ifndef PRIuFAST64
+# define PRIuFAST64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#ifndef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#ifndef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#ifndef PRIxFAST64
+# define PRIxFAST64 PRI64_PREFIX "x"
+#endif
+
+#ifndef SCNd8
+# define SCNd8 "hhd"
+#endif
+#ifndef SCNd16
+# define SCNd16 "hd"
+#endif
+#ifndef SCNd32
+# define SCNd32 "d"
+#endif
+#ifndef SCNd64
+# define SCNd64 PRI64_PREFIX "d"
+#endif
+
+#ifndef SCNu8
+# define SCNu8 "hhu"
+#endif
+#ifndef SCNu16
+# define SCNu16 "hu"
+#endif
+#ifndef SCNu32
+# define SCNu32 "u"
+#endif
+#ifndef SCNu64
+# define SCNu64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIdMAX
+# define PRIdMAX PRId64
+#endif
+#ifndef PRIuMAX
+# define PRIuMAX PRIu64
+#endif
+#ifndef PRIxMAX
+# define PRIxMAX PRIx64
+#endif
+#ifndef SCNdMAX
+# define SCNdMAX SCNd64
+#endif
+
+#endif
+EOF
+ ])])
+
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T], [
+ AC_MSG_CHECKING([for socklen_t])
+ AC_LANG_PUSH([C])
+ AC_CACHE_VAL([ac_cv_socklen_t],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>]],
+ [[socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a)]])],
+ [ac_cv_socklen_t=socklen_t], [ac_cv_socklen_t=''])
+ if test x"$ac_cv_socklen_t" = x""; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>]],
+ [[int a=0; getsockname(0,(struct sockaddr*)0, &a);]])],
+ [ac_cv_socklen_t=int], [ac_cv_socklen_t=size_t])
+ fi])
+ AC_LANG_POP([C])
+ AC_MSG_RESULT([$ac_cv_socklen_t])
+ if test x"$ac_cv_socklen_t" != x"socklen_t"; then
+ AC_DEFINE_UNQUOTED([socklen_t], [$ac_cv_socklen_t], [Define the real type of socklen_t])
+ fi
+])
diff --git a/m4/video_out.m4 b/m4/video_out.m4
new file mode 100644
index 000000000..4a0a37787
--- /dev/null
+++ b/m4/video_out.m4
@@ -0,0 +1,519 @@
+dnl -----------------
+dnl Video out plugins
+dnl -----------------
+AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, syncfb is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - dha_kmod is Linux only, but disabled by default
+ dnl - directx is Windows only
+ dnl - dxr3 is Linux only
+ dnl - Mac OS X video is Mac OS X only
+ dnl - OpenGL requires Xwindows
+ dnl - SyncFB is Linux only, but disabled by default
+ dnl - Vidix is FreeBSD and Linux only
+ dnl - XvMC and xxmc depend on Xv
+
+ default_enable_aalib=enable
+ default_enable_dha_kmod=disable
+ default_enable_directfb=disable
+ default_enable_directx=disable
+ default_enable_dxr3=disable
+ default_enable_glu=enable
+ default_enable_linuxfb=disable
+ default_enable_macosx_video=disable
+ default_enable_opengl=enable
+ default_enable_syncfb=disable
+ default_enable_vidix=disable
+ default_enable_xinerama=enable
+ default_enable_xvmc=enable
+
+ default_with_caca=with
+ default_with_libstk=without
+ default_with_sdl=with
+ default_with_xcb=with
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_directx=enable
+ ;;
+
+ darwin*)
+ default_enable_macosx_video=enable
+ ;;
+
+ freebsd*)
+ default_enable_vidix=enable
+ ;;
+
+ linux*)
+ default_enable_dxr3=enable
+ default_enable_linuxfb=enable
+ default_enable_vidix=enable
+ enable_linux=yes
+ ;;
+ esac
+
+
+ dnl Ascii-Art
+ AC_ARG_ENABLE([aalib],
+ [AS_HELP_STRING([--enable-aalib], [enable support for AALIB])],
+ [test x"$enableval" != x"no" && enable_aalib="yes"],
+ [test $default_enable_aalib = disable && enable_aalib="no"])
+ if test x"$enable_aalib" != x"no"; then
+ ACX_PACKAGE_CHECK([AALIB], [1.4], [aalib-config], [have_aalib=yes], [have_aalib=no])
+ if test x"$enable_aalib" = x"yes" && test x"$have_aalib" != x"yes"; then
+ AC_MSG_ERROR([aalib support requested, but aalib not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_AA], [test x"$have_aalib" = x"yes"])
+
+
+ dnl Color AsCii Art
+ AC_ARG_WITH([caca],
+ [AS_HELP_STRING([--with-caca], [enable support for CACA])],
+ [test x"$withval" != x"no" && with_caca="yes"],
+ [test $default_with_caca = without && with_caca=no])
+ if test x"$with_caca" != x"no"; then
+ PKG_CHECK_MODULES([CACA], [caca cucul], [have_caca="yes"], [have_caca="no"])
+ if test x"$with_caca" = x"yes" && test x"$have_caca" != x"yes"; then
+ AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_CACA], [test x"$have_caca" = x"yes"])
+
+
+ dnl dha (Linux only)
+ AC_ARG_ENABLE([dha-kmod],
+ [AS_HELP_STRING([--enable-dha-kmod], [build Linux DHA kernel module])],
+ [test x"$enableval" != x"no" && enable_dha_kmod="yes"],
+ [test $default_enable_dha_kmod = disable && enable_dha_kmod="no"])
+ if test x"$enable_dha_kmod" != x"no"; then
+ AC_ARG_WITH([linux-path],
+ [AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located])],
+ [linux_path="$withval"], [linux_path="/usr/src/linux"])
+ LINUX_INCLUDE="-I$linux_path/include"
+ AC_SUBST(LINUX_INCLUDE)
+ AC_CHECK_PROG([MKNOD], [mknod], [mknod], [no])
+ AC_CHECK_PROG([DEPMOD], [depmod], [depmod], [no], ["$PATH:/sbin"])
+ fi
+ AM_CONDITIONAL([HAVE_LINUX], [test x"$enable_linux" = x"yes"])
+ AM_CONDITIONAL([BUILD_DHA_KMOD], [test x"$enable_dha_kmod" != x"no"])
+
+
+ dnl DirectFB
+ AC_ARG_ENABLE([directfb],
+ [AS_HELP_STRING([--enable-directfb], [enable use of DirectFB])],
+ [test x"$enableval" != x"no" && enable_directfb="yes"],
+ [test $default_enable_directfb = disable && enable_directfb="no"])
+ if test "x$enable_directfb" = "xyes"; then
+ PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb=yes], [have_directfb=no])
+ if test x"$enable_directfb" = x"yes" && test x"$have_directfb" != x"yes"; then
+ AC_MSG_ERROR([DirectFB support requested, but DirectFB not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DIRECTFB], [test x"$have_directfb" = x"yes"])
+
+
+ dnl DirectX (see directx.m4)
+ AM_PATH_DIRECTX
+
+
+ dnl dxr3 / hollywood plus card
+ AC_ARG_ENABLE([dxr3],
+ [AS_HELP_STRING([--enable-dxr3], [enable support for DXR3/HW+])],
+ [test x"$enableval" != x"no" && enable_dxr3="yes"],
+ [test $default_enable_dxr3 = disable && enable_dxr3="no"])
+ if test x"$enable_dxr3" != x"no"; then
+ have_dxr3=yes
+ AC_MSG_RESULT([*** checking for a supported mpeg encoder])
+ AC_CHECK_LIB([fame], [fame_open],
+ [AC_CHECK_HEADERS([fame.h], [have_libfame=yes], [have_libfame=no])], [have_libfame=no])
+ if test x"$have_libfame" = x"yes"; then
+ have_encoder=yes
+ AC_DEFINE([HAVE_LIBFAME], 1, [Define this if you have libfame mpeg encoder installed (fame.sf.net)])
+ ACX_PACKAGE_CHECK([LIBFAME], [0.8.10], [libfame-config],
+ [AC_DEFINE([HAVE_NEW_LIBFAME], 1, [Define this if you have libfame 0.8.10 or above])])
+ fi
+ AC_CHECK_LIB([rte], [rte_init],
+ [AC_CHECK_HEADERS([rte.h], [have_librte=yes], [have_librte=no])], [have_librte=no])
+ if test x"$have_librte" = x"yes"; then
+ have_encoder=yes
+ AC_MSG_WARN([this will probably only work with rte version 0.4!])
+ AC_DEFINE([HAVE_LIBRTE], 1, [Define this if you have librte mpeg encoder installed (zapping.sf.net)])
+ fi
+ if test "$have_encoder" = "yes"; then
+ AC_MSG_RESULT([*** found one or more external mpeg encoders])
+ else
+ AC_MSG_RESULT([*** no external mpeg encoder found])
+ fi
+ else
+ have_dxr3=no have_libfame=no have_librte=no have_encoder=no
+ fi
+ AM_CONDITIONAL([ENABLE_DXR3], [test x"$have_dxr3" = x"yes"])
+ AM_CONDITIONAL([HAVE_LIBFAME], [test x"$have_libfame" = x"yes"])
+ AM_CONDITIONAL([HAVE_LIBRTE], [test x"$have_librte" = x"yes"])
+
+
+ dnl LibSTK - http://www.libstk.net (project appears to be dead)
+ AC_ARG_WITH([libstk],
+ [AS_HELP_STRING([--with-libstk], [Build with STK surface video driver])],
+ [test x"$withval" != x"no" && with_libstk="yes"],
+ [test $default_with_libstk = without && with_libstk="no"])
+ if test x"$with_libstk" != x"no"; then
+ PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no])
+ if test x"$with_libstk" = x"yes" && test x"$have_libstk" != x"yes"; then
+ AC_MSG_ERROR([libstk support requested, but libstk not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_STK], [test x"$have_libstk" = x"yes"])
+
+
+ dnl Linux framebuffer device
+ AC_ARG_ENABLE([fb],
+ [AS_HELP_STRING([--enable-fb], [enable Linux framebuffer support])],
+ [test x"$enableval" != x"no" && enable_fb="yes"],
+ [test $default_enable_linuxfb = disable && enable_linuxfb="no"])
+ if test x"$enable_linuxfb" != x"no"; then
+ AC_CHECK_HEADERS([linux/fb.h], [have_fb=yes], [have_fb=no])
+ if test x"$enable_fb" = x"yes" && test x"$have_fb" != x"yes"; then
+ AC_MSG_ERROR([Linux framebuffer support requested, but required header file(s) not found])
+ elif test x"$have_fb" = x"yes"; then
+ dnl This define is needed by src/video_out/video_out_vidix.c
+ AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_FB], [test x"$have_fb" = x"yes"])
+
+
+ dnl Mac OS X OpenGL video output
+ AC_ARG_ENABLE([macosx-video],
+ [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])],
+ [test x"$enableval" != x"no" && enable_macosx_video="yes"],
+ [test $default_enable_macosx_video = disable && enable_macosx_video="no"])
+ if test x"$enable_macosx_video" != x"no"; then
+ AC_MSG_CHECKING([for Mac OS X video output frameworks])
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -framework Cocoa -framework OpenGL"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_macosx_video=yes], [have_macosx_video=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_macosx_video])
+ if test x"$enable_macosx_video" = x"yes" && test x"$have_macosx_video" != x"yes"; then
+ AC_MSG_ERROR([Mac OS X OpenGL video output support requested, but required frameworks not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MACOSX_VIDEO], [test x"$have_macosx_video" = x"yes"])
+
+
+ dnl OpenGL, including GLut and/or GLU
+ AC_ARG_ENABLE([opengl],
+ [AS_HELP_STRING([--enable-opengl], [enable support for X-based OpenGL video output])],
+ [test x"$enableval" != x"no" && enable_opengl="yes"],
+ [test $default_enable_opengl = disable && enable_opengl="no"])
+ AC_ARG_ENABLE([glu],
+ [AS_HELP_STRING([--enable-glu], [enable support for GLU in the OpenGL plugin])],
+ [test x"$enableval" != x"no" && enable_glu="yes"],
+ [test $default_enable_glu = disable && enable_glu="no"])
+ if test x"$enable_opengl" != x"no"; then
+ if test x"$no_x" = x"yes"; then
+ if test x"$enable_opengl" = x"yes"; then
+ AC_MSG_ERROR([OpenGL support requested, but X support is disabled])
+ fi
+ enable_opengl=no
+ fi
+ fi
+ if test x"$enable_opengl" != x"no"; then
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ AC_CHECK_LIB([GL], [glBegin],
+ [AC_CHECK_HEADERS([GL/gl.h], [have_opengl=yes], [have_opengl=no])], [have_opengl=no],
+ [$X_LIBS -lm])
+ if test x"$enable_opengl" = x"yes" && test x"$have_opengl" != x"yes"; then
+ AC_MSG_ERROR([OpenGL support requested, but OpenGL not found])
+ elif test x"$have_opengl" = x"yes"; then
+ OPENGL_LIBS="-lGL -lm"
+ if test x"$enable_glu" != x"no"; then
+ have_glu=no
+ AC_CHECK_LIB([GLU], [gluPerspective],
+ [AC_CHECK_HEADERS([GL/glu.h],
+ [AC_MSG_CHECKING([if GLU is sane])
+ ac_save_LIBS="$LIBS" LIBS="-lGLU $X_LIBS $OPENGL_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h>
+ #include <GL/glu.h>]],
+ [[gluPerspective(45.0f, 1.33f, 1.0f, 1000.0f);
+ glBegin(GL_POINTS); glEnd()]])],
+ [have_glu=yes], [have_glu=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_glu])], [have_glu=no])], [have_glu=no],
+ [$X_LIBS $OPENGL_LIBS])
+ if test x"$enable_glu" = x"yes" && test x"$have_glu" != x"yes"; then
+ AC_MSG_ERROR([OpenGL GLU support requested, but GLU not found])
+ elif test x"$have_glu" = x"yes"; then
+ AC_DEFINE([HAVE_GLU], 1, [Define this if you have GLU support available])
+ GLU_LIBS="-lGLU"
+ fi
+ fi
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ AC_SUBST(OPENGL_CFLAGS)
+ AC_SUBST(OPENGL_LIBS)
+ AC_SUBST(GLU_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_OPENGL], [test x"$have_opengl" = x"yes"])
+
+
+ dnl SDL
+ AC_ARG_WITH([sdl],
+ [AS_HELP_STRING([--with-sdl], [Enable support for SDL video output])],
+ [test x"$withval" != x"no" && with_sdl="yes"],
+ [test $default_with_sdl = without && with_sdl="no"])
+ if test x"$with_sdl" != x"no"; then
+ PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no])
+ if test x"$with_sdl" = x"yes" && test x"$have_sdl" != x"yes"; then
+ AC_MSG_ERROR([SDL support requested, but SDL not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SDL], [test x"$have_sdl" = x"yes"])
+
+
+ dnl Solaris framebuffer device support (exists for more than just Solaris)
+ AC_CHECK_HEADERS([sys/fbio.h], [have_sunfb=yes], [have_sunfb=no])
+ if test x"$have_sunfb" = x"yes"; then
+ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/openwin/include"
+ saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L/usr/openwin/lib"
+ AC_CHECK_LIB([dga], [XDgaGrabDrawable],
+ [AC_CHECK_HEADER([dga/dga.h],
+ [SUNDGA_CFLAGS="-I/usr/openwin/include"
+ SUNDGA_LIBS="-L/usr/openwin/lib -R/usr/openwin/lib -ldga"
+ have_sundga=yes])])
+ CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS"
+ AC_SUBST(SUNDGA_CPPFLAGS)
+ AC_SUBST(SUNDGA_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$have_sundga" = x"yes"])
+ AM_CONDITIONAL([ENABLE_SUNFB], [test x"$have_sunfb" = x"yes"])
+
+
+ dnl syncfb (Linux only)
+ AC_ARG_ENABLE([syncfb],
+ [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])],
+ [test x"$enableval" != x"no" && enable_syncfb="yes"],
+ [test $default_enable_syncfb = disable && enable_syncfb="no"])
+ dnl There's no good test for this. If the user says so, then do it
+ if test x"$enable_syncfb" != x"no" && test x"$no_x" != x"yes"; then
+ have_syncfb=yes
+ fi
+ if test x"$enable_syncfb" = x"yes" && test x"$have_syncfb" != x"yes"; then
+ AC_MSG_ERROR([Linux syncfb support requested, but required X support is disabled])
+ fi
+ AM_CONDITIONAL([ENABLE_SYNCFB], [test x"$have_syncfb" = x"yes"])
+
+
+ dnl xcb
+ AC_ARG_WITH([xcb],
+ [AS_HELP_STRING([--with-xcb], [Enable support for XCB video out plugins])],
+ [test x"$withval" != x"no" && with_xcb="yes"],
+ [test $default_with_xcb = without && with_xcb="no"])
+ if test x"$with_xcb" != x"no"; then
+ PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb=yes], [have_xcb=no])
+ if test x"$enable_xcb" = x"yes" && test x"$have_xcb" != x"yes"; then
+ AC_MSG_ERROR([XCB support requested, but XCB not found])
+ elif test x"$have_xcb" = x"yes"; then
+ PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm=yes], [have_xcbshm=no])
+ PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv=yes], [have_xcbxv=no])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XCB], [test x"$have_xcb" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XCBSHM], [test x"$have_xcbshm" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XCBXV], [test x"$have_xcbxv" = x"yes"])
+
+
+ dnl vidix/libdha
+ dnl Requires X11 or Linux framebuffer
+ AC_ARG_ENABLE([vidix],
+ [AS_HELP_STRING([--enable-vidix], [enable support for Vidix])],
+ [test x"$enableval" != x"no" && enable_vidix="yes"],
+ [test $default_enable_vidix = disable && enable_vidix="no"])
+ if test x"$enable_vidix" != x"no"; then
+ have_vidix=yes
+ if test x"$ac_cv_prog_AWK" = x"no"; then
+ have_vidix=no
+ else
+ if test x"$no_x" = x"yes" -o x"$have_fb" != x"yes"; then
+ have_vidix=no
+ else
+ case "$host_or_hostalias" in
+ i?86-*-linux* | k?-*-linux* | athlon-*-linux*) ;;
+ i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*) ;;
+ *) have_vidix="no" ;;
+ esac
+ fi
+ fi
+ if test x"$enable_vidix" = x"yes" && test x"$have_vidix" != x"yes"; then
+ AC_MSG_ERROR([Vidix support requested, but not all requirements are met])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_VIDIX], test x"$have_vidix" = x"yes")
+
+
+ dnl Xinerama
+ AC_ARG_ENABLE([xinerama],
+ [AS_HELP_STRING([--enable-xinerama], [enable support for Xinerama])],
+ [test x"$enableval" != x"no" && enable_xinerama="yes"],
+ [test $default_enable_xinerama = disable && enable_xinerama="no"])
+ if test x"$enable_xinerama" != x"no"; then
+ if test x"$no_x" != x"yes"; then
+ PKG_CHECK_MODULES([XINERAMA], [xinerama], [have_xinerama=yes],
+ [AC_CHECK_LIB([Xinerama], [XineramaQueryExtension],
+ [XINERAMA_LIBS="-lXinerama" have_xinerama="yes"], [],
+ [$X_LIBS])])
+ fi
+ if test x"$enable_xinerama" = x"yes" && test x"$have_xinerama" != x"yes"; then
+ AC_MSG_ERROR([Xinerama support requested, but Xinerama not found or X disabled])
+ elif test x"$have_xinerama" = x"yes"; then
+ AC_DEFINE([HAVE_XINERAMA], 1, [Define this if you have libXinerama installed])
+ X_LIBS="$X_LIBS $XINERAMA_LIBS"
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XINERAMA], [test x"$have_xinerama" = x"yes"])
+
+
+ dnl xv
+ AC_ARG_WITH([xv-path],
+ [AS_HELP_STRING([--with-xv-path=path], [where libXv is installed])])
+ dnl With recent XFree86 or Xorg, dynamic linking is preferred!
+ dnl Only dynamic linking is possible when using libtool < 1.4.0
+ AC_ARG_ENABLE([static-xv],
+ [AS_HELP_STRING([--enable-static-xv], [Enable this to force linking against libXv.a])],
+ [test x"$enableval" != x"no" && xv_prefer_static="yes"], [xv_prefer_static="no"])
+ case "$host_or_hostalias" in
+ hppa*) xv_libexts="$acl_cv_shlibext" ;;
+ *)
+ if test x"$xv_prefer_static" = x"yes"; then
+ xv_libexts="$acl_cv_libext $acl_cv_shlibext"
+ else
+ xv_libexts="$acl_cv_shlibext $acl_cv_libext"
+ fi
+ ;;
+ esac
+ if test x"$no_x" != x"yes"; then
+ PKG_CHECK_MODULES([XV], [xv], [have_xv=yes], [have_xv=no])
+ if test x"$have_xv" = x"no"; then
+ dnl No Xv package -- search for it
+ for xv_libext in $xv_libexts; do
+ xv_lib="libXv.$xv_libext"
+ AC_MSG_CHECKING([for $xv_lib])
+ for xv_try_path in "$with_xv_path" "$x_libraries" /usr/X11R6/lib /usr/lib; do
+ if test x"$xv_try_path" != x"" && test -f "$xv_try_path/$xv_lib"; then
+ case $xv_lib in
+ *.$acl_cv_libext) have_xv_static=yes xv_try_libs="$xv_try_path/$xv_lib" ;;
+ *.$acl_cv_shlibext) have_xv_static=no xv_try_libs="${xv_try_path:+-L}$xv_try_path -lXv" ;;
+ esac
+ ac_save_LIBS="$LIBS" LIBS="$xv_try_libs $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvShmCreateImage()]])], [have_xv=yes], [])
+ LIBS="$ac_save_LIBS"
+ if test x"$have_xv" = x"yes"; then
+ AC_MSG_RESULT([$xv_try_path])
+ XV_LIBS="$xv_try_libs"
+ break
+ fi
+ fi
+ done
+ test x"$have_xv" = x"yes" && break
+ AC_MSG_RESULT([no])
+ done
+ fi
+ if test x"$have_xv" = x"yes"; then
+ AC_DEFINE([HAVE_XV], 1, [Define this if you have libXv installed])
+ fi
+ fi
+ AM_CONDITIONAL([HAVE_XV], [test x"$have_xv" = x"yes"])
+
+
+ dnl XvMC
+ AC_ARG_ENABLE([xvmc],
+ [AS_HELP_STRING([--enable-xvmc], [Disable xxmc and XvMC outplut plugins])],
+ [test x"$enableval" != x"no" && enable_xvmc="yes"],
+ [test $default_enable_xvmc = disable && enable_xvmc="no"])
+ AC_ARG_WITH([xvmc-path],
+ [AS_HELP_STRING([--with-xvmc-path=PATH], [where libXvMC for the xvmc plugin are installed])],
+ [], [with_xvmc_path="$x_libraries"])
+ AC_ARG_WITH([xvmc-lib],
+ [AS_HELP_STRING([--with-xvmc-lib=LIBNAME], [The name of the XvMC library libLIBNAME.so for the xvmc plugin])],
+ [], [with_xvmc_lib="XvMCW"])
+ AC_ARG_WITH([xxmc-path],
+ [AS_HELP_STRING([--with-xxmc-path=PATH], [Where libXvMC for the xxmc plugin are installed])],
+ [], [with_xxmc_path="$x_libraries"])
+ AC_ARG_WITH([xxmc-lib],
+ [AS_HELP_STRING([--with-xxmc-lib=LIBNAME], [The name of the XvMC library libLIBNAME.so for the xxmc plugin])],
+ [], [with_xxmc_lib="XvMCW"])
+ if test x"$enable_xvmc" != x"no"; then
+ if test x"$have_xv" != x"yes"; then
+ have_xvmc=no have_xxmc=no have_xvmc_or_xxmc=no
+ else
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ ac_save_LIBS="$LIBS"
+
+ dnl Check for xxmc
+ XXMC_LIBS="${with_xxmc_path:+-L}$with_xxmc_path -l$with_xxmc_lib"
+ AC_SUBST(XXMC_LIBS)
+ AC_MSG_CHECKING([whether to enable the xxmc plugin with VLD extensions])
+ AC_MSG_RESULT([])
+ LIBS="$XXMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])], [have_xxmc=yes],
+ [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])],
+ [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+ if test x"$have_xxmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/vldXvMC.h],
+ [have_vldexts=yes
+ AC_DEFINE([HAVE_VLDXVMC], 1, [Define if you have vldXvMC.h])],
+ [have_vldexts=no])
+ else
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xxmc=yes],
+ [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
+ [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/XvMC.h], [], [have_xxmc=no])
+ fi
+
+ dnl Check for xvmc
+ XVMC_LIBS="${with_xvmc_path:+-L}$with_xvmc_path -l$with_xvmc_lib"
+ AC_SUBST(XVMC_LIBS)
+ AC_MSG_CHECKING([whether to enable the xvmc plugin])
+ AC_MSG_RESULT([])
+ LIBS="$XVMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xvmc=yes],
+ [LIBS="$XVMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
+ [have_xvmc=yes XVMC_LIBS="$XVMC_LIBS -lXvMC"])])
+ if test x"$have_xvmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/XvMC.h], [], [have_xvmc=no])
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS"
+ fi
+ have_xvmc_or_xxmc="$have_xvmc"; test x"$have_xxmc" = x"yes" && have_xvmc_or_xxmc=yes
+ if test x"$enable_xvmc" = x"yes" && test x"$have_xvmc_or_xxmc" != x"yes"; then
+ AC_MSG_ERROR([XvMC support requested, but neither XvMC nor xxmc could be found, or X is disabled])
+ else
+ if test x"$have_xvmc" = x"yes"; then
+ AC_DEFINE([HAVE_XVMC], 1, [Define this if you have an XvMC library and XvMC.h installed.])
+ AC_MSG_RESULT([*** Enabling old xvmc plugin.])
+ else
+ AC_MSG_RESULT([*** Disabling old xvmc plugin.])
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ if test x"$have_vldexts" = x"yes"; then
+ AC_MSG_RESULT([*** Enabling xxmc plugin with vld extensions.])
+ else
+ AC_MSG_RESULT([*** Enabling xxmc plugin for standard XvMC *only*.])
+ fi
+ else
+ AC_MSG_RESULT([*** Disabling xxmc plugin.])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XVMC], [test x"$have_xvmc" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XXMC], [test x"$have_xxmc" = x"yes"])
+])dnl XINE_VIDEO_OUT_PLUGINS
diff --git a/m4/xine.m4 b/m4/xine.m4
index cb64bad1a..336a2d7d2 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -23,193 +23,91 @@ dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
dnl
-dnl AM_PATH_XINE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for XINE, and define XINE_CFLAGS and XINE_LIBS
-dnl
-AC_DEFUN([AM_PATH_XINE],
-[dnl
-dnl Get the cflags and libraries from the xine-config script
-dnl
-AC_ARG_WITH(xine-prefix,
- AS_HELP_STRING([--with-xine-prefix=DIR], [prefix where XINE is installed (optional)]),
- xine_config_prefix="$withval", xine_config_prefix="")
-AC_ARG_WITH(xine-exec-prefix,
- AS_HELP_STRING([--with-xine-exec-prefix=DIR], [exec prefix where XINE is installed (optional)]),
- xine_config_exec_prefix="$withval", xine_config_exec_prefix="")
-AC_ARG_ENABLE(xinetest,
- AS_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]),
- enable_xinetest=$enableval, enable_xinetest=yes)
-
- AC_LANG_PUSH([C])
+dnl _XINE_VERSION_PARSE(version)
+AC_DEFUN([_XINE_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v;
+my @v = split(" ", $v); $v = $v[[@S|@#v]]; $v =~ s/[[^0-9.]].*$//; @v = split (/\./, $v);
+push @v, 0 while $[#v] < 2; print $v[[0]] * 10000 + $v[[1]] * 100 + $v[[2]], "\n"'`])
- if test x$xine_config_exec_prefix != x ; then
- xine_config_args="$xine_config_args --exec-prefix=$xine_config_exec_prefix"
- if test x${XINE_CONFIG+set} != xset ; then
- XINE_CONFIG=$xine_config_exec_prefix/bin/xine-config
- fi
- fi
- if test x$xine_config_prefix != x ; then
- xine_config_args="$xine_config_args --prefix=$xine_config_prefix"
- if test x${XINE_CONFIG+set} != xset ; then
- XINE_CONFIG=$xine_config_prefix/bin/xine-config
- fi
- fi
- min_xine_version=ifelse([$1], ,0.5.0,$1)
- if test "x$enable_xinetest" != "xyes" ; then
- AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
- else
- AC_PATH_TOOL(XINE_CONFIG, xine-config, no)
- AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
- no_xine=""
- if test "$XINE_CONFIG" = "no" ; then
- no_xine=yes
+dnl _XINE_VERSION_CHECK(required, actual)
+AC_DEFUN([_XINE_VERSION_CHECK], [
+ required_version=ifelse([$1], , [0.0.0], [$1])
+ required_version_parsed=_XINE_VERSION_PARSE([$required_version])
+ actual_version=ifelse([$2], , [0.0.0], [$2])
+ actual_version_parsed=_XINE_VERSION_PARSE([$actual_version])
+ if test $required_version_parsed -le $actual_version_parsed; then
+ ifelse([$3], , [:], [$3])
else
- XINE_CFLAGS=`$XINE_CONFIG $xine_config_args --cflags`
- XINE_LIBS=`$XINE_CONFIG $xine_config_args --libs`
- XINE_ACFLAGS=`$XINE_CONFIG $xine_config_args --acflags`
- xine_config_major_version=`$XINE_CONFIG $xine_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- xine_config_minor_version=`$XINE_CONFIG $xine_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- xine_config_sub_version=`$XINE_CONFIG $xine_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- xine_data_dir=`$XINE_CONFIG $xine_config_args --datadir`
- xine_script_dir=`$XINE_CONFIG $xine_config_args --scriptdir`
- xine_plugin_dir=`$XINE_CONFIG $xine_config_args --plugindir`
- xine_locale_dir=`$XINE_CONFIG $xine_config_args --localedir`
- dnl if test "x$enable_xinetest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $XINE_CFLAGS"
- LIBS="$XINE_LIBS $LIBS"
-dnl
-dnl Now check if the installed XINE is sufficiently new. (Also sanity
-dnl checks the results of xine-config to some extent
-dnl
- rm -f conf.xinetest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <xine.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- int major, minor, sub;
- char *tmp_version;
+ ifelse([$4], , [:], [$4])
+ fi
+])
- system ("touch conf.xinetest");
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_xine_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) {
- printf("%s, bad version string\n", "$min_xine_version");
- exit(1);
- }
+dnl AM_PATH_XINE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for XINE, and define XINE_CFLAGS and XINE_LIBS
+dnl
+AC_DEFUN([AM_PATH_XINE], [
+ AC_ARG_VAR([XINE_CONFIG], [Full path to xine-config])
+ AC_ARG_WITH([xine-prefix],
+ [AS_HELP_STRING([--with-xine-prefix], [prefix where xine-lib is installed (optional)])])
+ AC_ARG_WITH([xine-exec-prefix],
+ [AS_HELP_STRING([--with-xine-exec-prefix], [exec prefix where xine-lib is installed (optional)])])
- if ((XINE_MAJOR_VERSION != $xine_config_major_version) ||
- (XINE_MINOR_VERSION != $xine_config_minor_version) ||
- (XINE_SUB_VERSION != $xine_config_sub_version))
- {
- printf("\n*** 'xine-config --version' returned %d.%d.%d, but XINE (%d.%d.%d)\n",
- $xine_config_major_version, $xine_config_minor_version, $xine_config_sub_version,
- XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION);
- printf ("*** was found! If xine-config was correct, then it is best\n");
- printf ("*** to remove the old version of XINE. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If xine-config was wrong, set the environment variable XINE_CONFIG\n");
- printf("*** to point to the correct copy of xine-config, and remove the file config.cache\n");
- printf("*** before re-running configure\n");
- }
- else
- {
- if ((XINE_MAJOR_VERSION > major) ||
- ((XINE_MAJOR_VERSION == major) && (XINE_MINOR_VERSION > minor)) ||
- ((XINE_MAJOR_VERSION == major) && (XINE_MINOR_VERSION == minor) && (XINE_SUB_VERSION >= sub)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of XINE (%d.%d.%d) was found.\n",
- XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION);
- printf("*** You need a version of XINE newer than %d.%d.%d. The latest version of\n",
- major, minor, sub);
- printf("*** XINE is always available from:\n");
- printf("*** http://xine.sourceforge.net\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the xine-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of XINE, but you can also set the XINE_CONFIG environment to point to the\n");
- printf("*** correct copy of xine-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-]])],[],[no_xine=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
+ xine_config_args=""
+ if test x"$with_xine_exec_prefix" != x""; then
+ xine_config_args="$xine_config_args --exec-prefix=$with_xine_exec_prefix"
+ test x"$XINE_CONFIG" != x"" && XINE_CONFIG="$with_xine_exec_prefix/bin/xine-config"
+ fi
+ if test x"$with_xine_prefix" != x""; then
+ xine_config_args="$xine_config_args --prefix=$with_xine_prefix"
+ test x"$XINE_CONFIG" = x"" && XINE_CONFIG="$with_xine_prefix/bin/xine-config"
fi
- if test "x$no_xine" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
+
+ min_xine_version=ifelse([$1], , [0.5.0], [$1])
+ AC_PATH_TOOL([XINE_CONFIG], [xine-config], [no])
+ AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
+ if test x"$XINE_CONFIG" = x"no"; then
+ AC_MSG_RESULT([unknown])
+ AC_MSG_NOTICE([
+*** If xine-lib was installed in PREFIX, make sure PREFIX/bin is in your path,
+*** or set the XINE_CONFIG environment variable to the full path to the
+*** xine-config shell script.
+ ])
else
- AC_MSG_RESULT(no)
- if test "$XINE_CONFIG" = "no" ; then
- echo "*** The xine-config script installed by XINE could not be found"
- echo "*** If XINE was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the XINE_CONFIG environment variable to the"
- echo "*** full path to xine-config."
- else
- if test -f conf.xinetest ; then
- :
- else
- echo "*** Could not run XINE test program, checking why..."
- CFLAGS="$CFLAGS $XINE_CFLAGS"
- LIBS="$LIBS $XINE_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <xine.h>
-#include <stdio.h>
-]], [[ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding XINE or finding the wrong"
- echo "*** version of XINE. If it is not finding XINE, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means XINE was incorrectly installed"
- echo "*** or that you have moved XINE since it was installed. In the latter case, you"
- echo "*** may want to edit the xine-config script: $XINE_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
+ XINE_CFLAGS="`$XINE_CONFIG $xine_config_args --cflags`"
+ XINE_LIBS="`$XINE_CONFIG $xine_config_args --libs`"
+ XINE_VERSION="`$XINE_CONFIG $xine_config_args --version`"
+ XINE_ACFLAGS="`$XINE_CONFIG $xine_config_args --acflags`"
+ xine_data_dir="`$XINE_CONFIG $xine_config_args --datadir`"
+ xine_script_dir="`$XINE_CONFIG $xine_config_args --scriptdir`"
+ xine_plugin_dir="`$XINE_CONFIG $xine_config_args --plugindir`"
+ xine_locale_dir="`$XINE_CONFIG $xine_config_args --localedir`"
+ _XINE_VERSION_CHECK([$min_xine_version], [$XINE_VERSION],
+ [xine_version_ok=yes; AC_MSG_RESULT([yes, $XINE_VERSION])],
+ [xine_version_ok=no; AC_MSG_RESULT([no, $XINE_VERSION])])
+ if test x"$xine_version_ok" != x"yes"; then
+ AC_MSG_NOTICE([
+*** You need a version of xine-lib newer than $XINE_VERSION.
+*** The latest version of xine-lib is always available from:
+*** http://www.xinehq.de
+***
+*** If you have already installed a sufficiently new version, this error
+*** probably means that the wrong copy of the xine-config shell script is
+*** being found. The easiest way to fix this is to remove the old version
+*** of xine-lib, but you can also set the XINE_CONFIG environment variable
+*** to point to the correct copy of xine-config. In this case, you will have
+*** to modify your LD_LIBRARY_PATH enviroment variable, or edit
+*** /etc/ld.so.conf so that the correct libraries are found at run-time.
+ ])
fi
- fi
- XINE_CFLAGS=""
- XINE_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(XINE_CFLAGS)
- AC_SUBST(XINE_LIBS)
- AC_SUBST(XINE_ACFLAGS)
- AC_LANG_POP([C])
- rm -f conf.xinetest
+ fi
+ AC_SUBST(XINE_CFLAGS)
+ AC_SUBST(XINE_LIBS)
+ AC_SUBST(XINE_ACFLAGS)
-dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as
-dnl necessary.
- AC_CHECK_FUNCS([strsep strpbrk setenv])
-dnl alloca (in public macro) and MinGW
- AC_CHECK_HEADERS([malloc.h])
+ if test x"$xine_version_ok" = x"yes"; then
+ ifelse([$2], , [:], [$2])
+ else
+ ifelse([$3], , [:], [$3])
+ fi
])
diff --git a/m4/xv.m4 b/m4/xv.m4
deleted file mode 100644
index 91380a1de..000000000
--- a/m4/xv.m4
+++ /dev/null
@@ -1,93 +0,0 @@
-# AC_FIND_LIBXV_IMPL (LIB)
-# -------------------------
-#
-AC_DEFUN([AC_PATH_LIBXV_IMPL],
-[
- AC_MSG_CHECKING([for $1])
- if test -f "$xv_path/$1"; then
- AC_MSG_RESULT([found $1 in $xv_path])
- XV_LIBS="$1"
- else
- if test -f "/usr/lib/$1"; then
- AC_MSG_RESULT([found $1 in /usr/lib])
- XV_LIBS="$1"
- else
- AC_MSG_RESULT([$1 not found in $xv_path])
- fi
- fi
-])
-
-AC_DEFUN([AC_TEST_LIBXV],
-[
- dnl -----------------------------------------------
- dnl Testing installed Xv library
- dnl -----------------------------------------------
- AC_CHECK_LIB(Xv, XvShmCreateImage,
- [
- AC_DEFINE(HAVE_XV,
- 1,
- [Define this if you have libXv installed])
-
- ac_have_xv="yes"
- case x$XV_LIBS in
- x*.a)
- AC_DEFINE(HAVE_XV_STATIC,
- 1,
- [Define this if you have libXv.a])
- ac_have_xv_static="yes"
- XV_LIBS="$xv_path/$XV_LIBS"
- ;;
- x*.so)
- XV_LIBS=`echo $XV_LIBS | sed 's/^lib/-l/; s/\.so$//'`
- ;;
- *)
- AC_MSG_ERROR([sorry, I don't know about $XV_LIBS])
- ;;
- esac
- ],
- ,
- [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
-
- dnl -----------------------------------------------
- dnl xine_check use Xv functions API.
- dnl -----------------------------------------------
- if test x$ac_have_xv = "xyes"; then
- EXTRA_X_LIBS="-L$xv_path $XV_LIBS -lXext"
- EXTRA_X_CFLAGS=""
- fi
- AC_SUBST(XV_LIBS)
- AC_SUBST(EXTRA_X_LIBS)
- AC_SUBST(EXTRA_X_CFLAGS)
-])
-
-# AC_PATH_LIBXV
-# -------------------------
-#
-AC_DEFUN([AC_FIND_LIBXV],
-[
- # Ensure that AC_PATH_XTRA is executed before this
- AC_REQUIRE([AC_PATH_XTRA])
-
- if test x$xv_path = x; then
- xv_path=/usr/X11R6/lib
- fi
-
- if test "x$xv_prefer_shared" = "xyes"; then
- AC_PATH_LIBXV_IMPL([libXv.so])
- else
- AC_PATH_LIBXV_IMPL([libXv.a])
- fi
-
- # Try the other lib if prefered failed
- if test x$XV_LIBS = x; then
- if ! test "x$xv_prefer_shared" = "xyes"; then
- AC_PATH_LIBXV_IMPL([libXv.so])
- else
- AC_PATH_LIBXV_IMPL([libXv.a])
- fi
- fi
-
- if ! test x$XV_LIBS = x; then
- AC_TEST_LIBXV
- fi
-])
diff --git a/misc/Makefile.common b/misc/Makefile.common
index a3fe43de6..edafcea4b 100644
--- a/misc/Makefile.common
+++ b/misc/Makefile.common
@@ -9,7 +9,7 @@ xinepostdir = $(XINE_PLUGINDIR)/post
vidixdir = $(XINE_PLUGINDIR)/vidix
$(XINE_LIB):
- @cd $(top_srcdir)/src/xine-engine && $(MAKE)
+ $(MAKE) -C $(top_builddir)/src/xine-engine
$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la:
$(MAKE) -C $(top_builddir)/contrib/libxdg-basedir
@@ -41,16 +41,6 @@ pass1:
pass2:
@$(MAKE) MULTIPASS_CFLAGS="$(PASS2_CFLAGS)"
-debug:
- @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
-
-install-debug: debug
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) $@) || exit; \
- done;
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
-
uninstall-hook:
@list='$(xineplug_LTLIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \
diff --git a/misc/SlackBuild.in b/misc/SlackBuild.in
index d356a1766..118613c6a 100644
--- a/misc/SlackBuild.in
+++ b/misc/SlackBuild.in
@@ -27,7 +27,7 @@ EOF
#
do_descr() {
cat > package_descriptions << EOF
-@PACKAGE@: @PACKAGE@ @SPEC_VERSION@.
+@PACKAGE@: @PACKAGE@ @PACKAGE_VERSION@.
@PACKAGE@:
@PACKAGE@: xine-lib is the beating heart of xine (a free gpl-licensed
@PACKAGE@: video player for unix-like systems) which among others provides
@@ -53,12 +53,12 @@ do_build() {
cd $CWD
rm -rf $TMPBUILD
mkdir -p $TMPBUILD
- cd $TMPBUILD && tar -xzf $CWD/@TAR_NAME@.tar.gz
+ cd $TMPBUILD && tar -xzf $CWD/@PACKAGE_TARNAME@.tar.gz
do_install_sh;
- cd @TAR_NAME@
+ cd @PACKAGE_TARNAME@
DIE=1
- echo "./configure --prefix=$PREFIX $CONFIG_OPT && make && make install-strip DESTDIR=$PKG LIBRARY_PATH=$TMPBUILD/@TAR_NAME@/src/xine-engine/.libs" && \
- ./configure --prefix=$PREFIX $CONFIG_OPT && make && make install-strip DESTDIR=$PKG LIBRARY_PATH=$TMPBUILD/@TAR_NAME@/src/xine-engine/.libs && \
+ echo "./configure --prefix=$PREFIX $CONFIG_OPT && make && make install-strip DESTDIR=$PKG LIBRARY_PATH=$TMPBUILD/@PACKAGE_TARNAME@/src/xine-engine/.libs" && \
+ ./configure --prefix=$PREFIX $CONFIG_OPT && make && make install-strip DESTDIR=$PKG LIBRARY_PATH=$TMPBUILD/@PACKAGE_TARNAME@/src/xine-engine/.libs && \
mkdir -p $PKG/install && cp $TMPBUILD/doinst.sh $PKG/install && \
cd $PKG && \
echo "n" | /sbin/makepkg $PACKAGE && \
@@ -172,7 +172,7 @@ main() {
build_pentium
build_k6
build_k7
- mv -f $CWD/@TAR_NAME@.tar.gz $SLCK
+ mv -f $CWD/@PACKAGE_TARNAME@.tar.gz $SLCK
}
@@ -184,7 +184,7 @@ build_arch() {
mkdir -p $SLCK
rm -f config.cache && ./autogen.sh && make dist
$barch
- mv -f $CWD/@TAR_NAME@.tar.gz $SLCK
+ mv -f $CWD/@PACKAGE_TARNAME@.tar.gz $SLCK
}
case "$1" in
diff --git a/misc/build_rpms.sh.in b/misc/build_rpms.sh.in
index b3ec065b1..c3096e5f0 100644
--- a/misc/build_rpms.sh.in
+++ b/misc/build_rpms.sh.in
@@ -44,9 +44,9 @@ export XINE_BUILD=i586-pc-linux-gnu
eval $RPM_BA
-mv /usr/src/redhat/SRPMS/libxine-@SPEC_VERSION@-$DATE.src.rpm ./rpms/
-mv /usr/src/redhat/RPMS/i386/$PKGNAME-@SPEC_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@SPEC_VERSION@-$DATE.i586.rpm
-mv /usr/src/redhat/RPMS/i386/$PKGNAME-devel-@SPEC_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-devel-@SPEC_VERSION@-$DATE.i586.rpm
+mv /usr/src/redhat/SRPMS/libxine-@PACKAGE_VERSION@-$DATE.src.rpm ./rpms/
+mv /usr/src/redhat/RPMS/i386/$PKGNAME-@PACKAGE_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@PACKAGE_VERSION@-$DATE.i586.rpm
+mv /usr/src/redhat/RPMS/i386/$PKGNAME-devel-@PACKAGE_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-devel-@PACKAGE_VERSION@-$DATE.i586.rpm
echo "*****************************************************"
echo
@@ -61,7 +61,7 @@ export XINE_BUILD=i686-pc-linux-gnu
eval $RPM_BB
-mv /usr/src/redhat/RPMS/i386/$PKGNAME-@SPEC_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@SPEC_VERSION@-$DATE.i686.rpm
+mv /usr/src/redhat/RPMS/i386/$PKGNAME-@PACKAGE_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@PACKAGE_VERSION@-$DATE.i686.rpm
echo "*****************************************************"
echo
@@ -76,7 +76,7 @@ export XINE_BUILD=k6-pc-linux-gnu
eval $RPM_BB
-mv /usr/src/redhat/RPMS/i386/$PKGNAME-@SPEC_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@SPEC_VERSION@-$DATE.k6.rpm
+mv /usr/src/redhat/RPMS/i386/$PKGNAME-@PACKAGE_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@PACKAGE_VERSION@-$DATE.k6.rpm
echo "*****************************************************"
echo
@@ -91,6 +91,6 @@ export XINE_BUILD=athlon-pc-linux-gnu
eval $RPM_BB
-mv /usr/src/redhat/RPMS/i386/$PKGNAME-@SPEC_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@SPEC_VERSION@-$DATE.k7.rpm
+mv /usr/src/redhat/RPMS/i386/$PKGNAME-@PACKAGE_VERSION@-$DATE.i386.rpm ./rpms/$PKGNAME-@PACKAGE_VERSION@-$DATE.k7.rpm
echo "Done."
diff --git a/misc/relchk.sh.in b/misc/relchk.sh.in
index 242a97486..09cce24b2 100755
--- a/misc/relchk.sh.in
+++ b/misc/relchk.sh.in
@@ -4,7 +4,7 @@
##
topdir="`pwd`"
-distdir="@TAR_NAME@"
+distdir="@PACKAGE_TARNAME@"
log="$topdir/dist-log"
logerror="$topdir/dist-errors"
diff --git a/misc/xine-lib.spec.in b/misc/xine-lib.spec.in
index 2b182e8ad..6c5d9b96c 100644
--- a/misc/xine-lib.spec.in
+++ b/misc/xine-lib.spec.in
@@ -1,6 +1,6 @@
%define shortname libxine
%define name libxine2
-%define version @SPEC_VERSION@
+%define version @PACKAGE_VERSION@
%define release 0
%define major 1
@@ -642,7 +642,7 @@ libxine Soundausgabeplugin für den jack-Soundserver
%endif
%prep
-%setup -q -n @TAR_NAME@
+%setup -q -n @PACKAGE_TARNAME@
%build
export CFLAGS="${RPM_OPT_FLAGS}"
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 2b9a10dc5..f59b1c08b 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,5 +1,5 @@
# Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
@@ -8,7 +8,7 @@
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
-# Origin: gettext-0.14.4
+# Origin: gettext-0.16
include @srcdir@/Makefile.format
@@ -27,21 +27,37 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
-ifeq ($(datarootdir),\@datarootdir\@)
-datarootdir = @datadir@
-endif
datadir = @datadir@
-localedir = $(datadir)/locale
-gettextsrcdir = $(datarootdir)/gettext/po
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
@@ -166,7 +182,7 @@ install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -179,13 +195,13 @@ install-data: install-data-@USE_NLS@
fi
install-data-no: all
install-data-yes: all
- $(mkinstalldirs) $(DESTDIR)$(datadir)
+ $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkinstalldirs) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -225,19 +241,19 @@ installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
- $(mkinstalldirs) $(DESTDIR)$(datadir)
+ $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkinstalldirs) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
@@ -382,11 +398,7 @@ update-gmo: Makefile $(GMOFILES)
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
- $(SHELL) ./config.status
-
-debug:
-install-debug:
+ && $(SHELL) ./config.status $(subdir)/$@.in po-directories
force:
diff --git a/po/Makefile.in.in.diff b/po/Makefile.in.in.diff
new file mode 100644
index 000000000..583640149
--- /dev/null
+++ b/po/Makefile.in.in.diff
@@ -0,0 +1,30 @@
+--- /usr/share/gettext/po/Makefile.in.in 2006-11-27 23:24:08.000000000 +0000
++++ ./po/Makefile.in.in 2007-05-17 14:31:43.000000000 +0100
+@@ -10,7 +10,10 @@
+ #
+ # Origin: gettext-0.16
+
++include @srcdir@/Makefile.format
++
+ PACKAGE = @PACKAGE@
++LIBNAME = @LIBNAME@
+ VERSION = @VERSION@
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+@@ -65,7 +68,7 @@
+ GMOFILES = @GMOFILES@
+ UPDATEPOFILES = @UPDATEPOFILES@
+ DUMMYPOFILES = @DUMMYPOFILES@
+-DISTFILES.common = Makefile.in.in remove-potcdate.sin \
++DISTFILES.common = Makefile.in.in remove-potcdate.sin Makefile.format \
+ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+ DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+ $(POFILES) $(GMOFILES) \
+@@ -136,6 +139,7 @@
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
++ $(XGETTEXT_FORMAT_FLAGS) $(XGETTEXT_FORMAT_FLAGS_PRIVATE) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am
index 20a4e708b..8759b123f 100644
--- a/src/audio_out/Makefile.am
+++ b/src/audio_out/Makefile.am
@@ -1,146 +1,125 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -DXINE_COMPILE
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+##
+# IMPORTANT:
+# ---------
+# all xine audio out plugins should be named like the
+# scheme "xineplug_ao_out_"
+#
EXTRA_DIST = audio_irixal_out.c
-if HAVE_OSS
+if ENABLE_OSS
oss_module = xineplug_ao_out_oss.la
endif
-if HAVE_ALSA
+if ENABLE_ALSA
alsa_module = xineplug_ao_out_alsa.la
endif
-if HAVE_ESD
+if ENABLE_ESD
esd_module = xineplug_ao_out_esd.la
endif
-if HAVE_SUNAUDIO
+if ENABLE_SUNAUDIO
sun_module = xineplug_ao_out_sun.la
endif
-#if HAVE_IRIXAL
+#if ENABLE_IRIXAL
#irixal_module = xineplug_ao_out_irixal.la
#endif
-if HAVE_ARTS
+if ENABLE_ARTS
arts_module = xineplug_ao_out_arts.la
endif
-if HAVE_DIRECTX
+if ENABLE_DIRECTX
directx_module = xineplug_ao_out_directx.la
directx2_module = xineplug_ao_out_directx2.la
endif
-if HAVE_COREAUDIO
+if ENABLE_COREAUDIO
coreaudio_module = xineplug_ao_out_coreaudio.la
endif
-if HAVE_PULSEAUDIO
+if ENABLE_PULSEAUDIO
pulseaudio_module = xineplug_ao_out_pulseaudio.la
endif
-if HAVE_FUSIONSOUND
+if ENABLE_FUSIONSOUND
fusionsound_module = xineplug_ao_out_fusionsound.la
endif
-if HAVE_JACK
+if ENABLE_JACK
jack_module = xineplug_ao_out_jack.la
endif
-##
-# IMPORTANT:
-# ---------
-# all xine audio out plugins should be named like the
-# scheme "xineplug_ao_out_"
-#
-xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \
- $(oss_module) \
- $(alsa_module) \
- $(sun_module) \
- $(arts_module) \
- $(esd_module) \
- $(directx_module) \
- $(coreaudio_module) \
- $(pulseaudio_module) \
+xineplug_LTLIBRARIES = \
+ xineplug_ao_out_none.la \
+ xineplug_ao_out_file.la \
+ $(oss_module) \
+ $(alsa_module) \
+ $(sun_module) \
+ $(arts_module) \
+ $(esd_module) \
+ $(directx_module) \
+ $(coreaudio_module) \
+ $(pulseaudio_module) \
$(directx2_module) \
- $(fusionsound_module) \
+ $(fusionsound_module) \
$(jack_module)
xineplug_ao_out_none_la_SOURCES = audio_none_out.c
xineplug_ao_out_none_la_LIBADD = $(XINE_LIB)
-xineplug_ao_out_none_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_none_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_file_la_SOURCES = audio_file_out.c
xineplug_ao_out_file_la_LIBADD = $(XINE_LIB)
-xineplug_ao_out_file_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_file_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c
xineplug_ao_out_oss_la_LIBADD = $(XINE_LIB)
-xineplug_ao_out_oss_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c
xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_ao_out_alsa_la_CFLAGS = $(VISIBILITY_FLAG) $(ALSA_CFLAGS)
-xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_alsa_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c
xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS) $(XINE_LIB)
-xineplug_ao_out_esd_la_CFLAGS = $(VISIBILITY_FLAG) $(ESD_CFLAGS)
-xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_esd_la_CFLAGS = $(AM_CFLAGS) $(ESD_CFLAGS)
xineplug_ao_out_sun_la_SOURCES = audio_sun_out.c
xineplug_ao_out_sun_la_LIBADD = $(XINE_LIB)
-xineplug_ao_out_sun_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module
#xineplug_ao_out_irixal_la_SOURCES = audio_irixal_out.c
#xineplug_ao_out_irixal_la_LIBADD = $(IRIXAL_LIBS)
-#xineplug_ao_out_irixal_la_CFLAGS = $(VISIBILITY_FLAG) $(IRIXAL_CFLAGS)
-#xineplug_ao_out_irixal_la_LDFLAGS = -avoid-version -module
+#xineplug_ao_out_irixal_la_CFLAGS = $(AM_CFLAGS) $(IRIXAL_CFLAGS)
xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c
xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) $(XINE_LIB)
-xineplug_ao_out_arts_la_CFLAGS = $(VISIBILITY_FLAG) $(ARTS_CFLAGS)
-xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_arts_la_CFLAGS = $(AM_CFLAGS) $(ARTS_CFLAGS)
xineplug_ao_out_directx_la_SOURCES = audio_directx_out.c
-xineplug_ao_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
xineplug_ao_out_directx_la_LIBADD = $(DIRECTX_AUDIO_LIBS) $(XINE_LIB)
-xineplug_ao_out_directx_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_directx_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS)
xineplug_ao_out_coreaudio_la_SOURCES = audio_coreaudio_out.c
xineplug_ao_out_coreaudio_la_LIBADD = $(XINE_LIB)
-# The "-Wl,-framework -Wl,..." is needed for libtool versions before
-# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220)
-xineplug_ao_out_coreaudio_la_LDFLAGS = \
- -Wl,-framework -Wl,Cocoa -framework CoreAudio \
- -Wl,-framework -Wl,AudioUnit -framework AudioUnit \
- -avoid-version -module
-xineplug_ao_out_coreaudio_la_CFLAGS = -framework CoreAudio -framework AudioUnit $(VISIBILITY_FLAG)
+xineplug_ao_out_coreaudio_la_LDFLAGS = $(AM_LDFLAGS) -framework CoreAudio -framework AudioUnit
xineplug_ao_out_pulseaudio_la_SOURCES = audio_pulse_out.c
xineplug_ao_out_pulseaudio_la_LIBADD = $(PULSEAUDIO_LIBS) $(XINE_LIB)
-xineplug_ao_out_pulseaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(PULSEAUDIO_CFLAGS)
-xineplug_ao_out_pulseaudio_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_pulseaudio_la_CFLAGS = $(AM_CFLAGS) $(PULSEAUDIO_CFLAGS)
xineplug_ao_out_directx2_la_SOURCES = audio_directx2_out.c
-xineplug_ao_out_directx2_la_CPPFLAGS = $(DIRECTX_CPPFLAGS)
+xineplug_ao_out_directx2_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS)
xineplug_ao_out_directx2_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS) $(PTHREAD_LIBS)
-xineplug_ao_out_directx2_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_ao_out_directx2_la_LDFLAGS = -avoid-version -module
xineplug_ao_out_fusionsound_la_SOURCES = audio_fusionsound_out.c
xineplug_ao_out_fusionsound_la_LIBADD = $(FUSIONSOUND_LIBS) $(XINE_LIB)
-xineplug_ao_out_fusionsound_la_CFLAGS = $(VISIBILITY_FLAG) $(FUSIONSOUND_CFLAGS)
-xineplug_ao_out_fusionsound_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_fusionsound_la_CFLAGS = $(AM_CFLAGS) $(FUSIONSOUND_CFLAGS)
xineplug_ao_out_jack_la_SOURCES = audio_jack_out.c
xineplug_ao_out_jack_la_LIBADD = $(JACK_LIBS) $(XINE_LIB)
-xineplug_ao_out_jack_la_CFLAGS = $(VISIBILITY_FLAG) $(JACK_CFLAGS)
-xineplug_ao_out_jack_la_LDFLAGS = -avoid-version -module
+xineplug_ao_out_jack_la_CFLAGS = $(AM_FLAGS) $(JACK_CFLAGS)
diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am
index 884fcf0cc..ed513cd4d 100644
--- a/src/combined/Makefile.am
+++ b/src/combined/Makefile.am
@@ -1,21 +1,23 @@
include $(top_srcdir)/misc/Makefile.common
-if HAVE_WAVPACK
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+if ENABLE_WAVPACK
xineplug_wavpack = xineplug_wavpack.la
endif
-if HAVE_LIBFLAC
+if ENABLE_LIBFLAC
xineplug_flac = xineplug_flac.la
endif
xineplug_LTLIBRARIES = $(xineplug_wavpack) $(xineplug_flac)
xineplug_wavpack_la_SOURCES = demux_wavpack.c decoder_wavpack.c combined_wavpack.c combined_wavpack.h
-xineplug_wavpack_la_CFLAGS = $(VISIBILITY_FLAG) $(WAVPACK_CFLAGS) -I$(srcdir)/../demuxers
xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS)
-xineplug_wavpack_la_LDFLAGS = $(xineplug_ldflags)
+xineplug_wavpack_la_CFLAGS = $(AM_CFLAGS) $(WAVPACK_CFLAGS)
+xineplug_wavpack_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/demuxers
xineplug_flac_la_SOURCES = demux_flac.c decoder_flac.c demux_flac.h
-xineplug_flac_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBFLAC_CFLAGS)
xineplug_flac_la_LIBADD = $(XINE_LIB) $(LIBFLAC_LIBS)
-xineplug_flac_la_LDFLAGS = $(xineplug_ldflags)
+xineplug_flac_la_CFLAGS = $(AM_CFLAGS) $(LIBFLAC_CFLAGS)
diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am
index 8a931c2d6..b1e747bcc 100644
--- a/src/demuxers/Makefile.am
+++ b/src/demuxers/Makefile.am
@@ -1,17 +1,26 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(VISIBILITY_FLAG)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_LDFLAGS = $(xineplug_ldflags)
-if HAVE_VORBIS
+##
+# IMPORTANT:
+# ---------
+# All of xine demuxer plugins should be named like the scheme "xineplug_dmx_"
+
+xineinclude_HEADERS = demux.h
+
+noinst_HEADERS = asfheader.h qtpalette.h group_games.h group_audio.h id3.h ebml.h matroska.h iff.h flacutils.h
+
+if ENABLE_VORBIS
ogg_module = xineplug_dmx_ogg.la
endif
-if BUILD_ASF
+if ENABLE_ASF
asf_module = xineplug_dmx_asf.la
endif
-if HAVE_LIBMNG
+if ENABLE_MNG
mng_module = xineplug_dmx_mng.la
endif
@@ -19,12 +28,11 @@ if BUILD_DMX_IMAGE
image_module = xineplug_dmx_image.la
endif
-##
-# IMPORTANT:
-# ---------
-# All of xine demuxer plugins should be named like the scheme "xineplug_dmx_"
-
-xineplug_LTLIBRARIES = $(ogg_module) $(asf_module) $(mng_module) $(image_module) \
+xineplug_LTLIBRARIES = \
+ $(ogg_module) \
+ $(asf_module) \
+ $(mng_module) \
+ $(image_module) \
xineplug_dmx_games.la \
xineplug_dmx_audio.la \
xineplug_dmx_mpeg_ts.la \
@@ -70,7 +78,7 @@ xineplug_dmx_mpeg_ts_la_LIBADD = $(XINE_LIB)
xineplug_dmx_qt_la_SOURCES = demux_qt.c
xineplug_dmx_qt_la_LIBADD = $(XINE_LIB) $(ZLIB_LIBS)
-xineplug_dmx_qt_la_CPPFLAGS = $(ZLIB_CPPFLAGS)
+xineplug_dmx_qt_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
xineplug_dmx_asf_la_SOURCES = demux_asf.c asfheader.c
xineplug_dmx_asf_la_LIBADD = $(XINE_LIB)
@@ -90,7 +98,7 @@ xineplug_dmx_rawdv_la_LIBADD = $(XINE_LIB)
xineplug_dmx_mng_la_SOURCES = demux_mng.c
xineplug_dmx_mng_la_LIBADD = $(XINE_LIB) $(ZLIB_LIBS) $(MNG_LIBS)
-xineplug_dmx_mng_la_CPPFLAGS = $(ZLIB_CPPFLAGS)
+xineplug_dmx_mng_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
xineplug_dmx_pva_la_SOURCES = demux_pva.c
xineplug_dmx_pva_la_LIBADD = $(XINE_LIB)
@@ -101,7 +109,6 @@ xineplug_dmx_games_la_SOURCES = group_games.c demux_eawve.c \
demux_film.c demux_smjpeg.c demux_4xm.c \
demux_vmd.c
xineplug_dmx_games_la_LIBADD = $(XINE_LIB)
-xineplug_dmx_games_la_LDFLAGS = -avoid-version -module
xineplug_dmx_audio_la_SOURCES = group_audio.c demux_aud.c demux_aiff.c \
demux_cdda.c demux_mpgaudio.c demux_nsf.c \
@@ -127,14 +134,11 @@ xineplug_dmx_nsv_la_LIBADD = $(XINE_LIB)
xineplug_dmx_matroska_la_SOURCES = demux_matroska.c ebml.c
xineplug_dmx_matroska_la_LIBADD = $(XINE_LIB) $(ZLIB_LIBS)
-xineplug_dmx_matroska_la_CPPFLAGS = $(ZLIB_CPPFLAGS)
xineplug_dmx_matroska_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
+xineplug_dmx_matroska_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
xineplug_dmx_iff_la_SOURCES = demux_iff.c
xineplug_dmx_iff_la_LIBADD = $(XINE_LIB)
xineplug_dmx_flv_la_SOURCES = demux_flv.c
xineplug_dmx_flv_la_LIBADD = $(XINE_LIB)
-
-xineinclude_HEADERS = demux.h
-noinst_HEADERS = asfheader.h qtpalette.h group_games.h group_audio.h id3.h ebml.h matroska.h iff.h flacutils.h
diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am
index 5f413f804..26743d43c 100644
--- a/src/dxr3/Makefile.am
+++ b/src/dxr3/Makefile.am
@@ -1,40 +1,41 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(X_CFLAGS) $(LIBFAME_CFLAGS)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS =
+AM_LDFLAGS = $(xineplug_ldflags)
-if HAVE_DXR3
-dxr3_modules = xineplug_decode_dxr3_video.la \
- xineplug_decode_dxr3_spu.la \
- xineplug_vo_out_dxr3.la
-endif
if HAVE_X11
+AM_CFLAGS += $(X_CFLAGS)
link_x_libs = $(X_LIBS) -lXext
endif
if HAVE_LIBFAME
-link_fame = $(LIBFAME_LIBS)
+AM_CFLAGS += $(LIBFAME_CFLAGS)
+link_fame = $(LIBFAME_LIBS)
endif
if HAVE_LIBRTE
link_rte = -lrte
endif
-xineplug_LTLIBRARIES = $(dxr3_modules)
+noinst_HEADERS = em8300.h dxr3.h dxr3_scr.h video_out_dxr3.h
+
+if ENABLE_DXR3
+xineplug_LTLIBRARIES = xineplug_decode_dxr3_video.la \
+ xineplug_decode_dxr3_spu.la \
+ xineplug_vo_out_dxr3.la
+endif
xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c
xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB)
-xineplug_decode_dxr3_video_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_dxr3_video_la_LDFLAGS = -avoid-version -module
-if HAVE_DVDNAV
-AM_CPPFLAGS = $(DVDNAV_CFLAGS)
+if WITH_EXTERNAL_DVDNAV
xineplug_decode_dxr3_spu_la_SOURCES = dxr3_decode_spu.c
xineplug_decode_dxr3_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS)
+xineplug_decode_dxr3_spu_la_CFLAGS = $(AM_CFLAGS) $(DVDNAV_CFLAGS)
else
-AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav
xineplug_decode_dxr3_spu_la_SOURCES = dxr3_decode_spu.c nav_read.c
xineplug_decode_dxr3_spu_la_LIBADD = $(XINE_LIB)
+xineplug_decode_dxr3_spu_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/input/libdvdnav
endif
-xineplug_decode_dxr3_spu_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_dxr3_spu_la_LDFLAGS = -avoid-version -module
xineplug_vo_out_dxr3_la_SOURCES = \
dxr3_mpeg_encoders.c \
@@ -43,11 +44,3 @@ xineplug_vo_out_dxr3_la_SOURCES = \
video_out_dxr3.c
xineplug_vo_out_dxr3_la_LIBADD = $(link_fame) $(link_rte) $(link_x_libs) $(XINE_LIB) $(DYNAMIC_LD_LIBS) -lm
-xineplug_vo_out_dxr3_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_vo_out_dxr3_la_LDFLAGS = -avoid-version -module
-
-noinst_HEADERS = \
- em8300.h \
- dxr3.h \
- dxr3_scr.h \
- video_out_dxr3.h
diff --git a/src/input/Makefile.am b/src/input/Makefile.am
index ae38de187..f9f9a9fb8 100644
--- a/src/input/Makefile.am
+++ b/src/input/Makefile.am
@@ -1,12 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = input_dvd.c input_vcd.c input_gnome_vfs.c input_rtp.c
-
-if HAVE_DVDNAV
-SUBDIRS = vcd dvb libreal librtsp
-else
-SUBDIRS = vcd dvb libreal librtsp libdvdnav
-endif
+# REVISIT: This second line here bothers me more than just a little bit
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
##
# IMPORTANT:
@@ -14,46 +10,61 @@ endif
# All of xine input plugins should be named like the scheme "xineplug_inp_"
#
-if HAVE_CDROM_IOCTLS
+SUBDIRS = libreal librtsp
+if ENABLE_DVB
+SUBDIRS += dvb
+endif
+if ENABLE_VCD
+SUBDIRS += vcd
+endif
+if !WITH_EXTERNAL_DVDNAV
+SUBDIRS += libdvdnav
+endif
+
+
+xineinclude_HEADERS = input_plugin.h
+noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h
+
+
+if ENABLE_DVB
+in_dvb = xineplug_inp_dvb.la
+endif
+
+if ENABLE_VCDO
in_vcd = xineplug_inp_vcdo.la
endif
-if HAVE_V4L
+if ENABLE_V4L
in_v4l = xineplug_inp_v4l.la
in_pvr = xineplug_inp_pvr.la
endif
-if HAVE_GNOME_VFS
+if ENABLE_GNOME_VFS
in_gnome_vfs = xineplug_inp_gnome_vfs.la
endif
-if HAVE_LIBSMBCLIENT
+if ENABLE_LIBSMBCLIENT
in_smb = xineplug_inp_smb.la
endif
-# For DVD
-in_dvd = xineplug_inp_dvd.la
-if HAVE_DVDNAV
-DVD_CFLAGS = $(DVDNAV_CFLAGS)
+if WITH_EXTERNAL_DVDNAV
+DVD_CFLAGS = $(DVDNAV_CFLAGS)
link_dvdnav = $(DVDNAV_LIBS)
else
-DVD_CFLAGS = -I$(top_srcdir)/src/input/libdvdnav/
+DVD_CFLAGS = -I$(top_srcdir)/src/input/libdvdnav
link_dvdnav = libdvdnav/libdvdnav.la
endif
# not ported to native Windows
-if WIN32
-else
+if !WIN32
in_rtp = xineplug_inp_rtp.la
-in_dvb = xineplug_inp_dvb.la
endif
-AM_CFLAGS = -D_LARGEFILE64_SOURCE $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS)
xineplug_LTLIBRARIES = \
xineplug_inp_file.la \
xineplug_inp_http.la \
- $(in_dvd) \
+ xineplug_inp_dvd.la \
$(in_vcd) \
$(in_v4l) \
$(in_gnome_vfs) \
@@ -71,86 +82,55 @@ xineplug_LTLIBRARIES = \
xineplug_inp_file_la_SOURCES = input_file.c
xineplug_inp_file_la_LIBADD = $(XINE_LIB)
-xineplug_inp_file_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_file_la_LDFLAGS = -avoid-version -module
xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c
xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS)
-xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module
+xineplug_inp_dvd_la_CFLAGS = $(AM_CFLAGS) $(DVD_CFLAGS)
xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c
xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS)
-xineplug_inp_net_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_net_la_LDFLAGS = -avoid-version -module
xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c ../demuxers/asfheader.c
xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@ $(PTHREAD_LIBS)
-xineplug_inp_mms_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_mms_la_LDFLAGS = -avoid-version -module
xineplug_inp_vcdo_la_SOURCES = input_vcd.c media_helper.c
xineplug_inp_vcdo_la_LIBADD = $(XINE_LIB)
-xineplug_inp_vcdo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module
xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c
xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_inp_stdin_fifo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module
xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c
xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS)
-xineplug_inp_rtp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module
xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c
xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS)
-xineplug_inp_http_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_http_la_LDFLAGS = -avoid-version -module
xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c
xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_inp_pnm_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module
xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c
xineplug_inp_dvb_la_DEPS = $(XDG_BASEDIR_DEPS)
xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(XDG_BASEDIR_LIBS)
-xineplug_inp_dvb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS)
-xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module
+xineplug_inp_dvb_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS)
xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c
xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) libreal/libreal.la librtsp/librtsp.la
-xineplug_inp_rtsp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module
xineplug_inp_cdda_la_SOURCES = input_cdda.c media_helper.c sha1.c sha1.h base64.c base64.h
xineplug_inp_cdda_la_DEPS = $(XDG_BASEDIR_DEPS)
xineplug_inp_cdda_la_LIBADD = $(XINE_LIB) $(XDG_BASEDIR_LIBS)
-xineplug_inp_cdda_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS)
-xineplug_inp_cdda_la_LDFLAGS = -avoid-version -module
+xineplug_inp_cdda_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS)
xineplug_inp_v4l_la_SOURCES = input_v4l.c
xineplug_inp_v4l_la_LIBADD = $(ALSA_LIBS) $(XINE_LIB)
-xineplug_inp_v4l_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module
+xineplug_inp_v4l_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c
xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_inp_gnome_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module
+xineplug_inp_gnome_vfs_la_CFLAGS = $(AM_CFLAGS) $(GNOME_VFS_CFLAGS)
xineplug_inp_smb_la_SOURCES = input_smb.c
xineplug_inp_smb_la_LIBADD = $(LIBSMBCLIENT_LIBS) $(XINE_LIB)
-xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_smb_la_LDFLAGS = -avoid-version -module
xineplug_inp_pvr_la_SOURCES = input_pvr.c
xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module
-
-xineinclude_HEADERS = input_plugin.h
-noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h
-
diff --git a/src/input/libdvdnav/Makefile.am b/src/input/libdvdnav/Makefile.am
index 412828261..f741b4f17 100644
--- a/src/input/libdvdnav/Makefile.am
+++ b/src/input/libdvdnav/Makefile.am
@@ -1,6 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -DDVDNAV_COMPILE -DHAVE_DLFCN_H
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -DDVDNAV_COMPILE -DHAVE_DLFCN_H
+AM_LDFLAGS = $(xineplug_ldflags)
noinst_LTLIBRARIES = libdvdnav.la
@@ -23,8 +25,6 @@ libdvdnav_la_SOURCES = \
dvd_input.c \
dvd_udf.c
libdvdnav_la_LIBADD = $(PTHREAD_LIBS)
-libdvdnav_la_CFLAGS = $(VISIBILITY_FLAG)
-libdvdnav_la_LDFLAGS = -avoid-version -module
noinst_HEADERS = \
decoder.h \
diff --git a/src/input/libreal/Makefile.am b/src/input/libreal/Makefile.am
index 5b10d1bca..bd97a7548 100644
--- a/src/input/libreal/Makefile.am
+++ b/src/input/libreal/Makefile.am
@@ -1,19 +1,10 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../librtsp
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(top_srcdir)/src/input/librtsp
-noinst_LTLIBRARIES = libreal.la
-
-libreal_la_SOURCES = \
- real.c \
- asmrp.c \
- rmff.c \
- sdpplin.c
+noinst_HEADERS = real.h asmrp.h rmff.h sdpplin.h
-libreal_la_CFLAGS = $(VISIBILITY_FLAG)
+noinst_LTLIBRARIES = libreal.la
-noinst_HEADERS = \
- real.h \
- asmrp.h \
- rmff.h \
- sdpplin.h
+libreal_la_SOURCES = real.c asmrp.c rmff.c sdpplin.c
diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am
index bb85f9cf4..68d554c2c 100644
--- a/src/input/librtsp/Makefile.am
+++ b/src/input/librtsp/Makefile.am
@@ -1,16 +1,10 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../libreal
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(top_srcdir)/src/input/libreal
-noinst_LTLIBRARIES = librtsp.la
-
-librtsp_la_SOURCES = \
- rtsp.c \
- rtsp_session.c
+noinst_HEADERS = rtsp.h rtsp_session.h
-librtsp_la_CFLAGS = $(VISIBILITY_FLAG)
-librtsp_la_LDFLAGS = -avoid-version -module
+noinst_LTLIBRARIES = librtsp.la
-noinst_HEADERS = \
- rtsp.h \
- rtsp_session.h
+librtsp_la_SOURCES = rtsp.c rtsp_session.c
diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am
index 16eece779..3de899f7e 100644
--- a/src/input/vcd/Makefile.am
+++ b/src/input/vcd/Makefile.am
@@ -1,24 +1,17 @@
include $(top_srcdir)/misc/Makefile.common
-SUBDIRS = libcdio libvcd
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
-vcd_SRCS = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c
+SUBDIRS =
+if !WITH_EXTERNAL_VCDLIBS
+SUBDIRS += libcdio libvcd
+endif
-EXTRA_DIST = $(vcd_SRCS)
+noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h
-if ENABLE_VCD
xineplug_LTLIBRARIES = xineplug_inp_vcd.la
-AM_CFLAGS = $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS)
-
-xineplug_inp_vcd_la_SOURCES = $(vcd_SRCS)
-xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module
-if HAVE_VCDNAV
-xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS)
-else
-xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm
-endif
-
-endif
-
-noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h
+xineplug_inp_vcd_la_SOURCES = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c
+xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBCDIO_LIBS) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) $(LIBISO9660_LIBS) -lm
+xineplug_inp_vcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS)
diff --git a/src/input/vcd/libcdio/Makefile.am b/src/input/vcd/libcdio/Makefile.am
index c7415e787..a79525c8f 100644
--- a/src/input/vcd/libcdio/Makefile.am
+++ b/src/input/vcd/libcdio/Makefile.am
@@ -1,10 +1,24 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
SUBDIRS = cdio MSWindows image
-INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
+INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
+
+noinst_HEADERS = \
+ cdio_assert.h \
+ _cdio_stdio.h \
+ scsi_mmc.h \
+ cdio_private.h \
+ _cdio_stream.h \
+ iso9660_private.h \
+ portable.h
+
+noinst_LTLIBRARIES = libcdio.la libiso9660.la
-libcdio_SRCS = \
+libcdio_la_SOURCES = \
_cdio_bsdi.c \
_cdio_generic.c \
_cdio_linux.c \
@@ -41,30 +55,8 @@ libcdio_SRCS = \
sector.c \
util.c
-libiso9660_SRCS = \
+libiso9660_la_SOURCES = \
iso9660.c \
iso9660_private.h \
iso9660_fs.c \
xa.c
-
-EXTRA_DIST = $(libcdio_SRCS) $(libiso9660_SRCS)
-
-if ENABLE_VCD
-if HAVE_VCDNAV
-else
-noinst_LTLIBRARIES = libcdio.la libiso9660.la
-libcdio_la_SOURCES = $(libcdio_SRCS)
-libcdio_la_LDFLAGS = -avoid-version -module
-libiso9660_la_SOURCES = $(libiso9660_SRCS)
-libiso9660_la_LDFLAGS = -avoid-version -module
-endif
-endif
-
-noinst_HEADERS = \
- cdio_assert.h \
- _cdio_stdio.h \
- scsi_mmc.h \
- cdio_private.h \
- _cdio_stream.h \
- iso9660_private.h \
- portable.h
diff --git a/src/input/vcd/libvcd/Makefile.am b/src/input/vcd/libvcd/Makefile.am
index 01b100aa4..c922685e3 100644
--- a/src/input/vcd/libvcd/Makefile.am
+++ b/src/input/vcd/libvcd/Makefile.am
@@ -1,10 +1,35 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
+
SUBDIRS = libvcd
-INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib
+noinst_HEADERS = \
+ vcd_assert.h \
+ data_structures.h \
+ info_private.h \
+ pbc.h \
+ stream_stdio.h \
+ bitvec.h \
+ dict.h \
+ mpeg.h \
+ salloc.h \
+ util.h \
+ bytesex_asm.h \
+ directory.h \
+ mpeg_stream.h \
+ sector_private.h \
+ vcd.h \
+ bytesex.h \
+ image_sink.h \
+ obj.h \
+ stream.h \
+ vcd_read.h
-libvcd_SRCS = \
+noinst_LTLIBRARIES = libvcd.la libvcdinfo.la
+libvcd_la_SOURCES = \
vcd.c \
data_structures.c \
directory.c \
@@ -22,45 +47,11 @@ libvcd_SRCS = \
stream.c \
stream_stdio.c \
util.c
+libvcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS)
-libvcdinfo_SRCS = \
+libvcdinfo_la_SOURCES = \
info.c \
inf.c \
info_private.c \
vcd_read.c
-
-EXTRA_DIST = $(libvcd_SRCS) $(libvcdinfo_SRCS)
-
-if ENABLE_VCD
-if HAVE_VCDNAV
-else
-noinst_LTLIBRARIES = libvcd.la libvcdinfo.la
-libvcd_la_SOURCES = $(libvcd_SRCS)
-libvcd_la_LDFLAGS = -avoid-version -module
-libvcd_la_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS)
-libvcdinfo_la_SOURCES = $(libvcdinfo_SRCS)
-libvcdinfo_la_LDFLAGS = -avoid-version -module
-endif
-endif
-
-noinst_HEADERS = \
- vcd_assert.h \
- data_structures.h \
- info_private.h \
- pbc.h \
- stream_stdio.h \
- bitvec.h \
- dict.h \
- mpeg.h \
- salloc.h \
- util.h \
- bytesex_asm.h \
- directory.h \
- mpeg_stream.h \
- sector_private.h \
- vcd.h \
- bytesex.h \
- image_sink.h \
- obj.h \
- stream.h \
- vcd_read.h
+libvcdinfo_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS)
diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am
index 6a0aebe62..1025b373d 100644
--- a/src/liba52/Makefile.am
+++ b/src/liba52/Makefile.am
@@ -1,38 +1,21 @@
include $(top_srcdir)/misc/Makefile.common
-if A52
-a52_module = xineplug_decode_a52.la
-endif
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
-xineplug_LTLIBRARIES = $(a52_module)
+noinst_HEADERS = a52.h a52_internal.h bitstream.h tables.h crc.c
-if EXTERNAL_A52DEC
-internal_sources =
-else
-internal_sources = \
- bitstream.c \
- bit_allocate.c \
- downmix.c \
- imdct.c \
- parse.c
+if ENABLE_A52DEC
+xineplug_LTLIBRARIES = xineplug_decode_a52.la
endif
-xineplug_decode_a52_la_SOURCES = \
- xine_a52_decoder.c \
- $(internal_sources)
-
-if EXTERNAL_A52DEC
-xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -la52 -lm
+if WITH_EXTERNAL_A52DEC
+external_libs = -la52
+internal_sources =
else
-xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -lm
+external_libs =
+internal_sources = bitstream.c bit_allocate.c downmix.c imdct.c parse.c
endif
-xineplug_decode_a52_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_decode_a52_la_LDFLAGS = $(xineplug_ldflags)
-
-noinst_HEADERS = \
- a52.h \
- a52_internal.h \
- bitstream.h \
- tables.h \
- crc.c
+xineplug_decode_a52_la_SOURCES = xine_a52_decoder.c $(internal_sources)
+xineplug_decode_a52_la_LIBADD = $(XINE_LIB) $(external_libs) -lm
diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am
index d1a4ed865..379033b15 100644
--- a/src/libfaad/Makefile.am
+++ b/src/libfaad/Makefile.am
@@ -1,59 +1,11 @@
include $(top_srcdir)/misc/Makefile.common
-SUBDIRS = codebook
-
-if BUILD_FAAD
-faad_module = xineplug_decode_faad.la
-endif
-
-xineplug_LTLIBRARIES = $(faad_module)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
VPATH = @srcdir@:@srcdir@/codebook:
-xineplug_decode_faad_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
-xineplug_decode_faad_la_SOURCES = \
- bits.c \
- cfft.c \
- common.c \
- decoder.c \
- drc.c \
- drm_dec.c \
- error.c \
- filtbank.c \
- hcr.c \
- huffman.c \
- ic_predict.c \
- is.c \
- lt_predict.c \
- mdct.c \
- mp4.c \
- ms.c \
- output.c \
- pns.c \
- ps_dec.c \
- ps_syntax.c \
- pulse.c \
- rvlc.c \
- sbr_dct.c \
- sbr_dec.c \
- sbr_e_nf.c \
- sbr_fbt.c \
- sbr_hfadj.c \
- sbr_hfgen.c \
- sbr_huff.c \
- sbr_qmf.c \
- sbr_syntax.c \
- sbr_tf_grid.c \
- specrec.c \
- ssr.c \
- ssr_fb.c \
- ssr_ipqf.c \
- syntax.c \
- tns.c \
- xine_faad_decoder.c
-
-xineplug_decode_faad_la_LDFLAGS = $(xineplug_ldflags)
-xineplug_decode_faad_la_LIBADD = -lm $(XINE_LIB)
+SUBDIRS = codebook
noinst_HEADERS = \
analysis.h \
@@ -104,3 +56,51 @@ noinst_HEADERS = \
structs.h \
syntax.h \
tns.h
+
+if ENABLE_FAAD
+xineplug_LTLIBRARIES = xineplug_decode_faad.la
+endif
+
+xineplug_decode_faad_la_SOURCES = \
+ bits.c \
+ cfft.c \
+ common.c \
+ decoder.c \
+ drc.c \
+ drm_dec.c \
+ error.c \
+ filtbank.c \
+ hcr.c \
+ huffman.c \
+ ic_predict.c \
+ is.c \
+ lt_predict.c \
+ mdct.c \
+ mp4.c \
+ ms.c \
+ output.c \
+ pns.c \
+ ps_dec.c \
+ ps_syntax.c \
+ pulse.c \
+ rvlc.c \
+ sbr_dct.c \
+ sbr_dec.c \
+ sbr_e_nf.c \
+ sbr_fbt.c \
+ sbr_hfadj.c \
+ sbr_hfgen.c \
+ sbr_huff.c \
+ sbr_qmf.c \
+ sbr_syntax.c \
+ sbr_tf_grid.c \
+ specrec.c \
+ ssr.c \
+ ssr_fb.c \
+ ssr_ipqf.c \
+ syntax.c \
+ tns.c \
+ xine_faad_decoder.c
+
+xineplug_decode_faad_la_LIBADD = -lm $(XINE_LIB)
+xineplug_decode_faad_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index 7b622cf74..ab866706c 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -1,17 +1,19 @@
include $(top_srcdir)/misc/Makefile.common
-if HAVE_FFMPEG
-AM_CFLAGS = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
-link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
+AM_LDFLAGS = $(xineplug_ldflags)
+if WITH_EXTERNAL_FFMPEG
+AM_CFLAGS += $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
+link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
else
-ff_cppflags = -I$(top_srcdir)/contrib/ffmpeg/libavutil \
+AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libavutil \
-I$(top_srcdir)/contrib/ffmpeg/libavcodec \
-I$(top_srcdir)/contrib/ffmpeg/libpostproc
-link_ffmpeg = \
- $(top_builddir)/contrib/ffmpeg/libavcodec/libavcodec.a \
- $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a \
- $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a
+link_ffmpeg = $(top_builddir)/contrib/ffmpeg/libavcodec/libavcodec.a \
+ $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a \
+ $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a
$(top_builddir)/contrib/ffmpeg/libavcodec/libavcodec.a:
$(MAKE) -C $(top_builddir)/contrib/ ffmpeg/libavcodec/libavcodec.a
@@ -29,7 +31,7 @@ ffmpeg_config.h: $(top_builddir)/contrib/ffmpeg/config.h
cp $(top_builddir)/contrib/ffmpeg/config.h ffmpeg_config.h
BUILT_SOURCES = ffmpeg_config.h
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES)
endif
@@ -38,26 +40,23 @@ EXTRA_DIST = ffmpeg_encoder.c
xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la
-if HAVE_DXR3
-AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \
- $(ZLIB_CPPFLAGS)
+if ENABLE_DXR3
+AM_CFLAGS += $(X_CFLAGS)
+AM_CPPFLAGS += -I$(top_srcdir)/src/dxr3
xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \
ff_mpeg_parser.h
else
-AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS)
xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \
ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h
endif
nodist_xineplug_decode_ff_la_SOURCES = ffmpeg_config.h
-xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
$(link_ffmpeg) $(PTHREAD_LIBS)
+xineplug_decode_ff_la_LDFLAGS = $(AM_LDFLAGS) $(IMPURE_TEXT_LDFLAGS)
-xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -I $(top_srcdir)/contrib/ffmpeg/libavcodec
-xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags)
-xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c
-xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB)
+xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c
+xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB)
+xineplug_decode_dvaudio_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/contrib/ffmpeg/libavcodec
diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am
index c879645c5..482d68bb3 100644
--- a/src/libmad/Makefile.am
+++ b/src/libmad/Makefile.am
@@ -1,43 +1,11 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = -DOPT_SPEED
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -DOPT_SPEED
+AM_LDFLAGS = $(xineplug_ldflags)
EXTRA_DIST = imdct_l_arm.S
-if MAD
-mad_module = xineplug_decode_mad.la
-endif
-
-xineplug_LTLIBRARIES = $(mad_module)
-
-if EXTERNAL_LIBMAD
-internal_sources =
-else
-internal_sources = \
- bit.c \
- fixed.c \
- frame.c \
- huffman.c \
- layer12.c \
- layer3.c \
- stream.c \
- synth.c \
- timer.c \
- version.c
-endif
-
-xineplug_decode_mad_la_SOURCES = \
- xine_mad_decoder.c \
- $(internal_sources)
-
-if EXTERNAL_LIBMAD
-xineplug_decode_mad_la_LIBADD = $(XINE_LIB) $(LIBMAD_LIBS)
-else
-xineplug_decode_mad_la_LIBADD = $(XINE_LIB)
-endif
-xineplug_decode_mad_la_CFLAGS = $(LIBMAD_CFLAGS) $(VISIBILITY_FLAG)
-xineplug_decode_mad_la_LDFLAGS = $(xineplug_ldflags)
-
noinst_HEADERS = \
D.dat \
imdct_s.dat \
@@ -55,3 +23,29 @@ noinst_HEADERS = \
synth.h \
timer.h \
version.h
+
+if ENABLE_MAD
+xineplug_LTLIBRARIES = xineplug_decode_mad.la
+endif
+
+if WITH_EXTERNAL_MAD
+internal_sources =
+external_libs = $(LIBMAD_LIBS)
+else
+internal_sources = \
+ bit.c \
+ fixed.c \
+ frame.c \
+ huffman.c \
+ layer12.c \
+ layer3.c \
+ stream.c \
+ synth.c \
+ timer.c \
+ version.c
+external_libs =
+endif
+
+xineplug_decode_mad_la_SOURCES = xine_mad_decoder.c $(internal_sources)
+xineplug_decode_mad_la_LIBADD = $(XINE_LIB) $(external_libs)
+xineplug_decode_mad_la_CFLAGS = $(AM_CFLAGS) $(LIBMAD_CFLAGS)
diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am
index 66fb39f13..d772f0e09 100644
--- a/src/libmpeg2/Makefile.am
+++ b/src/libmpeg2/Makefile.am
@@ -1,5 +1,11 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \
+ libmpeg2_accel.h
+
xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la
xineplug_decode_mpeg2_la_SOURCES = \
@@ -23,8 +29,4 @@ xineplug_decode_mpeg2_la_SOURCES = \
libmpeg2_accel.c
xineplug_decode_mpeg2_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm
-xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS)
-xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags)
-
-noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \
- libmpeg2_accel.h
+xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS)
diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am
index 49959da86..8c248fdcb 100644
--- a/src/libmpeg2new/Makefile.am
+++ b/src/libmpeg2new/Makefile.am
@@ -1,13 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
SUBDIRS = libmpeg2
xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la
-xineplug_decode_mpeg2_la_SOURCES = \
- xine_mpeg2_decoder.c
-
-xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS)
+xineplug_decode_mpeg2_la_SOURCES = xine_mpeg2_decoder.c
xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la
-xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags)
-
+xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS)
diff --git a/src/libmpeg2new/libmpeg2/Makefile.am b/src/libmpeg2new/libmpeg2/Makefile.am
index f99894f12..2caa3ddc2 100644
--- a/src/libmpeg2new/libmpeg2/Makefile.am
+++ b/src/libmpeg2new/libmpeg2/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la
libmpeg2_la_SOURCES = alloc.c header.c decode.c slice.c motion_comp.c idct.c
@@ -10,4 +12,3 @@ libmpeg2arch_la_SOURCES = motion_comp_mmx.c idct_mmx.c \
motion_comp_alpha.c idct_alpha.c \
motion_comp_vis.c \
cpu_accel.c cpu_state.c
-
diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am
index c9cf62984..0f765394e 100644
--- a/src/libreal/Makefile.am
+++ b/src/libreal/Makefile.am
@@ -1,12 +1,13 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+noinst_HEADERS = real_common.h
+
if ENABLE_REAL
xineplug_LTLIBRARIES = xineplug_decode_real.la
endif
xineplug_decode_real_la_SOURCES = xine_real_video_decoder.c real_common.c xine_real_audio_decoder.c
xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS)
-xineplug_decode_real_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_decode_real_la_LDFLAGS = $(xineplug_ldflags)
-
-noinst_HEADERS = real_common.h
diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am
index aefe4d7c1..87266505c 100644
--- a/src/libspucc/Makefile.am
+++ b/src/libspucc/Makefile.am
@@ -1,10 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
+noinst_HEADERS = cc_decoder.h
+
xineplug_LTLIBRARIES = xineplug_decode_spucc.la
xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c
-xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
xineplug_decode_spucc_la_LIBADD = $(XINE_LIB)
-xineplug_decode_spucc_la_LDFLAGS = -avoid-version -module
-
-noinst_HEADERS = cc_decoder.h
+xineplug_decode_spucc_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
diff --git a/src/libspucmml/Makefile.am b/src/libspucmml/Makefile.am
index ac2970482..fb92ff589 100644
--- a/src/libspucmml/Makefile.am
+++ b/src/libspucmml/Makefile.am
@@ -1,8 +1,9 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
xineplug_LTLIBRARIES = xineplug_decode_spucmml.la
xineplug_decode_spucmml_la_SOURCES = xine_cmml_decoder.c
xineplug_decode_spucmml_la_LIBADD = $(XINE_LIB)
-xineplug_decode_spucmml_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_decode_spucmml_la_LDFLAGS = $(xineplug_ldflags)
diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am
index 208d994f5..62de3774d 100644
--- a/src/libspudec/Makefile.am
+++ b/src/libspudec/Makefile.am
@@ -1,26 +1,21 @@
include $(top_srcdir)/misc/Makefile.common
-xineplug_LTLIBRARIES = xineplug_decode_spu.la
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav
+AM_LDFLAGS = $(xineplug_ldflags)
-if HAVE_DVDNAV
+noinst_HEADERS = spu.h
-xineplug_decode_spu_la_SOURCES = \
- spu.c \
- xine_spu_decoder.c
-xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS) $(PTHREAD_LIBS)
+xineplug_LTLIBRARIES = xineplug_decode_spu.la
+if WITH_EXTERNAL_DVDNAV
+external_dvdnav_libs = $(DVDNAV_LIBS)
+internal_dvdnav_sources =
else
-
-xineplug_decode_spu_la_SOURCES = \
- nav_read.c \
- spu.c \
- xine_spu_decoder.c
-AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav
-xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-
+external_dvdnav_libs =
+internal_dvdnav_sources = nav_read.c
endif
-xineplug_decode_spu_la_CFLAGS = $(DVDNAV_CFLAGS) $(VISIBILITY_FLAG)
-xineplug_decode_spu_la_LDFLAGS = $(xineplug_ldflags)
-
-noinst_HEADERS = spu.h
+xineplug_decode_spu_la_SOURCES = $(internal_dvdnav_sources) spu.c xine_spu_decoder.c
+xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(external_dvdnav_libs) $(PTHREAD_LIBS)
+xineplug_decode_spu_la_CFLAGS = $(AM_CFLAGS) $(DVDNAV_CFLAGS)
diff --git a/src/libspudvb/Makefile.am b/src/libspudvb/Makefile.am
index e385e5553..f822df0d9 100644
--- a/src/libspudvb/Makefile.am
+++ b/src/libspudvb/Makefile.am
@@ -1,8 +1,9 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
xineplug_LTLIBRARIES = xineplug_decode_spudvb.la
xineplug_decode_spudvb_la_SOURCES = xine_spudvb_decoder.c
xineplug_decode_spudvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_decode_spudvb_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_decode_spudvb_la_LDFLAGS = $(xineplug_ldflags)
diff --git a/src/libsputext/Makefile.am b/src/libsputext/Makefile.am
index 5e4ce59d0..f09219043 100644
--- a/src/libsputext/Makefile.am
+++ b/src/libsputext/Makefile.am
@@ -1,13 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_LDFLAGS = $(xineplug_ldflags)
xineplug_LTLIBRARIES = xineplug_decode_sputext.la xineplug_dmx_sputext.la
xineplug_dmx_sputext_la_SOURCES = demux_sputext.c
xineplug_dmx_sputext_la_LIBADD = $(XINE_LIB)
-xineplug_dmx_sputext_la_CFLAGS = $(VISIBILITY_FLAG)
xineplug_decode_sputext_la_SOURCES = xine_sputext_decoder.c
xineplug_decode_sputext_la_LIBADD = $(XINE_LIB)
-xineplug_decode_sputext_la_CFLAGS = $(VISIBILITY_FLAG)
diff --git a/src/libw32dll/DirectShow/Makefile.am b/src/libw32dll/DirectShow/Makefile.am
index a74c65815..02eddc00a 100644
--- a/src/libw32dll/DirectShow/Makefile.am
+++ b/src/libw32dll/DirectShow/Makefile.am
@@ -1,26 +1,9 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer \
- -Wmissing-prototypes -Wimplicit-function-declaration \
- -DWIN32_PATH=\"@w32_path@\" -DNOAVIFILE_HEADERS \
+AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer
+AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS \
-I$(srcdir)/.. -I$(srcdir)/../wine
-if HAVE_W32DLL
-ds_filter_lib = libds_filter.la
-endif
-
-noinst_LTLIBRARIES = $(ds_filter_lib)
-
-libds_filter_la_SOURCES = \
- allocator.c \
- cmediasample.c \
- guids.c \
- inputpin.c \
- outputpin.c \
- DS_Filter.c \
- DS_AudioDecoder.c \
- DS_VideoDecoder.c
-
noinst_HEADERS = \
allocator.h \
cmediasample.h \
@@ -32,3 +15,15 @@ noinst_HEADERS = \
DS_AudioDecoder.h \
DS_Filter.h \
DS_VideoDecoder.h
+
+noinst_LTLIBRARIES = libds_filter.la
+
+libds_filter_la_SOURCES = \
+ allocator.c \
+ cmediasample.c \
+ guids.c \
+ inputpin.c \
+ outputpin.c \
+ DS_Filter.c \
+ DS_AudioDecoder.c \
+ DS_VideoDecoder.c
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am
index 367dc3bda..7d11bb2dc 100644
--- a/src/libw32dll/Makefile.am
+++ b/src/libw32dll/Makefile.am
@@ -1,39 +1,32 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" $(VISIBILITY_FLAG)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"$(w32_path)\"
+AM_LDFLAGS = $(xineplug_ldflags)
-SUBDIRS = wine DirectShow dmo qtx
-
-if HAVE_W32DLL
-w32dll_codec = xineplug_decode_w32dll.la
-qt_codec = xineplug_decode_qt.la
+SUBDIRS =
+if ENABLE_W32DLL
+SUBDIRS += wine DirectShow dmo qtx
endif
-xineplug_LTLIBRARIES = $(w32dll_codec) $(qt_codec)
-
EXTRA_DIST = common.c
+noinst_HEADERS = libwin32.h w32codec.h
+
+if ENABLE_W32DLL
+xineplug_LTLIBRARIES = xineplug_decode_w32dll.la xineplug_decode_qt.la
+endif
+
xineplug_decode_w32dll_la_SOURCES = w32codec.c
-xineplug_decode_w32dll_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS)
-xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module
xineplug_decode_w32dll_la_DEPS = $(XDG_BASEDIR_DEPS)
xineplug_decode_w32dll_la_LIBADD = \
$(top_builddir)/src/libw32dll/wine/libwine.la \
- $(XINE_LIB) \
- $(PTHREAD_LIBS) \
- -lm \
$(top_builddir)/src/libw32dll/DirectShow/libds_filter.la \
$(top_builddir)/src/libw32dll/dmo/libdmo_filter.la \
- @KSTAT_LIBS@ \
- $(XDG_BASEDIR_LIBS)
+ $(XINE_LIB) $(PTHREAD_LIBS) -lm $(KSTAT_LIBS) $(XDG_BASEDIR_LIBS)
+xineplug_decode_w32dll_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS)
xineplug_decode_qt_la_SOURCES = qt_decoder.c
-xineplug_decode_qt_la_LDFLAGS = -avoid-version -module
xineplug_decode_qt_la_LIBADD = \
$(top_builddir)/src/libw32dll/wine/libwine.la \
- $(XINE_LIB) \
- $(PTHREAD_LIBS) \
- -lm \
- @KSTAT_LIBS@
-
-noinst_HEADERS = libwin32.h w32codec.h
+ $(XINE_LIB) $(PTHREAD_LIBS) -lm $(KSTAT_LIBS)
diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am
index 2b7cd3e37..531a4559a 100644
--- a/src/libw32dll/dmo/Makefile.am
+++ b/src/libw32dll/dmo/Makefile.am
@@ -1,22 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer \
- -Wmissing-prototypes -Wimplicit-function-declaration \
- -DWIN32_PATH=\"@w32_path@\" -DNOAVIFILE_HEADERS \
- -I$(srcdir)/.. -I$(srcdir)/../wine
-
-if HAVE_W32DLL
-dmo_filter_lib = libdmo_filter.la
-endif
-
-noinst_LTLIBRARIES = $(dmo_filter_lib)
-
-libdmo_filter_la_SOURCES = \
- buffer.c \
- DMO_AudioDecoder.c \
- dmo.c \
- dmo_guids.c \
- DMO_VideoDecoder.c
+AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer
+AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS -I$(srcdir)/.. -I$(srcdir)/../wine
noinst_HEADERS = \
DMO_AudioDecoder.h \
@@ -25,3 +10,12 @@ noinst_HEADERS = \
DMO_Filter.h \
dmo.h \
DMO_VideoDecoder.h
+
+noinst_LTLIBRARIES = libdmo_filter.la
+
+libdmo_filter_la_SOURCES = \
+ buffer.c \
+ DMO_AudioDecoder.c \
+ dmo.c \
+ dmo_guids.c \
+ DMO_VideoDecoder.c
diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am
index b53d2c078..1756e3262 100644
--- a/src/libw32dll/wine/Makefile.am
+++ b/src/libw32dll/wine/Makefile.am
@@ -1,41 +1,13 @@
include $(top_srcdir)/misc/Makefile.common
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-
-EXTRA_DIST = stubs.s wrapper.S
-
-noinst_LTLIBRARIES = $(wine_lib)
-
-AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \
- -Wmissing-prototypes -Wimplicit-function-declaration \
- -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \
+# disable -fomit-frame-pointer, -finline-functions, and -frename-registers
+# because they cause bad behavior of wine
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) @W32_NO_OPTIMIZE@ \
+ -fno-omit-frame-pointer -fno-inline-functions -fno-rename-registers
+AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -I$(srcdir)/.. -D__WINE__ \
-Ddbg_printf=__vprintf -DTRACE=__vprintf
-# CFLAGS is here to filter out -fomit-frame-pointer,
-# -finline-functions and -frename-registers because they cause bad
-# behavior of wine
-CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-finline-functions//g;s/-frename-registers//g'`
-
-if HAVE_W32DLL
-wine_lib = libwine.la
-endif
-
-libwine_la_SOURCES = \
- afl.c \
- driver.c \
- elfdll.c \
- ext.c \
- ldt_keeper.c \
- module.c \
- pe_image.c \
- pe_resource.c \
- resource.c \
- registry.c \
- vfl.c \
- win32.c \
- stubs.s \
- wrapper.S
-libwine_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS)
+EXTRA_DIST = stubs.s wrapper.S
noinst_HEADERS = \
avifmt.h \
@@ -75,3 +47,21 @@ noinst_HEADERS = \
winuser.h \
wrapper.h
+noinst_LTLIBRARIES = libwine.la
+
+libwine_la_SOURCES = \
+ afl.c \
+ driver.c \
+ elfdll.c \
+ ext.c \
+ ldt_keeper.c \
+ module.c \
+ pe_image.c \
+ pe_resource.c \
+ resource.c \
+ registry.c \
+ vfl.c \
+ win32.c \
+ stubs.s \
+ wrapper.S
+libwine_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS)
diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am
index 08d1df3dc..474dda1a1 100644
--- a/src/libxineadec/Makefile.am
+++ b/src/libxineadec/Makefile.am
@@ -1,24 +1,25 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = fooaudio.c
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
SUBDIRS = gsm610 nosefart
-AM_LDFLAGS = $(xineplug_ldflags)
+EXTRA_DIST = fooaudio.c
-if HAVE_VORBIS
+if ENABLE_VORBIS
vorbis_module = xineplug_decode_vorbis.la
endif
-if HAVE_SPEEX
+if ENABLE_SPEEX
speex_module = xineplug_decode_speex.la
endif
-if MUSEPACK
+if ENABLE_MUSEPACK
musepack_module = xineplug_decode_mpc.la
endif
-if DTS
+if ENABLE_DTS
dts_module = xineplug_decode_dts.la
endif
@@ -38,31 +39,30 @@ xineplug_LTLIBRARIES = \
$(dts_module)
xineplug_decode_gsm610_la_SOURCES = gsm610.c
-xineplug_decode_gsm610_la_CFLAGS = $(VISIBILITY_FLAG)
xineplug_decode_gsm610_la_LIBADD = $(XINE_LIB) gsm610/libgsm610.la
xineplug_decode_nsf_la_SOURCES = nsf.c
-xineplug_decode_nsf_la_CFLAGS = $(VISIBILITY_FLAG) -DNSF_PLAYER -fno-strict-aliasing
xineplug_decode_nsf_la_LIBADD = $(XINE_LIB) -lm nosefart/libnosefart.la
+xineplug_decode_nsf_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
+xineplug_decode_nsf_la_CPPFLAGS = $(AM_CPPFLAGS) -DNSF_PLAYER
xineplug_decode_lpcm_la_SOURCES = xine_lpcm_decoder.c
-xineplug_decode_lpcm_la_CFLAGS = $(VISIBILITY_FLAG)
xineplug_decode_lpcm_la_LIBADD = $(XINE_LIB)
xineplug_decode_vorbis_la_SOURCES = xine_vorbis_decoder.c
xineplug_decode_vorbis_la_LIBADD = $(XINE_LIB) $(VORBIS_LIBS) $(OGG_LIBS)
-xineplug_decode_vorbis_la_CFLAGS = $(VISIBILITY_FLAG) $(VORBIS_CFLAGS)
+xineplug_decode_vorbis_la_CFLAGS = $(AM_CFLAGS) $(VORBIS_CFLAGS)
xineplug_decode_speex_la_SOURCES = xine_speex_decoder.c
xineplug_decode_speex_la_LIBADD = $(XINE_LIB) $(SPEEX_LIBS)
-xineplug_decode_speex_la_CFLAGS = $(VISIBILITY_FLAGS) $(SPEEX_CFLAGS)
+xineplug_decode_speex_la_CFLAGS = $(AM_CFLAGS) $(SPEEX_CFLAGS)
xineplug_decode_mpc_la_SOURCES = xine_musepack_decoder.c
-xineplug_decode_mpc_la_CFLAGS = $(VISIBILITY_FLAG) $(MPCDEC_CFLAGS)
xineplug_decode_mpc_la_DEPENDENCIES = $(MPCDEC_DEPS)
xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(MPCDEC_LIBS)
+xineplug_decode_mpc_la_CFLAGS = $(AM_CFLAGS) $(MPCDEC_CFLAGS)
xineplug_decode_dts_la_SOURCES = xine_dts_decoder.c
-xineplug_decode_dts_la_CFLAGS = $(LIBDTS_CFLAGS) $(VISIBILITY_FLAG)
xineplug_decode_dts_la_DEPENDENCIES = $(LIBDTS_DEPS)
xineplug_decode_dts_la_LIBADD = $(XINE_LIB) $(LIBDTS_LIBS)
+xineplug_decode_dts_la_CFLAGS = $(AM_CFLAGS) $(LIBDTS_CFLAGS)
diff --git a/src/libxineadec/gsm610/Makefile.am b/src/libxineadec/gsm610/Makefile.am
index fe25ad9c3..f2011dfd4 100644
--- a/src/libxineadec/gsm610/Makefile.am
+++ b/src/libxineadec/gsm610/Makefile.am
@@ -1,5 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
noinst_LTLIBRARIES = libgsm610.la
libgsm610_la_SOURCES = \
@@ -14,8 +17,6 @@ libgsm610_la_SOURCES = \
short_term.c \
table.c
-libgsm610_la_CFLAGS = $(VISIBILITY_FLAG)
-libgsm610_la_LDFLAGS = -avoid-version -module
noinst_HEADERS = \
gsm_config.h \
diff --git a/src/libxineadec/nosefart/Makefile.am b/src/libxineadec/nosefart/Makefile.am
index 51cc3f238..83c04a28d 100644
--- a/src/libxineadec/nosefart/Makefile.am
+++ b/src/libxineadec/nosefart/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+
noinst_LTLIBRARIES = libnosefart.la
libnosefart_la_SOURCES = \
@@ -15,7 +17,8 @@ libnosefart_la_SOURCES = \
nsf.c \
vrcvisnd.c
-libnosefart_la_CFLAGS = $(VISIBILITY_FLAG) -DNSF_PLAYER -fno-strict-aliasing
+libnosefart_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
+libnosefart_la_CPPFLAGS = -DNSF_PLAYER
noinst_HEADERS = \
dis6502.h \
diff --git a/src/libxinevdec/Makefile.am b/src/libxinevdec/Makefile.am
index 87ee050e6..28a926a79 100644
--- a/src/libxinevdec/Makefile.am
+++ b/src/libxinevdec/Makefile.am
@@ -1,19 +1,19 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(VISIBILITY_FLAG)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_LDFLAGS = $(xineplug_ldflags)
EXTRA_DIST = foovideo.c
-if HAVE_WAND
+if ENABLE_IMAGEMAGICK
image_module = xineplug_decode_image.la
endif
-if HAVE_GDK_PIXBUF
+if ENABLE_GDK_PIXBUF
gdkpixbuf_module = xineplug_decode_gdk_pixbuf.la
endif
-if HAVE_THEORA
+if ENABLE_THEORA
theora_module = xineplug_decode_theora.la
endif
@@ -34,13 +34,13 @@ xineplug_decode_yuv_la_SOURCES = yuv.c
xineplug_decode_yuv_la_LIBADD = $(XINE_LIB)
xineplug_decode_image_la_SOURCES = image.c
-xineplug_decode_image_la_CFLAGS = $(AM_CFLAGS) $(WAND_CFLAGS)
xineplug_decode_image_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) $(WAND_LIBS)
+xineplug_decode_image_la_CFLAGS = $(AM_CFLAGS) $(WAND_CFLAGS)
xineplug_decode_gdk_pixbuf_la_SOURCES = gdkpixbuf.c
-xineplug_decode_gdk_pixbuf_la_CFLAGS = $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS)
xineplug_decode_gdk_pixbuf_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) $(GDK_PIXBUF_LIBS)
+xineplug_decode_gdk_pixbuf_la_CFLAGS = $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS)
xineplug_decode_theora_la_SOURCES = xine_theora_decoder.c
-xineplug_decode_theora_la_CFLAGS = $(AM_CFLAGS) $(OGG_CFLAGS) $(THEORA_CFLAGS)
xineplug_decode_theora_la_LIBADD = $(XINE_LIB) $(OGG_LIBS) $(THEORA_LIBS)
+xineplug_decode_theora_la_CFLAGS = $(AM_CFLAGS) $(OGG_CFLAGS) $(THEORA_CFLAGS)
diff --git a/src/post/Makefile.am b/src/post/Makefile.am
index 8408c3f3a..6c28b41f7 100644
--- a/src/post/Makefile.am
+++ b/src/post/Makefile.am
@@ -1,4 +1,3 @@
include $(top_srcdir)/misc/Makefile.common
-SUBDIRS = \
- planar goom visualizations mosaico deinterlace audio
+SUBDIRS = planar goom visualizations mosaico deinterlace audio
diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am
index f4018a780..7ede380da 100644
--- a/src/post/audio/Makefile.am
+++ b/src/post/audio/Makefile.am
@@ -1,5 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
noinst_HEADERS = dsp.h filter.h window.h audio_filters.h
xinepost_LTLIBRARIES = xineplug_post_audio_filters.la
@@ -7,6 +10,4 @@ xinepost_LTLIBRARIES = xineplug_post_audio_filters.la
xineplug_post_audio_filters_la_SOURCES = \
upmix.c upmix_mono.c filter.c window.c stretch.c volnorm.c audio_filters.c
xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm
-xineplug_post_audio_filters_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module
diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am
index d2d1d5c10..ef030b22d 100644
--- a/src/post/deinterlace/Makefile.am
+++ b/src/post/deinterlace/Makefile.am
@@ -1,8 +1,9 @@
include $(top_srcdir)/misc/Makefile.common
-SUBDIRS = plugins
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
-EXTRA_DIST =
+SUBDIRS = plugins
xinepost_LTLIBRARIES = xineplug_post_tvtime.la
@@ -11,8 +12,4 @@ xineplug_post_tvtime_la_SOURCES = xine_plugin.c \
xineplug_post_tvtime_la_LIBADD = $(XINE_LIB) \
$(top_builddir)/src/post/deinterlace/plugins/libdeinterlaceplugins.la
-xineplug_post_tvtime_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_tvtime_la_LDFLAGS = -avoid-version -module \
- @IMPURE_TEXT_LDFLAGS@
-
noinst_HEADERS = deinterlace.h pulldown.h speedtools.h speedy.h tvtime.h
diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am
index dcfa60180..4185b5706 100644
--- a/src/post/deinterlace/plugins/Makefile.am
+++ b/src/post/deinterlace/plugins/Makefile.am
@@ -17,6 +17,11 @@ include $(top_srcdir)/misc/Makefile.common
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# libpostproc is here so we can use their nice mangle.h
+AM_CFLAGS = $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \
+ -I$(top_srcdir)/contrib/ffmpeg/libpostproc
+
EXTRA_DIST = greedy2frame_template.c greedyh.asm \
tomsmocomp/SearchLoop0A.inc tomsmocomp/SearchLoopBottom.inc \
tomsmocomp/SearchLoopEdgeA.inc tomsmocomp/SearchLoopEdgeA8.inc \
@@ -28,25 +33,26 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \
tomsmocomp/TomsMoCompAll2.inc tomsmocomp/WierdBob.inc \
tomsmocomp/tomsmocompmacros.h x86-64_macros.inc
-# libpostproc is here so we can use their nice mangle.h
-AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \
- -I$(top_srcdir)/contrib/ffmpeg/libpostproc
-
-noinst_LTLIBRARIES = libdeinterlaceplugins.la
-
-libdeinterlaceplugins_la_SOURCES = \
- double.c \
- greedy.c \
- linear.c \
- linearblend.c \
- vfir.c \
- weave.c \
- greedy2frame.c \
- scalerbob.c \
- kdetv_greedyh.c \
- kdetv_tomsmocomp.c
-libdeinterlaceplugins_la_LIBADD = $(XINE_LIB)
-libdeinterlaceplugins_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-libdeinterlaceplugins_la_LDFLAGS = -avoid-version -module
-
noinst_HEADERS = plugins.h greedyhmacros.h
+
+if DEBUG_BUILD
+debug_sources = greedy2frame.c
+nodebug_sources =
+else
+debug_sources =
+nodebug_sources = greedy2frame.c
+endif
+
+# per-object CFLAGS -- drop optimization on kdetv_greedyh.c so that gcc
+# doesn't run out of general registers trying to compile it.
+
+noinst_LTLIBRARIES = libdeinterlacepluginsO1.la libdeinterlaceplugins.la
+libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c $(debug_sources)
+libdeinterlacepluginsO1_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS)
+
+libdeinterlaceplugins_la_SOURCES = double.c greedy.c linear.c linearblend.c \
+ vfir.c weave.c scalerbob.c kdetv_tomsmocomp.c \
+ $(nodebug_sources)
+libdeinterlaceplugins_la_LIBADD = $(XINE_LIB) libdeinterlacepluginsO1.la
+libdeinterlaceplugins_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+libdeinterlaceplugins_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags)
diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am
index 481b66b41..40636736c 100644
--- a/src/post/goom/Makefile.am
+++ b/src/post/goom/Makefile.am
@@ -1,36 +1,15 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \
- gfontrle.c mathtools.c
-
-## -fomit-frame-pointer segfaults here
-## Use -O2 if -Os is stripped or x86 does not build
-#CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-Os/-O2/g'`
-CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'`
-
-# Avoid errors with -O0
-xineplug_post_goom_la-xmmx.o xineplug_post_goom_la-xmmx.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-
-xinepost_LTLIBRARIES = xineplug_post_goom.la
+AM_CFLAGS = $(VISIBILITY_FLAG)
## doesn't work
-#if PPC_ARCH
+#if ARCH_PPC
#extra_files = ppc_drawings.s ppc_zoom_ultimate.s
#AM_CPPFLAGS = -DCPU_POWERPC
#endif
-#if HAVE_MMX
-extra_files = mmx.c xmmx.c
-#endif
-
-xineplug_post_goom_la_SOURCES = $(extra_files) xine_goom.c \
- config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \
- gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \
- goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \
- plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
-xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) -lm
-xineplug_post_goom_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_goom_la_LDFLAGS = -avoid-version -module
+EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \
+ gfontrle.c mathtools.c
noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \
goom_config.h goom_config_param.h goom_filters.h goom_fx.h goom_graphic.h \
@@ -38,3 +17,21 @@ noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \
goomsl_heap.h goomsl_private.h goomsl_yacc.h ifs.h lines.h mathtools.h mmx.h \
ppc_drawings.h ppc_zoom_ultimate.h sound_tester.h surf3d.h tentacle3d.h v3d.h \
motif_goom1.h motif_goom2.h
+
+noinst_LTLIBRARIES = libpost_goom_asm.la
+libpost_goom_asm_la_SOURCES = xmmx.c
+if DEBUG_BUILD
+libpost_goom_asm_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS)
+else
+libpost_goom_asm_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+endif
+
+xinepost_LTLIBRARIES = xineplug_post_goom.la
+xineplug_post_goom_la_SOURCES = mmx.c xine_goom.c \
+ config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \
+ gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \
+ goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \
+ plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
+xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) -lm $(noinst_LTLIBRARIES)
+xineplug_post_goom_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+xineplug_post_goom_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags)
diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am
index c18b4e19c..6f9cca937 100644
--- a/src/post/mosaico/Makefile.am
+++ b/src/post/mosaico/Makefile.am
@@ -1,13 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la
xineplug_post_mosaico_la_SOURCES = mosaico.c
xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_post_mosaico_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module
xineplug_post_switch_la_SOURCES = switch.c
xineplug_post_switch_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_post_switch_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_switch_la_LDFLAGS = -avoid-version -module
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
index 73d300f31..5d6da97cd 100644
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -1,37 +1,30 @@
include $(top_srcdir)/misc/Makefile.common
-POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
+AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags)
+AM_CPPFLAGS =
+AM_LDFLAGS =
-if HAVE_FFMPEG
+if WITH_EXTERNAL_FFMPEG
postproc_lib = $(FFMPEG_POSTPROC_LIBS)
-ff_cflags = $(FFMPEG_POSTPROC_CFLAGS)
+ff_cflags = $(FFMPEG_POSTPROC_CFLAGS)
else
-ff_cflags = -I$(top_srcdir)/contrib/ffmpeg/libpostproc
-postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \
- $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a
+AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc
+postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \
+ $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a
+
$(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a:
$(MAKE) -C $(top_builddir)/contrib ffmpeg/libpostproc/libpostproc.a
$(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a:
$(MAKE) -C $(top_builddir)/contrib ffmpeg/libavutil/libavutil.a
endif
-# -fomit-frame-pointer is always needed. it might cause debug to not
-# work, but at least it compiles.
-AM_CFLAGS = $(ff_cflags) -fomit-frame-pointer
-
-# Avoid errors with -O0
-xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
+noinst_LTLIBRARIES = libpost_planar_asm.la
+libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c
+libpost_planar_asm_la_CFLAGS = $(O1_CFLAGS) -fomit-frame-pointer $(AM_CFLAGS)
xinepost_LTLIBRARIES = xineplug_post_planar.la
-
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
- denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c
-xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS)
-xineplug_post_planar_la_LDFLAGS = -avoid-version -module \
- @IMPURE_TEXT_LDFLAGS@
-xineplug_post_planar_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-
-$(POSTPROC_INT_LIB):
- cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la
+ denoise3d.c unsharp.c pp.c
+xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(noinst_LTLIBRARIES)
+xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am
index f42598d9c..bea89ac49 100644
--- a/src/post/visualizations/Makefile.am
+++ b/src/post/visualizations/Makefile.am
@@ -1,13 +1,14 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+
EXTRA_DIST = fooviz.c
+noinst_HEADERS = fft.h visualizations.h
+
xinepost_LTLIBRARIES = xineplug_post_visualizations.la
xineplug_post_visualizations_la_SOURCES = \
visualizations.c fft.c fftscope.c oscope.c fftgraph.c
xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm
-xineplug_post_visualizations_la_CFLAGS = $(VISIBILITY_FLAG)
-xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module
-
-noinst_HEADERS = fft.h visualizations.h
diff --git a/src/vdr/Makefile.am b/src/vdr/Makefile.am
index 44af6078b..fcdf6cae4 100644
--- a/src/vdr/Makefile.am
+++ b/src/vdr/Makefile.am
@@ -5,8 +5,10 @@ AM_LDFLAGS = $(xineplug_ldflags)
xineinclude_HEADERS = input_vdr.h
+if ENABLE_DVB
xineplug_LTLIBRARIES = xineplug_inp_vdr.la
xinepost_LTLIBRARIES = xineplug_post_vdr.la
+endif
xineplug_inp_vdr_la_SOURCES = input_vdr.c
xineplug_inp_vdr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am
index 148eda84c..a4f219b9c 100644
--- a/src/video_out/Makefile.am
+++ b/src/video_out/Makefile.am
@@ -1,14 +1,30 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -DXINE_COMPILE
-AM_LDFLAGS = $(xineplug_ldflags)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_LDFLAGS = $(xineplug_ldflags)
+AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
-SUBDIRS = libdha vidix macosx
+SUBDIRS =
+
+if BUILD_DHA_KMOD
+SUBDIRS += libdha
+endif
+
+# vidix depends on portions of dha
+if ENABLE_VIDIX
+if !BUILD_DHA_KMOD
+SUBDIRS += libdha
+endif
+SUBDIRS += vidix
+endif
+
+if ENABLE_MACOSX_VIDEO
+SUBDIRS += macosx
+endif
EXTRA_DIST = video_out_directfb.c video_out_directfb_fb.c video_out_directfb_x.c video_out_directx.c video_out_macosx.m
-VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix \
- -I$(top_srcdir)/src/video_out/vidix
+noinst_HEADERS = deinterlace.h video_out_syncfb.h yuv2rgb.h x11osd.h xcbosd.h
if HAVE_X11
X11OSD = x11osd.c
@@ -16,72 +32,72 @@ xshm_module = xineplug_vo_out_xshm.la
if HAVE_XV
xv_module = xineplug_vo_out_xv.la
endif
-if HAVE_XVMC
+if ENABLE_XVMC
xvmc_module = xineplug_vo_out_xvmc.la
endif
-if HAVE_XXMC
+if ENABLE_XXMC
xxmc_module = xineplug_vo_out_xxmc.la
endif
-if HAVE_OPENGL
+if ENABLE_OPENGL
opengl_module = xineplug_vo_out_opengl.la
endif
-if HAVE_SYNCFB
+if ENABLE_SYNCFB
syncfb_module = xineplug_vo_out_syncfb.la
endif
-if HAVE_SUNFB
-if HAVE_SUNDGA
+if ENABLE_SUNFB
+if ENABLE_SUNDGA
pgx64_module = xineplug_vo_out_pgx64.la
pgx32_module = xineplug_vo_out_pgx32.la
endif
endif
endif
-if HAVE_XCB
+if ENABLE_XCB
XCBOSD = xcbosd.c
-if HAVE_XCBSHM
+if ENABLE_XCBSHM
xcbshm_module = xineplug_vo_out_xcbshm.la
endif
-if HAVE_XCBXV
+if ENABLE_XCBXV
xcbxv_module = xineplug_vo_out_xcbxv.la
endif
endif
-if HAVE_VIDIX
+if ENABLE_VIDIX
vidix_module = xineplug_vo_out_vidix.la
endif
-if HAVE_AA
+if ENABLE_AA
aa_module = xineplug_vo_out_aa.la
endif
-if HAVE_CACA
+if ENABLE_CACA
caca_module = xineplug_vo_out_caca.la
endif
-if HAVE_FB
+if ENABLE_FB
fb_module = xineplug_vo_out_fb.la
endif
-if HAVE_DIRECTFB
+if ENABLE_DIRECTFB
directfb_module = xineplug_vo_out_directfb.la
if HAVE_X11
directfb_module += xineplug_vo_out_xdirectfb.la
endif
endif
-if HAVE_SDL
+if ENABLE_SDL
sdl_module = xineplug_vo_out_sdl.la
endif
-if HAVE_STK
+if ENABLE_STK
stk_module = xineplug_vo_out_stk.la
endif
-if HAVE_DIRECTX
+if ENABLE_DIRECTX
directx_module = xineplug_vo_out_directx.la
endif
-if HAVE_MACOSX_VIDEO
+if ENABLE_MACOSX_VIDEO
macosx_module = xineplug_vo_out_macosx.la
endif
@@ -104,101 +120,94 @@ xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \
xineplug_vo_out_xcbshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c video_out_xcbshm.c $(XCBOSD)
xineplug_vo_out_xcbshm_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS)
-xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS)
+xineplug_vo_out_xcbshm_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS)
xineplug_vo_out_xcbxv_la_SOURCES = deinterlace.c video_out_xcbxv.c $(XCBOSD)
xineplug_vo_out_xcbxv_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(XCBXV_LIBS) $(XCB_LIBS)
-xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAGS)
+xineplug_vo_out_xcbxv_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS) $(XCBXV_CFLAGS)
xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \
video_out_xshm.c $(X11OSD)
xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_xshm_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_xshm_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c video_out_xv.c
xineplug_vo_out_xv_la_LIBADD = $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_xv_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_xv_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_xvmc_la_SOURCES = deinterlace.c video_out_xvmc.c
xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_xvmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS)
+xineplug_vo_out_xvmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS)
xineplug_vo_out_xxmc_la_SOURCES = $(X11OSD) deinterlace.c video_out_xxmc.c\
xvmc_mocomp.c xvmc_vld.c xxmc.h
xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_xxmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_xxmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \
video_out_opengl.c myglext.h $(X11OSD)
xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \
$(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS)
-xineplug_vo_out_opengl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_opengl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c
xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_syncfb_la_CFLAGS = $(VISIBILITY_FLAG)
xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c
xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS)
-xineplug_vo_out_pgx64_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS)
+xineplug_vo_out_pgx64_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
+xineplug_vo_out_pgx64_la_CPPFLAGS = $(AM_CPPFLAGS) $(SUNDGA_CPPFLAGS)
xineplug_vo_out_pgx32_la_SOURCES = video_out_pgx32.c
xineplug_vo_out_pgx32_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS)
-xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS)
+xineplug_vo_out_pgx32_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
+xineplug_vo_out_pgx32_la_CPPFLAGS = $(AM_CPPFLAGS) $(SUNDGA_CPPFLAGS)
xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD)
xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \
$(top_builddir)/src/video_out/vidix/libvidix.la $(PTHREAD_LIBS)
-xineplug_vo_out_vidix_la_CFLAGS = $(VISIBILITY_FLAG) $(VIDIX_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_vidix_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_vidix_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/video_out/vidix \
+ -I$(top_srcdir)/src/video_out/vidix
+
xineplug_vo_out_aa_la_SOURCES = video_out_aa.c
xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_aa_la_CFLAGS = $(VISIBILITY_FLAG) $(AALIB_CFLAGS)
+xineplug_vo_out_aa_la_CFLAGS = $(AM_CFLAGS) $(AALIB_CFLAGS)
xineplug_vo_out_caca_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \
video_out_caca.c
xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_caca_la_CFLAGS = $(VISIBILITY_FLAG) $(CACA_CFLAGS)
+xineplug_vo_out_caca_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \
video_out_fb.c
xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_fb_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS)
+xineplug_vo_out_fb_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS)
xineplug_vo_out_directfb_la_SOURCES = video_out_directfb_fb.c
xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(PTHREAD_LIBS)
-xineplug_vo_out_directfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_directfb_la_CFLAGS = $(AM_CFLAGS) $(DIRECTFB_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_xdirectfb_la_SOURCES = video_out_directfb_x.c $(X11OSD)
xineplug_vo_out_xdirectfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS) $(PTHREAD_LIBS)
-xineplug_vo_out_xdirectfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing
+xineplug_vo_out_xdirectfb_la_CFLAGS = $(AM_CFLAGS) $(DIRECTFB_CFLAGS) -fno-strict-aliasing
xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c
xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_sdl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SDL_CFLAGS)
+xineplug_vo_out_sdl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(SDL_CFLAGS)
xineplug_vo_out_stk_la_SOURCES = video_out_stk.c
xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS)
-xineplug_vo_out_stk_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBSTK_CFLAGS)
+xineplug_vo_out_stk_la_CFLAGS = $(AM_CFLAGS) $(LIBSTK_CFLAGS)
xineplug_vo_out_directx_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c
-xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS)
xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_directx_la_CFLAGS = $(VISIBILITY_FLAG)
+xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS)
xineplug_vo_out_none_la_SOURCES = video_out_none.c
xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
-xineplug_vo_out_none_la_CFLAGS = $(VISIBILITY_FLAG)
xineplug_vo_out_macosx_la_SOURCES = video_out_macosx.m
-xineplug_vo_out_macosx_la_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS)
-xineplug_vo_out_macosx_la_OBJCFLAGS = $(VISIBILITY_FLAG)
-xineplug_vo_out_macosx_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \
- $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
-# The "-Wl,-framework -Wl,Cocoa" is needed for libtool versions before
-# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220)
-xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) \
- -Wl,-framework -Wl,Cocoa -framework Cocoa -framework OpenGL
-
-noinst_HEADERS = deinterlace.h video_out_syncfb.h \
- yuv2rgb.h x11osd.h xcbosd.h
+xineplug_vo_out_macosx_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS)
+xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL
diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am
index 8d94347d1..05aebb704 100644
--- a/src/video_out/libdha/Makefile.am
+++ b/src/video_out/libdha/Makefile.am
@@ -1,19 +1,23 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = README pci_db2c.awk
+SUBDIRS = bin oth sysdep
-SUBDIRS = bin kernelhelper oth sysdep
+if BUILD_DHA_KMOD
+SUBDIRS += kernelhelper
+endif
-AM_CFLAGS = @STATIC@
+AM_CFLAGS = $(DEFAULT_OCFLAGS)
-if HAVE_VIDIX
-dha_lib = libdha.la
-endif
+EXTRA_DIST = README pci_db2c.awk
awk_generated = pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h
CLEANFILES = $(awk_generated)
-noinst_LTLIBRARIES = $(dha_lib)
+noinst_HEADERS = AsmMacros.h libdha.h pci_ids.h pci_names.h pci_vendors.h
+
+if ENABLE_VIDIX
+noinst_LTLIBRARIES = libdha.la
+endif
libdha_la_SOURCES = libdha.c mtrr.c pci.c mmi.c ports.c irq.c cpu_flush.c
nodist_libdha_la_SOURCES = pci_names.c
@@ -23,8 +27,6 @@ EXTRA_PROGRAMS = test
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/video_out/libdha/libdha.la
-noinst_HEADERS = AsmMacros.h libdha.h pci_ids.h pci_names.h pci_vendors.h
-
## for OpenBSD LIBS += -li386
## We have to create some files, on the fly, this is why this rule is needed.
@@ -33,7 +35,7 @@ oth/pci.db:
$(awk_generated): pci_db2c.awk oth/pci.db
LC_ALL=C $(AWK) -f $(top_srcdir)/src/video_out/libdha/pci_db2c.awk \
- $(top_srcdir)/src/video_out/libdha/oth/pci.db
+ $(top_srcdir)/src/video_out/libdha/oth/pci.db
pci_names.lo: $(awk_generated)
source='$*.c' object='$@' libtool=yes \
diff --git a/src/video_out/libdha/kernelhelper/Makefile.am b/src/video_out/libdha/kernelhelper/Makefile.am
index 82a37eae3..fffaab433 100644
--- a/src/video_out/libdha/kernelhelper/Makefile.am
+++ b/src/video_out/libdha/kernelhelper/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/misc/Makefile.common
EXTRA_DIST = README dhahelper.c
-KCFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include `echo @LINUX_INCLUDE@ | sed -e 's/\-I//g'`/linux/modversions.h
+KCFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include `echo $(LINUX_INCLUDE) | sed -e 's/\-I//g'`/linux/modversions.h
KVERSION = $(shell $(SHELL) -c 'uname -r')
moddir = /lib/modules/$(KVERSION)/misc
@@ -10,10 +10,8 @@ moddir = /lib/modules/$(KVERSION)/misc
KCOMPILE = $(CC) $(CFLAGS) $(KCFLAGS) $(INCLUDES) $(LINUX_INCLUDE)
if HAVE_LINUX
-if BUILD_DHA_KMOD
KERNEL_MODULE = dhahelper.o
endif
-endif
noinst_HEADERS = dhahelper.h
@@ -29,25 +27,24 @@ nodes:
all: $(KERNEL_MODULE)
install-exec-local: $(KERNEL_MODULE)
-@BUILD_DHA_KMOD_TRUE@ @$(NORMAL_INSTALL)
-@BUILD_DHA_KMOD_TRUE@ $(mkinstalldirs) $(DESTDIR)$(moddir)
-@BUILD_DHA_KMOD_TRUE@ @list='$(KERNEL_MODULE)'; \
-@BUILD_DHA_KMOD_TRUE@ for p in $$list; do \
-@BUILD_DHA_KMOD_TRUE@ if test -f $$p; then \
-@BUILD_DHA_KMOD_TRUE@ echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \
-@BUILD_DHA_KMOD_TRUE@ $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \
-@BUILD_DHA_KMOD_TRUE@ else :; fi; \
-@BUILD_DHA_KMOD_TRUE@ done; \
-@BUILD_DHA_KMOD_TRUE@ $(DEPMOD) -a
-@BUILD_DHA_KMOD_TRUE@ if test ! -c /dev/dhahelper; then \
-@BUILD_DHA_KMOD_TRUE@ $(MAKE) nodes; \
-@BUILD_DHA_KMOD_TRUE@ fi
-
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(moddir)
+ @list='$(KERNEL_MODULE)'; \
+ for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \
+ $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \
+ else :; fi; \
+ done; \
+ $(DEPMOD) -a
+ if test ! -c /dev/dhahelper; then \
+ $(MAKE) nodes; \
+ fi
uninstall-local:
-@BUILD_DHA_KMOD_TRUE@ @$(NORMAL_UNINSTALL)
-@BUILD_DHA_KMOD_TRUE@ @list='$(KERNEL_MODULE)'; \
-@BUILD_DHA_KMOD_TRUE@ for p in $$list; do \
-@BUILD_DHA_KMOD_TRUE@ echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
-@BUILD_DHA_KMOD_TRUE@ rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
-@BUILD_DHA_KMOD_TRUE@ done
+ @$(NORMAL_UNINSTALL)
+ @list='$(KERNEL_MODULE)'; \
+ for p in $$list; do \
+ echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
diff --git a/src/video_out/macosx/Makefile.am b/src/video_out/macosx/Makefile.am
index a69f30dc5..ae6a5acc8 100644
--- a/src/video_out/macosx/Makefile.am
+++ b/src/video_out/macosx/Makefile.am
@@ -1,27 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -DXINE_COMPILE
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
+AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
-EXTRA_DIST = \
- video_window.h \
- XineOpenGLView.m \
- XineOpenGLView.h \
- XineVideoWindow.m \
- XineVideoWindow.h
-
-if HAVE_MACOSX_VIDEO
+xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h
lib_LTLIBRARIES = libxineMacOSXVideo.la
libxineMacOSXVideo_la_SOURCES = XineOpenGLView.m XineVideoWindow.m
-# The "-Wl,-framework -Wl,..." is needed for libtool versions before
-# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220)
-libxineMacOSXVideo_la_LDFLAGS = -version-info \
- $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \
- -Wl,-framework -Wl,Cocoa -framework Cocoa \
- -Wl,-framework -Wl,OpenGL -framework OpenGL
-
-xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h
-
-endif
-
+libxineMacOSXVideo_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL \
+ -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE)
diff --git a/src/video_out/vidix/Makefile.am b/src/video_out/vidix/Makefile.am
index 2ca8f168a..7f19e7ce8 100644
--- a/src/video_out/vidix/Makefile.am
+++ b/src/video_out/vidix/Makefile.am
@@ -1,21 +1,16 @@
include $(top_srcdir)/misc/Makefile.common
-EXTRA_DIST = README vidix.txt
-
SUBDIRS = drivers
-AM_CFLAGS = @STATIC@
+AM_CFLAGS = $(DEFAULT_OCFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix -I$(top_builddir)/src/video_out/libdha
-if HAVE_VIDIX
-vidix_lib = libvidix.la
-endif
+EXTRA_DIST = README vidix.txt
-noinst_LTLIBRARIES = $(vidix_lib)
+noinst_HEADERS = fourcc.h vidix.h vidixlib.h
+
+noinst_LTLIBRARIES = libvidix.la
libvidix_la_SOURCES = vidixlib.c
libvidix_la_LIBADD = $(DYNAMIC_LD_LIBS) $(top_builddir)/src/video_out/libdha/libdha.la
-noinst_HEADERS = fourcc.h vidix.h vidixlib.h
-
-AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \
- -I$(top_builddir)/src/video_out/libdha
diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am
index f438dde36..db3adc078 100644
--- a/src/video_out/vidix/drivers/Makefile.am
+++ b/src/video_out/vidix/drivers/Makefile.am
@@ -1,9 +1,16 @@
include $(top_srcdir)/misc/Makefile.common
+AM_CFLAGS = $(DEFAULT_OCFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \
+ -I$(top_srcdir)/src/video_out/libdha -I$(top_builddir)/src/video_out/libdha
+AM_LDFLAGS = $(xineplug_ldflags)
+
EXTRA_DIST = genfb_vid.c
-if HAVE_VIDIX
-vidix_drivers = \
+noinst_HEADERS = mach64.h glint_regs.h pm3_regs.h radeon.h savage_regs.h \
+ cyberblade_regs.h unichrome_regs.h sis_defs.h sis_regs.h
+
+vidix_LTLIBRARIES = \
mach64_vid.la \
mga_crtc2_vid.la \
mga_vid.la \
@@ -16,51 +23,34 @@ vidix_drivers = \
nvidia_vid.la \
sis_vid.la \
savage_vid.la
-endif
-vidix_LTLIBRARIES = $(vidix_drivers)
-
-radeon_vid_la_SOURCES = radeon_vid.c
-radeon_vid_la_LDFLAGS = -avoid-version -module -lm
-
-rage128_vid_la_SOURCES = radeon_vid.c
-rage128_vid_la_LDFLAGS = -avoid-version -module -lm
-rage128_vid_la_CFLAGS = -DRAGE128 $(AM_CFLAGS)
-
-pm2_vid_la_SOURCES = pm2_vid.c
-pm2_vid_la_LDFLAGS = -avoid-version -module
-
-pm3_vid_la_SOURCES = pm3_vid.c
-pm3_vid_la_LDFLAGS = -avoid-version -module
+cyberblade_vid_la_SOURCES = cyberblade_vid.c
mach64_vid_la_SOURCES = mach64_vid.c
-mach64_vid_la_LDFLAGS = -avoid-version -module
+
+mga_crtc2_vid_la_SOURCES = mga_vid.c
+mga_crtc2_vid_la_LIBADD = -lm
+mga_crtc2_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DCRTC2
mga_vid_la_SOURCES = mga_vid.c
-mga_vid_la_LDFLAGS = -avoid-version -module -lm
+mga_vid_la_LIBADD = -lm
-mga_crtc2_vid_la_SOURCES = mga_vid.c
-mga_crtc2_vid_la_LDFLAGS = -avoid-version -module -lm
-mga_crtc2_vid_la_CFLAGS = -DCRTC2 $(AM_CFLAGS)
+nvidia_vid_la_SOURCES = nvidia_vid.c
-cyberblade_vid_la_SOURCES = cyberblade_vid.c
-cyberblade_vid_la_LDFLAGS = -avoid-version -module
+pm2_vid_la_SOURCES = pm2_vid.c
-unichrome_vid_la_SOURCES = unichrome_vid.c
-unichrome_vid_la_LDFLAGS = -avoid-version -module
+pm3_vid_la_SOURCES = pm3_vid.c
-nvidia_vid_la_SOURCES = nvidia_vid.c
-nvidia_vid_la_LDFLAGS = -avoid-version -module
+radeon_vid_la_SOURCES = radeon_vid.c
+radeon_vid_la_LIBADD = -lm
-sis_vid_la_SOURCES = sis_vid.c sis_bridge.c
-sis_vid_la_LDFLAGS = -avoid-version -module
+rage128_vid_la_SOURCES = radeon_vid.c
+rage128_vid_la_LIBADD = -lm
+rage128_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DRAGE128
savage_vid_la_SOURCES = savage_vid.c
-savage_vid_la_LDFLAGS = -avoid-version -module -lm
+savage_vid_la_LIBADD = -lm
-noinst_HEADERS = mach64.h glint_regs.h pm3_regs.h radeon.h savage_regs.h \
- cyberblade_regs.h unichrome_regs.h sis_defs.h sis_regs.h
+sis_vid_la_SOURCES = sis_vid.c sis_bridge.c
-AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \
- -I$(top_srcdir)/src/video_out/libdha \
- -I$(top_builddir)/src/video_out/libdha
+unichrome_vid_la_SOURCES = unichrome_vid.c
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index aeb142708..8e4a9777a 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -1,18 +1,29 @@
include $(top_srcdir)/misc/Makefile.common
include $(top_srcdir)/lib/Makefile.common
-AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(XDG_BASEDIR_CFLAGS) $(VISIBILITY_FLAG)
-AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = $(XDG_BASEDIR_CPPFLAGS) $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-lib_LTLIBRARIES = libxine.la
+XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la
+
+# FIXME: these are currently unused:
+EXTRA_DIST = lrb.c lrb.h accel_xvmc.h
-XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la
-DEF_FILE = libxine-$(XINE_MAJOR).def
if WIN32
+DEF_FILE = libxine-$(XINE_MAJOR).def
def_ldflags="-Wl,--output-def,$(DEF_FILE)"
endif
+noinst_HEADERS = bswap.h ffmpeg_bswap.h
+
+xineinclude_HEADERS = buffer.h metronom.h configfile.h vo_scale.h \
+ audio_out.h resample.h video_out.h xine_internal.h spu_decoder.h \
+ video_overlay.h osd.h scratch.h xine_plugin.h xineintl.h \
+ plugin_catalog.h audio_decoder.h video_decoder.h post.h \
+ io_helper.h broadcaster.h info_helper.h refcounter.h alphablend.h
+
+lib_LTLIBRARIES = libxine.la
+
libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \
load_plugins.c video_decoder.c buffer_types.c \
audio_decoder.c video_out.c audio_out.c resample.c events.c \
@@ -21,27 +32,17 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \
input_rip.c input_cache.c info_helper.c refcounter.c \
alphablend.c
-# FIXME: these are currently unused:
-EXTRA_DIST = lrb.c lrb.h accel_xvmc.h
-
libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) $(XDG_BASEDIR_DEPS) \
$(pthread_dep) $(LIBXINEPOSIX)
libxine_la_LIBADD = $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL) $(ZLIB_LIBS) \
-lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) $(FONTCONFIG_LIBS) \
$(LIBXINEPOSIX) $(RT_LIBS) $(NET_LIBS) $(XDG_BASEDIR_LIBS)
-libxine_la_LDFLAGS = \
- -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \
- $(def_ldflags)
-
+libxine_la_LDFLAGS = $(AM_LDFLAGS) $(def_ldflags) \
+ -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE)
-xineinclude_HEADERS = buffer.h metronom.h configfile.h vo_scale.h \
- audio_out.h resample.h video_out.h xine_internal.h spu_decoder.h \
- video_overlay.h osd.h scratch.h xine_plugin.h xineintl.h \
- plugin_catalog.h audio_decoder.h video_decoder.h post.h \
- io_helper.h broadcaster.h info_helper.h refcounter.h alphablend.h
-
-noinst_HEADERS = bswap.h ffmpeg_bswap.h
+$(XINEUTILS_LIB):
+ $(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
if WIN32
install-exec-local:
@@ -50,6 +51,3 @@ install-exec-local:
uninstall-local:
rm -f $(DEF_FILE)
endif
-
-$(XINEUTILS_LIB):
- $(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la
diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am
index 95de06b9e..a9c37465a 100644
--- a/src/xine-utils/Makefile.am
+++ b/src/xine-utils/Makefile.am
@@ -1,19 +1,33 @@
include $(top_srcdir)/misc/Makefile.common
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-noinst_LTLIBRARIES = libxineutils.la
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -DXINE_LIBRARY_COMPILE
EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl
-if PPC_ARCH
+noinst_HEADERS = ppcasm_string.h xine_check.h
+
+xineinclude_HEADERS = \
+ attributes.h \
+ compat.h \
+ xine_buffer.h \
+ xineutils.h \
+ xmllexer.h \
+ xmlparser.h \
+ list.h \
+ array.h \
+ sorted_array.h \
+ pool.h \
+ ring_buffer.h
+
+noinst_LTLIBRARIES = libxineutils.la
+
+if ARCH_PPC
if !HOST_OS_DARWIN
pppc_files = ppcasm_string.S
endif
endif
-AM_CFLAGS = $(X_CFLAGS) $(VISIBILITY_FLAG)
-AM_CPPFLAGS=-DXINE_LIBRARY_COMPILE
-
libxineutils_la_SOURCES = $(pppc_files) \
cpu_accel.c \
color.c \
@@ -32,19 +46,3 @@ libxineutils_la_SOURCES = $(pppc_files) \
pool.c \
ring_buffer.c
-xineinclude_HEADERS = \
- attributes.h \
- compat.h \
- xine_buffer.h \
- xineutils.h \
- xmllexer.h \
- xmlparser.h \
- list.h \
- array.h \
- sorted_array.h \
- pool.h \
- ring_buffer.h
-
-
-noinst_HEADERS = ppcasm_string.h xine_check.h
-
diff --git a/version.sh b/version.sh
new file mode 100755
index 000000000..2d9438379
--- /dev/null
+++ b/version.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Making releases:
+# 1. Increment XINE_VERSION_SUB
+# 2. Remove .cvsversion before running make dist
+# 3. Adjust the values of XINE_LT_CURRENT, XINE_LT_REVISION, and XINE_LT_AGE
+# according to the following rules:
+#
+# If the interface is totally unchanged from the previous release,
+# increment XINE_LT_REVISION by one. Otherwise:
+# 1. XINE_LT_REVISION=0
+# 2. Increment XINE_LT_CURRENT by one.
+# 3. If any interfaces have been ADDED since the last release,
+# increment XINE_LT_AGE by one. If any interfaces have been
+# REMOVED or incompatibly changed, XINE_LT_AGE=0
+#
+# Regarding libtool versioning, here are some details, but see the info page for
+# libtool for the whole story. The most important thing to keep in mind is that
+# the libtool version numbers DO NOT MATCH the xine-lib version numbers, and you
+# should NEVER try to make them match.
+#
+# XINE_LT_CURRENT the current API version
+# XINE_LT_REVISION an internal revision number that is increased when the
+# API does not change in any way
+# XINE_LT_AGE the number of previous API versions still supported by
+# this version
+
+XINE_VERSION_MAJOR=1
+XINE_VERSION_MINOR=1
+XINE_VERSION_SUB=90
+
+XINE_LT_CURRENT=19
+XINE_LT_REVISION=0
+XINE_LT_AGE=17
+
+test -f "`dirname $0`/.cvsversion" && XINE_VERSION_SUFFIX="hg"
+XINE_VERSION_SPEC="${XINE_VERSION_MAJOR}.${XINE_VERSION_MINOR}.${XINE_VERSION_SUB}${XINE_VERSION_SUFFIX}"
+
+####
+#### You should not need to touch anything beyond this point
+####
+
+echo "m4_define([XINE_VERSION_MAJOR], [${XINE_VERSION_MAJOR}])dnl"
+echo "m4_define([XINE_VERSION_MINOR], [${XINE_VERSION_MINOR}])dnl"
+echo "m4_define([XINE_VERSION_SUB], [${XINE_VERSION_SUB}])dnl"
+echo "m4_define([XINE_VERSION_SUFFIX], [${XINE_VERSION_SUFFIX}])dnl"
+echo "m4_define([XINE_VERSION_SPEC], [${XINE_VERSION_SPEC}])dnl"
+echo "m4_define([__XINE_LT_CURRENT], [${XINE_LT_CURRENT}])dnl"
+echo "m4_define([__XINE_LT_REVISION], [${XINE_LT_REVISION}])dnl"
+echo "m4_define([__XINE_LT_AGE], [${XINE_LT_AGE}])dnl"