From b23f5e4c4eaa751c45f3e09390bb3b4b364b20c8 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 3 May 2007 01:07:22 -0400 Subject: Move autoconf macros that come from gettext from m4 to m4/gettext to make it easier to update them when necessary (they're out of date at present--the versions here are from 0.14.5, but 0.16.1 is current). --HG-- rename : m4/codeset.m4 => m4/gettext/codeset.m4 rename : m4/gettext.m4 => m4/gettext/gettext.m4 rename : m4/glibc2.m4 => m4/gettext/glibc2.m4 rename : m4/glibc21.m4 => m4/gettext/glibc21.m4 rename : m4/iconv.m4 => m4/gettext/iconv.m4 rename : m4/intdiv0.m4 => m4/gettext/intdiv0.m4 rename : m4/intmax.m4 => m4/gettext/intmax.m4 rename : m4/inttypes-pri.m4 => m4/gettext/inttypes-pri.m4 rename : m4/inttypes.m4 => m4/gettext/inttypes.m4 rename : m4/inttypes_h.m4 => m4/gettext/inttypes_h.m4 rename : m4/isc-posix.m4 => m4/gettext/isc-posix.m4 rename : m4/lcmessage.m4 => m4/gettext/lcmessage.m4 rename : m4/lib-ld.m4 => m4/gettext/lib-ld.m4 rename : m4/lib-link.m4 => m4/gettext/lib-link.m4 rename : m4/lib-prefix.m4 => m4/gettext/lib-prefix.m4 rename : m4/longdouble.m4 => m4/gettext/longdouble.m4 rename : m4/longlong.m4 => m4/gettext/longlong.m4 rename : m4/nls.m4 => m4/gettext/nls.m4 rename : m4/po.m4 => m4/gettext/po.m4 rename : m4/printf-posix.m4 => m4/gettext/printf-posix.m4 rename : m4/progtest.m4 => m4/gettext/progtest.m4 rename : m4/signed.m4 => m4/gettext/signed.m4 rename : m4/size_max.m4 => m4/gettext/size_max.m4 rename : m4/stdint_h.m4 => m4/gettext/stdint_h.m4 rename : m4/uintmax_t.m4 => m4/gettext/uintmax_t.m4 rename : m4/ulonglong.m4 => m4/gettext/ulonglong.m4 rename : m4/wchar_t.m4 => m4/gettext/wchar_t.m4 rename : m4/wint_t.m4 => m4/gettext/wint_t.m4 rename : m4/xsize.m4 => m4/gettext/xsize.m4 --- autogen.sh | 2 +- configure.ac | 1 + m4/Makefile.am | 11 +- m4/codeset.m4 | 21 -- m4/gettext.m4 | 549 -------------------------------------------- m4/gettext/Makefile.am | 32 +++ m4/gettext/codeset.m4 | 21 ++ m4/gettext/gettext.m4 | 549 ++++++++++++++++++++++++++++++++++++++++++++ m4/gettext/glibc2.m4 | 30 +++ m4/gettext/glibc21.m4 | 30 +++ m4/gettext/iconv.m4 | 101 +++++++++ m4/gettext/intdiv0.m4 | 70 ++++++ m4/gettext/intmax.m4 | 30 +++ m4/gettext/inttypes-pri.m4 | 30 +++ m4/gettext/inttypes.m4 | 25 ++ m4/gettext/inttypes_h.m4 | 26 +++ m4/gettext/isc-posix.m4 | 24 ++ m4/gettext/lcmessage.m4 | 30 +++ m4/gettext/lib-ld.m4 | 110 +++++++++ m4/gettext/lib-link.m4 | 553 +++++++++++++++++++++++++++++++++++++++++++++ m4/gettext/lib-prefix.m4 | 153 +++++++++++++ m4/gettext/longdouble.m4 | 28 +++ m4/gettext/longlong.m4 | 23 ++ m4/gettext/nls.m4 | 51 +++++ m4/gettext/po.m4 | 429 +++++++++++++++++++++++++++++++++++ m4/gettext/printf-posix.m4 | 44 ++++ m4/gettext/progtest.m4 | 92 ++++++++ m4/gettext/signed.m4 | 17 ++ m4/gettext/size_max.m4 | 59 +++++ m4/gettext/stdint_h.m4 | 26 +++ m4/gettext/uintmax_t.m4 | 30 +++ m4/gettext/ulonglong.m4 | 23 ++ m4/gettext/wchar_t.m4 | 20 ++ m4/gettext/wint_t.m4 | 20 ++ m4/gettext/xsize.m4 | 13 ++ m4/glibc2.m4 | 30 --- m4/glibc21.m4 | 30 --- m4/iconv.m4 | 117 ---------- m4/intdiv0.m4 | 70 ------ m4/intmax.m4 | 30 --- m4/inttypes-pri.m4 | 30 --- m4/inttypes.m4 | 25 -- m4/inttypes_h.m4 | 26 --- m4/isc-posix.m4 | 24 -- m4/lcmessage.m4 | 30 --- m4/lib-ld.m4 | 110 --------- m4/lib-link.m4 | 553 --------------------------------------------- m4/lib-prefix.m4 | 153 ------------- m4/longdouble.m4 | 28 --- m4/longlong.m4 | 23 -- m4/nls.m4 | 51 ----- m4/po.m4 | 429 ----------------------------------- m4/printf-posix.m4 | 44 ---- m4/progtest.m4 | 92 -------- m4/signed.m4 | 17 -- m4/size_max.m4 | 59 ----- m4/stdint_h.m4 | 26 --- m4/uintmax_t.m4 | 30 --- m4/ulonglong.m4 | 23 -- m4/wchar_t.m4 | 20 -- m4/wint_t.m4 | 20 -- m4/xsize.m4 | 13 -- 62 files changed, 2694 insertions(+), 2682 deletions(-) delete mode 100644 m4/codeset.m4 delete mode 100644 m4/gettext.m4 create mode 100644 m4/gettext/Makefile.am create mode 100644 m4/gettext/codeset.m4 create mode 100644 m4/gettext/gettext.m4 create mode 100644 m4/gettext/glibc2.m4 create mode 100644 m4/gettext/glibc21.m4 create mode 100644 m4/gettext/iconv.m4 create mode 100644 m4/gettext/intdiv0.m4 create mode 100644 m4/gettext/intmax.m4 create mode 100644 m4/gettext/inttypes-pri.m4 create mode 100644 m4/gettext/inttypes.m4 create mode 100644 m4/gettext/inttypes_h.m4 create mode 100644 m4/gettext/isc-posix.m4 create mode 100644 m4/gettext/lcmessage.m4 create mode 100644 m4/gettext/lib-ld.m4 create mode 100644 m4/gettext/lib-link.m4 create mode 100644 m4/gettext/lib-prefix.m4 create mode 100644 m4/gettext/longdouble.m4 create mode 100644 m4/gettext/longlong.m4 create mode 100644 m4/gettext/nls.m4 create mode 100644 m4/gettext/po.m4 create mode 100644 m4/gettext/printf-posix.m4 create mode 100644 m4/gettext/progtest.m4 create mode 100644 m4/gettext/signed.m4 create mode 100644 m4/gettext/size_max.m4 create mode 100644 m4/gettext/stdint_h.m4 create mode 100644 m4/gettext/uintmax_t.m4 create mode 100644 m4/gettext/ulonglong.m4 create mode 100644 m4/gettext/wchar_t.m4 create mode 100644 m4/gettext/wint_t.m4 create mode 100644 m4/gettext/xsize.m4 delete mode 100644 m4/glibc2.m4 delete mode 100644 m4/glibc21.m4 delete mode 100644 m4/iconv.m4 delete mode 100644 m4/intdiv0.m4 delete mode 100644 m4/intmax.m4 delete mode 100644 m4/inttypes-pri.m4 delete mode 100644 m4/inttypes.m4 delete mode 100644 m4/inttypes_h.m4 delete mode 100644 m4/isc-posix.m4 delete mode 100644 m4/lcmessage.m4 delete mode 100644 m4/lib-ld.m4 delete mode 100644 m4/lib-link.m4 delete mode 100644 m4/lib-prefix.m4 delete mode 100644 m4/longdouble.m4 delete mode 100644 m4/longlong.m4 delete mode 100644 m4/nls.m4 delete mode 100644 m4/po.m4 delete mode 100644 m4/printf-posix.m4 delete mode 100644 m4/progtest.m4 delete mode 100644 m4/signed.m4 delete mode 100644 m4/size_max.m4 delete mode 100644 m4/stdint_h.m4 delete mode 100644 m4/uintmax_t.m4 delete mode 100644 m4/ulonglong.m4 delete mode 100644 m4/wchar_t.m4 delete mode 100644 m4/wint_t.m4 delete mode 100644 m4/xsize.m4 diff --git a/autogen.sh b/autogen.sh index e228f051b..1d54576df 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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/configure.ac b/configure.ac index 961698141..8e56406b9 100644 --- a/configure.ac +++ b/configure.ac @@ -2672,6 +2672,7 @@ include/Makefile include/xine.h lib/Makefile m4/Makefile +m4/gettext/Makefile misc/Makefile misc/SlackBuild misc/build_rpms.sh diff --git a/m4/Makefile.am b/m4/Makefile.am index 3a5209dc3..a652a0234 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,27 +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 \ +EXTRA_DIST = \ aa.m4 \ arts.m4 \ attributes.m4 \ - codeset.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 \ pkg.m4 \ - progtest.m4 \ xine.m4 \ _xine.m4 \ xv.m4 \ diff --git a/m4/codeset.m4 b/m4/codeset.m4 deleted file mode 100644 index a6e67ec49..000000000 --- a/m4/codeset.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# codeset.m4 serial AM1 (gettext-0.10.40) -dnl Copyright (C) 2000-2002 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. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET);], - am_cv_langinfo_codeset=yes, - am_cv_langinfo_codeset=no) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE(HAVE_LANGINFO_CODESET, 1, - [Define if you have and nl_langinfo(CODESET).]) - fi -]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 deleted file mode 100644 index 624a80785..000000000 --- a/m4/gettext.m4 +++ /dev/null @@ -1,549 +0,0 @@ -# gettext.m4 serial 37 (gettext-0.14.4) -dnl Copyright (C) 1995-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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -dnl Macro to add for using GNU gettext. - -dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. If NEEDSYMBOL is specified and is -dnl 'need-formatstring-macros', then GNU gettext implementations that don't -dnl support the ISO C 99 formatstring macros will be ignored. -dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. -dnl -dnl The result of the configuration is one of three cases: -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -dnl and used. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) No internationalization, always use English msgid. -dnl Catalog format: none -dnl Catalog extension: none -dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -dnl The use of .gmo is historical (it was needed to avoid overwriting the -dnl GNU format catalogs when building on a platform with an X/Open gettext), -dnl but we keep it in order not to force irrelevant filename changes on the -dnl maintainers. -dnl -AC_DEFUN([AM_GNU_GETTEXT], -[ - dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , - [errprint([ERROR: invalid first argument to 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_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) - - AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) - - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - 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 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: - dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. - dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. - ifelse(gt_included_intl, yes, , [ - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - ]) - - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. - gt_INTL_MACOSX - - dnl Set USE_NLS. - AM_NLS - - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - ]) - LIBINTL= - LTLIBINTL= - POSUB= - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - ]) - dnl User does not insist on using GNU NLS library. Figure out what - 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 -]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; -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)]) - - if test "$gt_cv_func_gnugettext_libc" != "yes"; then - dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ - AM_ICONV_LINK - ]) - dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL - dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) - dnl because that would add "-liconv" to LIBINTL and LTLIBINTL - 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_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 -]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; -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) - dnl Now see whether libintl exists and depends on libiconv. - if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -]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; -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 ("")], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext_libintl=yes - ]) - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS"]) - fi - - dnl If an already present or preinstalled GNU gettext() is found, - 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" \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - dnl Reset the values set by searching for libintl. - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - ifelse(gt_included_intl, yes, [ - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - dnl GNU gettext is not found in the C library. - dnl Fall back on included GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - 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" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - fi - ]) - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Some extra flags are needed during linking. - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, - [Define to 1 if translation of program messages to the user's native language - is requested.]) - else - USE_NLS=no - fi - fi - - AC_MSG_CHECKING([whether to use NLS]) - AC_MSG_RESULT([$USE_NLS]) - 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 - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - AC_MSG_RESULT([$gt_source]) - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then - AC_MSG_CHECKING([how to link with libintl]) - AC_MSG_RESULT([$LIBINTL]) - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) - fi - - dnl For backward compatibility. Some packages may be using this. - AC_DEFINE(HAVE_GETTEXT, 1, - [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, - [Define if the GNU dcgettext() function is already present or preinstalled.]) - fi - - dnl We need to process the po/ directory. - POSUB=po - fi - - ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATOBJEXT) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST(DATADIRNAME) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST(INSTOBJEXT) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST(GENCAT) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST(INTLOBJS) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) - ]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST(INTLLIBS) - - dnl Make all documented variables known to autoconf. - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) - AC_SUBST(POSUB) -]) - - -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 ]) - gt_CHECK_DECL(_snwprintf, [#include ]) - - 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 ]) - gt_CHECK_DECL(fgets_unlocked, [#include ]) - gt_CHECK_DECL(getc_unlocked, [#include ]) - - 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], -[ - 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 ], - [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, - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - 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 ], [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, - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) - - -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], -[ - 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.]) -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/m4/gettext/Makefile.am b/m4/gettext/Makefile.am new file mode 100644 index 000000000..1ea9db48c --- /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/gettext/codeset.m4 b/m4/gettext/codeset.m4 new file mode 100644 index 000000000..a6e67ec49 --- /dev/null +++ b/m4/gettext/codeset.m4 @@ -0,0 +1,21 @@ +# codeset.m4 serial AM1 (gettext-0.10.40) +dnl Copyright (C) 2000-2002 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. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/m4/gettext/gettext.m4 b/m4/gettext/gettext.m4 new file mode 100644 index 000000000..624a80785 --- /dev/null +++ b/m4/gettext/gettext.m4 @@ -0,0 +1,549 @@ +# gettext.m4 serial 37 (gettext-0.14.4) +dnl Copyright (C) 1995-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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to 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_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + 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 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: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AM_NLS + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + 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 +]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; +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)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + 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_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 +]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; +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) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +]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; +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 ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + 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" \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + 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" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + 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 + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +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 ]) + gt_CHECK_DECL(_snwprintf, [#include ]) + + 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 ]) + gt_CHECK_DECL(fgets_unlocked, [#include ]) + gt_CHECK_DECL(getc_unlocked, [#include ]) + + 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], +[ + 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 ], + [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, + [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + 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 ], [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, + [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) + + +dnl gt_CHECK_DECL(FUNC, INCLUDES) +dnl Check whether a function is declared. +AC_DEFUN([gt_CHECK_DECL], +[ + 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.]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/m4/gettext/glibc2.m4 b/m4/gettext/glibc2.m4 new file mode 100644 index 000000000..e8f5bfe6e --- /dev/null +++ b/m4/gettext/glibc2.m4 @@ -0,0 +1,30 @@ +# glibc2.m4 serial 1 +dnl Copyright (C) 2000-2002, 2004 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. + +# Test for the GNU C Library, version 2.0 or newer. +# From Bruno Haible. + +AC_DEFUN([gt_GLIBC2], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, + ac_cv_gnu_library_2, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2=yes, + ac_cv_gnu_library_2=no) + ] + ) + AC_SUBST(GLIBC2) + GLIBC2="$ac_cv_gnu_library_2" + ] +) diff --git a/m4/gettext/glibc21.m4 b/m4/gettext/glibc21.m4 new file mode 100644 index 000000000..d95fd9861 --- /dev/null +++ b/m4/gettext/glibc21.m4 @@ -0,0 +1,30 @@ +# glibc21.m4 serial 3 +dnl Copyright (C) 2000-2002, 2004 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. + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([gl_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/m4/gettext/iconv.m4 b/m4/gettext/iconv.m4 new file mode 100644 index 000000000..654c41589 --- /dev/null +++ b/m4/gettext/iconv.m4 @@ -0,0 +1,101 @@ +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 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. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff --git a/m4/gettext/intdiv0.m4 b/m4/gettext/intdiv0.m4 new file mode 100644 index 000000000..b8d78176a --- /dev/null +++ b/m4/gettext/intdiv0.m4 @@ -0,0 +1,70 @@ +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 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. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) diff --git a/m4/gettext/intmax.m4 b/m4/gettext/intmax.m4 new file mode 100644 index 000000000..d99c999fd --- /dev/null +++ b/m4/gettext/intmax.m4 @@ -0,0 +1,30 @@ +# intmax.m4 serial 2 (gettext-0.14.2) +dnl Copyright (C) 2002-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, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether the system has the 'intmax_t' type, but don't attempt to +dnl find a replacement if it is lacking. + +AC_DEFUN([gt_TYPE_INTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, + [AC_TRY_COMPILE([ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif +], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + fi +]) diff --git a/m4/gettext/inttypes-pri.m4 b/m4/gettext/inttypes-pri.m4 new file mode 100644 index 000000000..4d56a9ad3 --- /dev/null +++ b/m4/gettext/inttypes-pri.m4 @@ -0,0 +1,30 @@ +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 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. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) diff --git a/m4/gettext/inttypes.m4 b/m4/gettext/inttypes.m4 new file mode 100644 index 000000000..779bcea05 --- /dev/null +++ b/m4/gettext/inttypes.m4 @@ -0,0 +1,25 @@ +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 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. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) diff --git a/m4/gettext/inttypes_h.m4 b/m4/gettext/inttypes_h.m4 new file mode 100644 index 000000000..a5d075d96 --- /dev/null +++ b/m4/gettext/inttypes_h.m4 @@ -0,0 +1,26 @@ +# inttypes_h.m4 serial 6 +dnl Copyright (C) 1997-2004 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. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + gl_cv_header_inttypes_h=yes, + gl_cv_header_inttypes_h=no)]) + if test $gl_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/gettext/isc-posix.m4 b/m4/gettext/isc-posix.m4 new file mode 100644 index 000000000..74dc8f26d --- /dev/null +++ b/m4/gettext/isc-posix.m4 @@ -0,0 +1,24 @@ +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 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. + +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + +# This test replaces the one in autoconf. +# Currently this macro should have the same name as the autoconf macro +# because gettext's gettext.m4 (distributed in the automake package) +# still uses it. Otherwise, the use in gettext.m4 makes autoheader +# give these diagnostics: +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) + +AC_DEFUN([AC_ISC_POSIX], + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) diff --git a/m4/gettext/lcmessage.m4 b/m4/gettext/lcmessage.m4 new file mode 100644 index 000000000..19aa77e4f --- /dev/null +++ b/m4/gettext/lcmessage.m4 @@ -0,0 +1,30 @@ +# lcmessage.m4 serial 4 (gettext-0.14.2) +dnl Copyright (C) 1995-2002, 2004-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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([gt_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) + if test $gt_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) diff --git a/m4/gettext/lib-ld.m4 b/m4/gettext/lib-ld.m4 new file mode 100644 index 000000000..96c4e2c33 --- /dev/null +++ b/m4/gettext/lib-ld.m4 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 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. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +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 GCC]) + 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. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path 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(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_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 `"$acl_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="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_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_LIB_PROG_LD_GNU +]) diff --git a/m4/gettext/lib-link.m4 b/m4/gettext/lib-link.m4 new file mode 100644 index 000000000..ea0b0c4ea --- /dev/null +++ b/m4/gettext/lib-link.m4 @@ -0,0 +1,553 @@ +# lib-link.m4 serial 6 (gettext-0.14.3) +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, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.50) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, +dnl hardcode_direct, hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +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], +[ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib$1-prefix], +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + 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 + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + 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/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + 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 + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) diff --git a/m4/gettext/lib-prefix.m4 b/m4/gettext/lib-prefix.m4 new file mode 100644 index 000000000..0d895ca63 --- /dev/null +++ b/m4/gettext/lib-prefix.m4 @@ -0,0 +1,153 @@ +# lib-prefix.m4 serial 4 (gettext-0.14.2) +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, +dnl with or without modifications, as long as this notice is preserved. + +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([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])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +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_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + 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 + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) diff --git a/m4/gettext/longdouble.m4 b/m4/gettext/longdouble.m4 new file mode 100644 index 000000000..40cd7ce02 --- /dev/null +++ b/m4/gettext/longdouble.m4 @@ -0,0 +1,28 @@ +# longdouble.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-2003 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. + +dnl From Bruno Haible. +dnl Test whether the compiler supports the 'long double' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_LONGDOUBLE], +[ + AC_CACHE_CHECK([for long double], gt_cv_c_long_double, + [if test "$GCC" = yes; then + gt_cv_c_long_double=yes + else + AC_TRY_COMPILE([ + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ + int array [2*(sizeof(long double) >= sizeof(double)) - 1]; + ], , + gt_cv_c_long_double=yes, gt_cv_c_long_double=no) + fi]) + if test $gt_cv_c_long_double = yes; then + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) + fi +]) diff --git a/m4/gettext/longlong.m4 b/m4/gettext/longlong.m4 new file mode 100644 index 000000000..7b399e012 --- /dev/null +++ b/m4/gettext/longlong.m4 @@ -0,0 +1,23 @@ +# longlong.m4 serial 5 +dnl Copyright (C) 1999-2004 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. + +dnl From Paul Eggert. + +# Define HAVE_LONG_LONG if 'long long' works. + +AC_DEFUN([gl_AC_TYPE_LONG_LONG], +[ + AC_CACHE_CHECK([for long long], ac_cv_type_long_long, + [AC_TRY_LINK([long long ll = 1LL; int i = 63;], + [long long llmax = (long long) -1; + return ll << i | ll >> i | llmax / ll | llmax % ll;], + ac_cv_type_long_long=yes, + ac_cv_type_long_long=no)]) + if test $ac_cv_type_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, + [Define if you have the 'long long' type.]) + fi +]) diff --git a/m4/gettext/nls.m4 b/m4/gettext/nls.m4 new file mode 100644 index 000000000..2082c3b24 --- /dev/null +++ b/m4/gettext/nls.m4 @@ -0,0 +1,51 @@ +# nls.m4 serial 2 (gettext-0.14.3) +dnl Copyright (C) 1995-2003, 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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + 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/gettext/po.m4 b/m4/gettext/po.m4 new file mode 100644 index 000000000..f2795eea0 --- /dev/null +++ b/m4/gettext/po.m4 @@ -0,0 +1,429 @@ +# po.m4 serial 7 (gettext-0.14.3) +dnl Copyright (C) 1995-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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +dnl Checks for all prerequisites of the po subdirectory. +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_NLS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + 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. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + 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 + + AC_OUTPUT_COMMANDS([ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + 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. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" < +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, + [ + AC_EGREP_CPP(notposix, [ +#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ + notposix +#endif + ], gt_cv_func_printf_posix="guessing no", + gt_cv_func_printf_posix="guessing yes") + ]) + ]) + case $gt_cv_func_printf_posix in + *yes) + AC_DEFINE(HAVE_POSIX_PRINTF, 1, + [Define if your printf() function supports format strings with positions.]) + ;; + esac +]) diff --git a/m4/gettext/progtest.m4 b/m4/gettext/progtest.m4 new file mode 100644 index 000000000..a56365cd3 --- /dev/null +++ b/m4/gettext/progtest.m4 @@ -0,0 +1,92 @@ +# progtest.m4 serial 4 (gettext-0.14.2) +dnl Copyright (C) 1996-2003, 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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ(2.50) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) diff --git a/m4/gettext/signed.m4 b/m4/gettext/signed.m4 new file mode 100644 index 000000000..048f59369 --- /dev/null +++ b/m4/gettext/signed.m4 @@ -0,0 +1,17 @@ +# signed.m4 serial 1 (gettext-0.10.40) +dnl Copyright (C) 2001-2002 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. + +dnl From Bruno Haible. + +AC_DEFUN([bh_C_SIGNED], +[ + AC_CACHE_CHECK([for signed], bh_cv_c_signed, + [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) + if test $bh_cv_c_signed = no; then + AC_DEFINE(signed, , + [Define to empty if the C compiler doesn't support this keyword.]) + fi +]) diff --git a/m4/gettext/size_max.m4 b/m4/gettext/size_max.m4 new file mode 100644 index 000000000..4fe81c7b0 --- /dev/null +++ b/m4/gettext/size_max.m4 @@ -0,0 +1,59 @@ +# size_max.m4 serial 2 +dnl Copyright (C) 2003 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. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS(stdint.h) + dnl First test whether the system already has SIZE_MAX. + AC_MSG_CHECKING([for SIZE_MAX]) + result= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], result=yes) + if test -z "$result"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. + dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', + dnl which is guaranteed to work from LONG_MIN to LONG_MAX. + _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, + [#include ], result=?) + _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, + [#include ], result=?) + _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, + [#include ], result=?) + if test "$fits_in_uint" = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_TRY_COMPILE([#include + extern size_t foo; + extern unsigned long foo; + ], [], fits_in_uint=0) + fi + if test -z "$result"; then + if test "$fits_in_uint" = 1; then + result="$res_hi$res_lo"U + else + result="$res_hi$res_lo"UL + fi + else + dnl Shouldn't happen, but who knows... + result='~(size_t)0' + fi + fi + AC_MSG_RESULT([$result]) + if test "$result" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi +]) diff --git a/m4/gettext/stdint_h.m4 b/m4/gettext/stdint_h.m4 new file mode 100644 index 000000000..3355f35aa --- /dev/null +++ b/m4/gettext/stdint_h.m4 @@ -0,0 +1,26 @@ +# stdint_h.m4 serial 5 +dnl Copyright (C) 1997-2004 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. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + gl_cv_header_stdint_h=yes, + gl_cv_header_stdint_h=no)]) + if test $gl_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/gettext/uintmax_t.m4 b/m4/gettext/uintmax_t.m4 new file mode 100644 index 000000000..bf83ed746 --- /dev/null +++ b/m4/gettext/uintmax_t.m4 @@ -0,0 +1,30 @@ +# uintmax_t.m4 serial 9 +dnl Copyright (C) 1997-2004 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. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . + +AC_DEFUN([gl_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + else + AC_DEFINE(HAVE_UINTMAX_T, 1, + [Define if you have the 'uintmax_t' type in or .]) + fi +]) diff --git a/m4/gettext/ulonglong.m4 b/m4/gettext/ulonglong.m4 new file mode 100644 index 000000000..dee10ccc3 --- /dev/null +++ b/m4/gettext/ulonglong.m4 @@ -0,0 +1,23 @@ +# ulonglong.m4 serial 4 +dnl Copyright (C) 1999-2004 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. + +dnl From Paul Eggert. + +# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. + +AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the 'unsigned long long' type.]) + fi +]) diff --git a/m4/gettext/wchar_t.m4 b/m4/gettext/wchar_t.m4 new file mode 100644 index 000000000..cde2129a9 --- /dev/null +++ b/m4/gettext/wchar_t.m4 @@ -0,0 +1,20 @@ +# wchar_t.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-2003 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. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, + [AC_TRY_COMPILE([#include + wchar_t foo = (wchar_t)'\0';], , + gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) + fi +]) diff --git a/m4/gettext/wint_t.m4 b/m4/gettext/wint_t.m4 new file mode 100644 index 000000000..b8fff9c86 --- /dev/null +++ b/m4/gettext/wint_t.m4 @@ -0,0 +1,20 @@ +# wint_t.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2003 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. + +dnl From Bruno Haible. +dnl Test whether has the 'wint_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WINT_T], +[ + AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, + [AC_TRY_COMPILE([#include + wint_t foo = (wchar_t)'\0';], , + gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) + fi +]) diff --git a/m4/gettext/xsize.m4 b/m4/gettext/xsize.m4 new file mode 100644 index 000000000..85bb721e4 --- /dev/null +++ b/m4/gettext/xsize.m4 @@ -0,0 +1,13 @@ +# xsize.m4 serial 3 +dnl Copyright (C) 2003-2004 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. + +AC_DEFUN([gl_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_REQUIRE([AC_C_INLINE]) + AC_CHECK_HEADERS(stdint.h) +]) diff --git a/m4/glibc2.m4 b/m4/glibc2.m4 deleted file mode 100644 index e8f5bfe6e..000000000 --- a/m4/glibc2.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc2.m4 serial 1 -dnl Copyright (C) 2000-2002, 2004 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. - -# Test for the GNU C Library, version 2.0 or newer. -# From Bruno Haible. - -AC_DEFUN([gt_GLIBC2], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, - ac_cv_gnu_library_2, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2=yes, - ac_cv_gnu_library_2=no) - ] - ) - AC_SUBST(GLIBC2) - GLIBC2="$ac_cv_gnu_library_2" - ] -) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index d95fd9861..000000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc21.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004 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. - -# Test for the GNU C Library, version 2.1 or newer. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) - ] - ) - AC_SUBST(GLIBC21) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/iconv.m4 b/m4/iconv.m4 deleted file mode 100644 index 5ed7c43ae..000000000 --- a/m4/iconv.m4 +++ /dev/null @@ -1,117 +0,0 @@ -# iconv.m4 serial AM4 (gettext-0.11.3) -dnl Copyright (C) 2000-2002 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. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - 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], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - am_cv_func_iconv=yes) - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - am_cv_lib_iconv=yes - am_cv_func_iconv=yes) - LIBS="$am_save_LIBS" - fi - ]) - if test "$am_cv_func_iconv" = yes; then - AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST(LIBICONV) - AC_SUBST(LTLIBICONV) -]) - -AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL(am_cv_proto_iconv, [ - AC_TRY_COMPILE([ -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif -], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([$]{ac_t:- - }[$]am_cv_proto_iconv) - AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, - [Define as const if the declaration of iconv() needs const.]) - fi -]) diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 deleted file mode 100644 index b8d78176a..000000000 --- a/m4/intdiv0.m4 +++ /dev/null @@ -1,70 +0,0 @@ -# intdiv0.m4 serial 1 (gettext-0.11.3) -dnl Copyright (C) 2002 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. - -dnl From Bruno Haible. - -AC_DEFUN([gt_INTDIV0], -[ - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - - AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], - gt_cv_int_divbyzero_sigfpe, - [ - AC_TRY_RUN([ -#include -#include - -static void -#ifdef __cplusplus -sigfpe_handler (int sig) -#else -sigfpe_handler (sig) int sig; -#endif -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; - -int main () -{ - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif - - z = x / y; - nan = y / y; - exit (1); -} -], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, - [ - # Guess based on the CPU. - case "$host_cpu" in - alpha* | i[34567]86 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac - ]) - ]) - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac - AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, - [Define if integer division by zero raises signal SIGFPE.]) -]) diff --git a/m4/intmax.m4 b/m4/intmax.m4 deleted file mode 100644 index d99c999fd..000000000 --- a/m4/intmax.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# intmax.m4 serial 2 (gettext-0.14.2) -dnl Copyright (C) 2002-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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the system has the 'intmax_t' type, but don't attempt to -dnl find a replacement if it is lacking. - -AC_DEFUN([gt_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, - [AC_TRY_COMPILE([ -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif -], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE(HAVE_INTMAX_T, 1, - [Define if you have the 'intmax_t' type in or .]) - fi -]) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 deleted file mode 100644 index 4d56a9ad3..000000000 --- a/m4/inttypes-pri.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# inttypes-pri.m4 serial 1 (gettext-0.11.4) -dnl Copyright (C) 1997-2002 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. - -dnl From Bruno Haible. - -# Define PRI_MACROS_BROKEN if exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_REQUIRE([gt_HEADER_INTTYPES_H]) - if test $gt_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - gt_cv_inttypes_pri_broken, - [ - AC_TRY_COMPILE([#include -#ifdef PRId32 -char *p = PRId32; -#endif -], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, - [Define if exists and defines unusable PRI* macros.]) - fi -]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 deleted file mode 100644 index 779bcea05..000000000 --- a/m4/inttypes.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# inttypes.m4 serial 1 (gettext-0.11.4) -dnl Copyright (C) 1997-2002 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. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H if exists and doesn't clash with -# . - -AC_DEFUN([gt_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, - [ - AC_TRY_COMPILE( - [#include -#include ], - [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) - ]) - if test $gt_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, - [Define if exists and doesn't clash with .]) - fi -]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 deleted file mode 100644 index a5d075d96..000000000 --- a/m4/inttypes_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# inttypes_h.m4 serial 6 -dnl Copyright (C) 1997-2004 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. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1;], - gl_cv_header_inttypes_h=yes, - gl_cv_header_inttypes_h=no)]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4 deleted file mode 100644 index 74dc8f26d..000000000 --- a/m4/isc-posix.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# isc-posix.m4 serial 2 (gettext-0.11.2) -dnl Copyright (C) 1995-2002 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. - -# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN([AC_ISC_POSIX], - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 deleted file mode 100644 index 19aa77e4f..000000000 --- a/m4/lcmessage.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# lcmessage.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1995-2002, 2004-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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi -]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 deleted file mode 100644 index 96c4e2c33..000000000 --- a/m4/lib-ld.m4 +++ /dev/null @@ -1,110 +0,0 @@ -# lib-ld.m4 serial 3 (gettext-0.13) -dnl Copyright (C) 1996-2003 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. - -dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -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 GCC]) - 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. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path 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(acl_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_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 `"$acl_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="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_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_LIB_PROG_LD_GNU -]) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 deleted file mode 100644 index ea0b0c4ea..000000000 --- a/m4/lib-link.m4 +++ /dev/null @@ -1,553 +0,0 @@ -# lib-link.m4 serial 6 (gettext-0.14.3) -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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ(2.50) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - undefine([Name]) - undefine([NAME]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. If found, it -dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and -dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIB[]NAME" - AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - undefine([Name]) - undefine([NAME]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, -dnl hardcode_direct, hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE(rpath, - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -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], -[ - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib$1-prefix], -[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib - --without-lib$1-prefix don't search for lib$1 in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/lib" - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then - found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - 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 - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - 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/*$,,'` - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - 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 - haveit= - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" - done - dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 deleted file mode 100644 index e0736ce1c..000000000 --- a/m4/lib-prefix.m4 +++ /dev/null @@ -1,153 +0,0 @@ -# lib-prefix.m4 serial 4 (gettext-0.14.2) -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, -dnl with or without modifications, as long as this notice is preserved. - -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], -[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])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -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_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/lib" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - 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 - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/lib"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) diff --git a/m4/longdouble.m4 b/m4/longdouble.m4 deleted file mode 100644 index 40cd7ce02..000000000 --- a/m4/longdouble.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# longdouble.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 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. - -dnl From Bruno Haible. -dnl Test whether the compiler supports the 'long double' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_LONGDOUBLE], -[ - AC_CACHE_CHECK([for long double], gt_cv_c_long_double, - [if test "$GCC" = yes; then - gt_cv_c_long_double=yes - else - AC_TRY_COMPILE([ - /* The Stardent Vistra knows sizeof(long double), but does not support it. */ - long double foo = 0.0; - /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ - int array [2*(sizeof(long double) >= sizeof(double)) - 1]; - ], , - gt_cv_c_long_double=yes, gt_cv_c_long_double=no) - fi]) - if test $gt_cv_c_long_double = yes; then - AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) - fi -]) diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index 7b399e012..000000000 --- a/m4/longlong.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# longlong.m4 serial 5 -dnl Copyright (C) 1999-2004 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. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG if 'long long' works. - -AC_DEFUN([gl_AC_TYPE_LONG_LONG], -[ - AC_CACHE_CHECK([for long long], ac_cv_type_long_long, - [AC_TRY_LINK([long long ll = 1LL; int i = 63;], - [long long llmax = (long long) -1; - return ll << i | ll >> i | llmax / ll | llmax % ll;], - ac_cv_type_long_long=yes, - ac_cv_type_long_long=no)]) - if test $ac_cv_type_long_long = yes; then - AC_DEFINE(HAVE_LONG_LONG, 1, - [Define if you have the 'long long' type.]) - fi -]) diff --git a/m4/nls.m4 b/m4/nls.m4 deleted file mode 100644 index 2082c3b24..000000000 --- a/m4/nls.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# nls.m4 serial 2 (gettext-0.14.3) -dnl Copyright (C) 1995-2003, 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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ(2.50) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - 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/po.m4 deleted file mode 100644 index f2795eea0..000000000 --- a/m4/po.m4 +++ /dev/null @@ -1,429 +0,0 @@ -# po.m4 serial 7 (gettext-0.14.3) -dnl Copyright (C) 1995-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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ(2.50) - -dnl Checks for all prerequisites of the po subdirectory. -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_NLS])dnl - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - - 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. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - 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 - - AC_OUTPUT_COMMANDS([ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - 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. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat < "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" < /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <> "$ac_file.tmp" < -#include -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, - [ - AC_EGREP_CPP(notposix, [ -#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ - notposix -#endif - ], gt_cv_func_printf_posix="guessing no", - gt_cv_func_printf_posix="guessing yes") - ]) - ]) - case $gt_cv_func_printf_posix in - *yes) - AC_DEFINE(HAVE_POSIX_PRINTF, 1, - [Define if your printf() function supports format strings with positions.]) - ;; - esac -]) diff --git a/m4/progtest.m4 b/m4/progtest.m4 deleted file mode 100644 index a56365cd3..000000000 --- a/m4/progtest.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# progtest.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1996-2003, 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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1996. - -AC_PREREQ(2.50) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[ -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - [[\\/]]* | ?:[[\\/]]*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) diff --git a/m4/signed.m4 b/m4/signed.m4 deleted file mode 100644 index 048f59369..000000000 --- a/m4/signed.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# signed.m4 serial 1 (gettext-0.10.40) -dnl Copyright (C) 2001-2002 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. - -dnl From Bruno Haible. - -AC_DEFUN([bh_C_SIGNED], -[ - AC_CACHE_CHECK([for signed], bh_cv_c_signed, - [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) - if test $bh_cv_c_signed = no; then - AC_DEFINE(signed, , - [Define to empty if the C compiler doesn't support this keyword.]) - fi -]) diff --git a/m4/size_max.m4 b/m4/size_max.m4 deleted file mode 100644 index 4fe81c7b0..000000000 --- a/m4/size_max.m4 +++ /dev/null @@ -1,59 +0,0 @@ -# size_max.m4 serial 2 -dnl Copyright (C) 2003 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. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS(stdint.h) - dnl First test whether the system already has SIZE_MAX. - AC_MSG_CHECKING([for SIZE_MAX]) - result= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -], result=yes) - if test -z "$result"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. - dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', - dnl which is guaranteed to work from LONG_MIN to LONG_MAX. - _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, - [#include ], result=?) - _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, - [#include ], result=?) - _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, - [#include ], result=?) - if test "$fits_in_uint" = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_TRY_COMPILE([#include - extern size_t foo; - extern unsigned long foo; - ], [], fits_in_uint=0) - fi - if test -z "$result"; then - if test "$fits_in_uint" = 1; then - result="$res_hi$res_lo"U - else - result="$res_hi$res_lo"UL - fi - else - dnl Shouldn't happen, but who knows... - result='~(size_t)0' - fi - fi - AC_MSG_RESULT([$result]) - if test "$result" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi -]) diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 deleted file mode 100644 index 3355f35aa..000000000 --- a/m4/stdint_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# stdint_h.m4 serial 5 -dnl Copyright (C) 1997-2004 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. - -dnl From Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1;], - gl_cv_header_stdint_h=yes, - gl_cv_header_stdint_h=no)]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index bf83ed746..000000000 --- a/m4/uintmax_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# uintmax_t.m4 serial 9 -dnl Copyright (C) 1997-2004 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. - -dnl From Paul Eggert. - -AC_PREREQ(2.13) - -# Define uintmax_t to 'unsigned long' or 'unsigned long long' -# if it is not already defined in or . - -AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, - [Define to unsigned long or unsigned long long - if and don't define.]) - else - AC_DEFINE(HAVE_UINTMAX_T, 1, - [Define if you have the 'uintmax_t' type in or .]) - fi -]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 deleted file mode 100644 index dee10ccc3..000000000 --- a/m4/ulonglong.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ulonglong.m4 serial 4 -dnl Copyright (C) 1999-2004 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. - -dnl From Paul Eggert. - -# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. - -AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], -[ - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], - [unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull;], - ac_cv_type_unsigned_long_long=yes, - ac_cv_type_unsigned_long_long=no)]) - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the 'unsigned long long' type.]) - fi -]) diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 deleted file mode 100644 index cde2129a9..000000000 --- a/m4/wchar_t.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# wchar_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 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. - -dnl From Bruno Haible. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, - [AC_TRY_COMPILE([#include - wchar_t foo = (wchar_t)'\0';], , - gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 deleted file mode 100644 index b8fff9c86..000000000 --- a/m4/wint_t.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# wint_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2003 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. - -dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, - [AC_TRY_COMPILE([#include - wint_t foo = (wchar_t)'\0';], , - gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/m4/xsize.m4 b/m4/xsize.m4 deleted file mode 100644 index 85bb721e4..000000000 --- a/m4/xsize.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# xsize.m4 serial 3 -dnl Copyright (C) 2003-2004 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. - -AC_DEFUN([gl_XSIZE], -[ - dnl Prerequisites of lib/xsize.h. - AC_REQUIRE([gl_SIZE_MAX]) - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS(stdint.h) -]) -- cgit v1.2.3 From 88f0b49b0ae74f6555eccbb1fa0811ec1cf6a815 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 3 May 2007 01:08:17 -0400 Subject: Fix alpha order of files in EXTRA_DIST and add missing files: ioctl_request.m4 and symbol.m4 --- m4/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/m4/Makefile.am b/m4/Makefile.am index a652a0234..4bbb35bfa 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -17,6 +17,8 @@ EXTRA_DIST = \ directx.m4 \ dl.m4 \ dvdnav.m4 \ + gas.m4 \ + ioctl_request.m4 \ irixal.m4 \ libFLAC.m4 \ libfame.m4 \ @@ -24,8 +26,8 @@ EXTRA_DIST = \ opengl.m4 \ optimizations.m4 \ pkg.m4 \ + pthreads.m4 \ + symbol.m4 \ xine.m4 \ _xine.m4 \ - xv.m4 \ - pthreads.m4 \ - gas.m4 + xv.m4 -- cgit v1.2.3 From c13a7214479410ae60a3726671aeb99eb6ba0b1e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 3 May 2007 01:08:58 -0400 Subject: Remove libtool15.m4 -- Nobody can offer up an explanation as to what this is here for, and the logs are less than forthcoming about it, so let's get rid of it and see what breaks, if anything. --- m4/Makefile.am | 1 - m4/libtool15.m4 | 6168 ------------------------------------------------------- 2 files changed, 6169 deletions(-) delete mode 100644 m4/libtool15.m4 diff --git a/m4/Makefile.am b/m4/Makefile.am index 4bbb35bfa..2aaa677da 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -22,7 +22,6 @@ EXTRA_DIST = \ irixal.m4 \ libFLAC.m4 \ libfame.m4 \ - libtool15.m4 \ opengl.m4 \ optimizations.m4 \ pkg.m4 \ 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 , 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 </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 < -#endif - -#include - -#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.so - # instead of lib.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 <&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 &1 /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 < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$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 , 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 < $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 < 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 <> 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 <&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 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 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 <&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 -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #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 -# 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]) -]) -- cgit v1.2.3 From e20369d1b3e91cd45c1281e37030124b2af1b00f Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 3 May 2007 01:32:03 -0400 Subject: Update minimum tool versions: autoconf 2.59, automake 1.9.0, libtool 1.5.20 --- autogen.sh | 8 ++++---- configure.ac | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autogen.sh b/autogen.sh index 1d54576df..33ef528a8 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 diff --git a/configure.ac b/configure.ac index 8e56406b9..883b403b9 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR([src/xine-engine/xine.c]) AC_CONFIG_LIBOBJ_DIR([lib]) dnl -dnl Require autoconf version 2.60 +dnl Require autoconf version 2.59 dnl AC_PREREQ(2.59) -- cgit v1.2.3 From b988ef1fe6268819c69f345b4f1836fb739cf3fe Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 4 May 2007 08:13:32 -0400 Subject: Move some stuff out of configure.ac and into existing or new m4 files for better organization. No functional change. --- configure.ac | 770 +-------------------------------------------------------- m4/Makefile.am | 5 +- m4/macosx.m4 | 64 +++++ m4/pthreads.m4 | 25 ++ m4/summary.m4 | 437 ++++++++++++++++++++++++++++++++ m4/vcd.m4 | 230 +++++++++++++++++ 6 files changed, 767 insertions(+), 764 deletions(-) create mode 100644 m4/macosx.m4 create mode 100644 m4/summary.m4 create mode 100644 m4/vcd.m4 diff --git a/configure.ac b/configure.ac index 883b403b9..c82876823 100644 --- a/configure.ac +++ b/configure.ac @@ -102,54 +102,7 @@ test "$host" == "$build" && check_athlon=yes 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 - - 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) +MACOSX_UNIVERSAL_BINARIES dnl --------------------------------------------- @@ -266,35 +219,8 @@ 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 - -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 -]) +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 --------------------------------------------- dnl Windows ports checks @@ -1014,18 +940,14 @@ dnl --------------------------------------------- dnl Check whether to build Mac OS X video output driver dnl --------------------------------------------- -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"]) +MACOSX_VIDEO_SUPPORT dnl --------------------------------------------- dnl Check whether to build Mac OS X audio output driver dnl --------------------------------------------- -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"]) +MACOSX_AUDIO_SUPPORT dnl --------------------------------------------- @@ -1731,248 +1653,7 @@ dnl --------------------------------------------- dnl Video CD dnl --------------------------------------------- -AC_ARG_ENABLE(vcd, AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin]), - enable_vcd=$enableval, enable_vcd=yes) - -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 - - 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 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 - - 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 -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.) - ;; - 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 ]) - 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"]) +VCD_SUPPORT dnl --------------------------------------------- @@ -2110,9 +1791,6 @@ 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) @@ -2762,438 +2440,4 @@ cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool. 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" -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):" -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 " * 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 -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 +XINE_LIB_SUMMARY diff --git a/m4/Makefile.am b/m4/Makefile.am index 2aaa677da..10ac6f002 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -22,11 +22,14 @@ EXTRA_DIST = \ irixal.m4 \ libFLAC.m4 \ libfame.m4 \ + macosx.m4 \ opengl.m4 \ optimizations.m4 \ pkg.m4 \ pthreads.m4 \ symbol.m4 \ + summary.m4 \ xine.m4 \ _xine.m4 \ - xv.m4 + xv.m4 \ + vcd.m4 diff --git a/m4/macosx.m4 b/m4/macosx.m4 new file mode 100644 index 000000000..bcc40f0dc --- /dev/null +++ b/m4/macosx.m4 @@ -0,0 +1,64 @@ +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 + + 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) +])dnl MACOSX_UNIVERSAL_BINARIES + +AC_DEFUN([MACOSX_AUDIO_SUPPORT], [ + AC_ARG_ENABLE([coreaudio], + AS_HELP_STRING([--enable-coreaudio], [enable support for Mac OS X CoreAudio output]), + [have_coreaudio="$enableval"], [have_coreaudio="no"]) + AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" = x"yes"]) +])dnl MACOSX_AUDIO_SUPPORT + +AC_DEFUN([MACOSX_VIDEO_SUPPORT], [ + AC_ARG_ENABLE([macosx-video], + AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]), + [have_macosx_video="$enableval"], [have_macosx_video="no"]) + AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" = x"yes"]) +])dnl MACOSX_VIDEO_SUPPORT 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 + +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..9bebcde27 --- /dev/null +++ b/m4/summary.m4 @@ -0,0 +1,437 @@ +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" + echo " - dvb" + 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):" + 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 " * 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 + 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/vcd.m4 b/m4/vcd.m4 new file mode 100644 index 000000000..917fc5128 --- /dev/null +++ b/m4/vcd.m4 @@ -0,0 +1,230 @@ +AC_DEFUN([VCD_SUPPORT], [ + AC_ARG_ENABLE(vcd, AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin]), + enable_vcd=$enableval, enable_vcd=yes) + +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 + + 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 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 + + 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 +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.) + ;; + 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 ]) + 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"]) +]) -- cgit v1.2.3 From c2b75ba4b4c9d61e44494e24e3eee22725eb493e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 4 May 2007 17:04:36 -0400 Subject: Move a bunch of x11/xv related stuff out of configure.ac --- configure.ac | 253 +-------------------------------------------------------- m4/Makefile.am | 1 + m4/x11.m4 | 54 ++++++++++++ m4/xv.m4 | 202 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 259 insertions(+), 251 deletions(-) create mode 100644 m4/x11.m4 diff --git a/configure.ac b/configure.ac index 1e1477de3..a126ca9fd 100644 --- a/configure.ac +++ b/configure.ac @@ -425,58 +425,8 @@ 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()]) +XINE_X11_SUPPORT dnl --------------------------------------------- @@ -597,206 +547,7 @@ 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" -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") - - -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 - -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" - ;; - - *) - ;; -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) - +XINE_XV_SUPPORT dnl --------------------------------------------- dnl Check for xcb diff --git a/m4/Makefile.am b/m4/Makefile.am index 10ac6f002..ca42405a5 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -31,5 +31,6 @@ EXTRA_DIST = \ summary.m4 \ xine.m4 \ _xine.m4 \ + x11.m4 \ xv.m4 \ vcd.m4 diff --git a/m4/x11.m4 b/m4/x11.m4 new file mode 100644 index 000000000..d8a951b19 --- /dev/null +++ b/m4/x11.m4 @@ -0,0 +1,54 @@ +dnl --------------------------------------------- +dnl Checks for X11 +dnl --------------------------------------------- + +AC_DEFUN([XINE_X11_SUPPORT], [ + 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()]) +]) diff --git a/m4/xv.m4 b/m4/xv.m4 index 91380a1de..04b7f1ee1 100644 --- a/m4/xv.m4 +++ b/m4/xv.m4 @@ -91,3 +91,205 @@ AC_DEFUN([AC_FIND_LIBXV], AC_TEST_LIBXV fi ]) + +dnl ---------------------------------------------- +dnl Check for Xv and XvMC support +dnl ---------------------------------------------- + +AC_DEFUN([XINE_XV_SUPPORT], [ + 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" + 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") + + + 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 + + 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" + ;; + + *) + ;; + 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) +]) -- cgit v1.2.3 From 38c69c107eecc5fbdf9a10d8fbf1577ba998126b Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 4 May 2007 18:57:55 -0400 Subject: Clean up configure-time version handling -- Execute version.sh from configure.ac to get version information. Update the release version in this file now instead of configure.ac. -- Clean up a bunch of cruft hanging around and consolidate version information as much as possible. -- Move autoconf/autoheader/automake initialization together. -- Use AM_MAINTAINER_MODE --- configure.ac | 123 ++++++++++++++------------------------------------ misc/SlackBuild.in | 14 +++--- misc/build_rpms.sh.in | 12 ++--- misc/relchk.sh.in | 2 +- misc/xine-lib.spec.in | 4 +- version.sh | 50 ++++++++++++++++++++ 6 files changed, 100 insertions(+), 105 deletions(-) create mode 100755 version.sh diff --git a/configure.ac b/configure.ac index a126ca9fd..e49ff0258 100644 --- a/configure.ac +++ b/configure.ac @@ -1,95 +1,53 @@ -dnl -dnl Configure.ac for xine -dnl +AC_PREREQ(2.59) -AC_INIT +dnl Note that autoconf/autoheader/automake cache using autom4te, so version.sh +dnl will only be run if configure.ac has changed. +m4_esyscmd([./version.sh])dnl + +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.59 -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="" -fi +#endif /* __XINE_LIB_CONFIG_H__ */ +]) +dnl Do not change these manually; they come from running ./version.sh when +dnl autoconf runs. +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 -AM_INIT_AUTOMAKE("xine-lib", $SPEC_VERSION) -dnl AM_INIT_AUTOMAKE("xine-lib", $XINE_MAJOR-$XINE_PRE) +AC_DEFINE_UNQUOTED([XINE_TEXTDOMAIN], "$LIBNAME", [catalog message text domain]) dnl --------------------------------------------- dnl Made possible to build for another arch. @@ -100,7 +58,6 @@ AC_CANONICAL_BUILD test "$host" == "$build" && check_athlon=yes -AC_CONFIG_HEADERS([config.h]) MACOSX_UNIVERSAL_BINARIES @@ -1569,16 +1526,6 @@ dnl --------------------------------------------- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ asm (".align 3"); ]])], AC_DEFINE([ASMALIGN_1SLN], [1], [define if '.align n' means alignment to (1< 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/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" -- cgit v1.2.3 From b5de3be503bc9fac73ffbcaf6ce92970195c122f Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 4 May 2007 20:51:33 -0400 Subject: Begin cleaning up compiler command-line flags - Removed debug related targets from all Makefiles. Debug builds are now fully controlled by --enable-debug passed to configure - Disable optimizations by default when configuring with --enable-debug - Added --enable-profiling for building profile builds. This has problems with optimizations currently, but that'll get taken care of over time. - Initialize ASFLAGS/CFLAGS/CPPFLAGS/OBJCFLAGS/LDFLAGS early so that autoconf defaults don't come into play. - Added some additional commentary to configure.ac --- Makefile.am | 16 +----------- configure.ac | 71 ++++++++++++++++++++++++++++++++++++---------------- include/Makefile.am | 6 ----- m4/optimizations.m4 | 6 +++-- misc/Makefile.common | 10 -------- po/Makefile.in.in | 3 --- 6 files changed, 55 insertions(+), 57 deletions(-) diff --git a/Makefile.am b/Makefile.am index f41b34b2c..2b82d1bdc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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/configure.ac b/configure.ac index e49ff0258..209fcf784 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,11 @@ AC_PREREQ(2.59) dnl Note that autoconf/autoheader/automake cache using autom4te, so version.sh -dnl will only be run if configure.ac has changed. +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 +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]) @@ -26,8 +28,14 @@ AH_BOTTOM([#ifdef ASMALIGN_1SLN #endif /* __XINE_LIB_CONFIG_H__ */ ]) + +dnl ------------------------- +dnl Setup version information +dnl ------------------------- + dnl Do not change these manually; they come from running ./version.sh when -dnl autoconf runs. +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]) @@ -49,6 +57,46 @@ LIBNAME="libxine${XINE_MAJOR}" AC_SUBST(LIBNAME) AC_DEFINE_UNQUOTED([XINE_TEXTDOMAIN], "$LIBNAME", [catalog message text domain]) +dnl +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. +ASFLAGS="$ASFLAGS -g" +CFLAGS="$CFLAGS -g" +CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE" +LDFLAGS="$LDFLAGS -g" +OBJCFLAGS="$OBJCFLAGS -g" + +AC_SUBST(ASFLAGS) + + +dnl ------------------------------ +dnl Build modes: debug and profile +dnl ------------------------------ + +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug], [build with debugging code enabled]), + [enable_debug="yes"], [enable_debug="no"]) +if test x"$enable_debug" != x"no"; then + CPPFLAGS="$CPPFLAGS -DDEBUG" +else + CPPFLAGS="$CPPFLAGS -DNDEBUG" +fi +AM_CONDITIONAL([DEBUG_BUILD], [test x"$enable_debug" != x"no"]) + +AC_ARG_ENABLE([profiling], + AS_HELP_STRING([--enable-profiling], [build with profiling code enabled]), + [enable_profiling="yes"], [enable_profiling="no"]) +if test x"$enable_profiling" != x"no"; then + CFLAGS="$CFLAGS -pg" + OBJCFLAGS="$OBJCFLAGS -pg" + LDFLAGS="$LDFLAGS -pg" +fi +AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"]) + + dnl --------------------------------------------- dnl Made possible to build for another arch. dnl --------------------------------------------- @@ -1576,17 +1624,6 @@ AC_CHECK_FUNC(opendir, -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 --------------------------------------------- @@ -2016,15 +2053,7 @@ 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" - -if test "x$enable_debug" = "xyes"; then - CPPFLAGS="$CPPFLAGS -DDEBUG" -else - CPPFLAGS="$CPPFLAGS -DNDEBUG" -fi dnl --------------------------------------------- dnl Output configuration files 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/m4/optimizations.m4 b/m4/optimizations.m4 index cc5e7c524..d47dc94e0 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -8,8 +8,10 @@ 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])) + dnl By default, enable optimizations only if --enable-debug is not specified + 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"]) if test "x$enable_optimizations" != "xno"; then INLINE_FUNCTIONS=-finline-functions diff --git a/misc/Makefile.common b/misc/Makefile.common index a3fe43de6..6df3b9228 100644 --- a/misc/Makefile.common +++ b/misc/Makefile.common @@ -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/po/Makefile.in.in b/po/Makefile.in.in index 2b9a10dc5..582cfc0a5 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -385,9 +385,6 @@ Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status -debug: -install-debug: - force: # Tell versions [3.59,3.63) of GNU make not to export all variables. -- cgit v1.2.3 From f1d5c1fc6c4c79bdc8969b94cf0ca08d3dbd7735 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 4 May 2007 21:55:20 -0400 Subject: More build cleanups -- Pull AC_PROG_OBJC and AC_PROG_OBJCPP from autoconf 2.61, but use the local versions only if they're not defined by the version of autoconf in use. -- Always call AC_PROG_OBJC since there's no harm in doing so. It'll fail most of the time, but it's cleaner than adding yet another $host_os check -- Remove -DCONFIG_DARWIN from CPPFLAGS since it was added specifically for ffmpeg when ffmpeg was built using xine's built infrastructure rather than its own. It's now defined properly where its needed elsewhere. -- Set host_or_hostalias early rather than later in the middle of xv checking since a bunch of other stuff depends on it too. --- configure.ac | 34 ++++----- m4/Makefile.am | 1 + m4/objc.m4 | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/optimizations.m4 | 2 +- m4/xv.m4 | 11 --- 5 files changed, 211 insertions(+), 31 deletions(-) create mode 100644 m4/objc.m4 diff --git a/configure.ac b/configure.ac index 209fcf784..a32d61eb6 100644 --- a/configure.ac +++ b/configure.ac @@ -97,38 +97,34 @@ fi AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"]) -dnl --------------------------------------------- -dnl Made possible to build for another arch. -dnl --------------------------------------------- +dnl ---------------------------------------------- +dnl Cross compilation, Mac OS X Universal Binaries +dnl ---------------------------------------------- -AC_CANONICAL_HOST AC_CANONICAL_BUILD +AC_CANONICAL_HOST -test "$host" == "$build" && check_athlon=yes - - +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 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" + dnl --------------------------------------------- dnl Check for programs. dnl --------------------------------------------- AC_PROG_CC +AC_PROG_OBJC 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 - AC_GNU_SOURCE dnl Save CFLAGS, AC_ISC_POSIX set some unwanted default CFLAGS saved_CFLAGS="$CFLAGS" diff --git a/m4/Makefile.am b/m4/Makefile.am index ca42405a5..242fff4d3 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ libFLAC.m4 \ libfame.m4 \ macosx.m4 \ + objc.m4 \ opengl.m4 \ optimizations.m4 \ pkg.m4 \ diff --git a/m4/objc.m4 b/m4/objc.m4 new file mode 100644 index 000000000..1e3b3cb41 --- /dev/null +++ b/m4/objc.m4 @@ -0,0 +1,194 @@ +# Extracted from autoconf 2.61 to obtain Objective C macros. + +# 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. + +# ------------------------------ # +# 3d. The Objective C compiler. # +# ------------------------------ # + +m4_ifdef([AC_PROG_OBJCPP], [], [ + +dnl Commented out, because aclocal freaks out about the ()'s +dnl # AC_LANG_PREPROC(Objective C) +dnl # ---------------------------- +dnl # Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. +dnl AC_DEFUN([AC_LANG_PREPROC(Objective C)], +dnl [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 + +])dnl m4_ifdef([AC_PROG_OBJCPP]) + + +m4_ifdef([AC_PROG_OBJC], [], [ + +dnl Commented out, because aclocal freaks out about the ()'s +dnl # AC_LANG_COMPILER(Objective C) +dnl # ----------------------------- +dnl # Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. +dnl AC_DEFUN([AC_LANG_COMPILER(Objective C)], +dnl [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 +_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. +_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +ac_compiler=`set X $ac_compile; echo $[2]` +_AC_DO([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) +_AC_DO([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) +_AC_DO([$ac_compiler -V >&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/optimizations.m4 b/m4/optimizations.m4 index d47dc94e0..f25da2a02 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -125,7 +125,7 @@ AC_DEFUN([AC_OPTIMIZATIONS], [ ;; pentiumpro-* | pentium2-* | i686-*) archopt_val="pentiumpro" - if test x"$check_athlon" = "xyes"; then + if test x"$host" = x"$build"; then if test -f /proc/cpuinfo; then modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d':' -f2` case "$modelname" in diff --git a/m4/xv.m4 b/m4/xv.m4 index 04b7f1ee1..073f339fb 100644 --- a/m4/xv.m4 +++ b/m4/xv.m4 @@ -121,17 +121,6 @@ AC_DEFUN([XINE_XV_SUPPORT], [ AM_CONDITIONAL(HAVE_XV, test "x$ac_have_xv" = "xyes") - 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 - case "$host_or_hostalias" in hppa*) if test "x$ac_have_xv_static" = "xyes"; then -- cgit v1.2.3 From 841b0ad20602fc81831ee7e50d6c0607152a5b79 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 5 May 2007 01:09:43 -0400 Subject: More cleanups for configure.ac -- Begin re-ordering tests as appropriate to match the recommended autoconf layout -- Remove dead tests, replacing some tests with standard existing autoconf tests added in 2.59 (or possibly earlier) -- Use $host_or_hostalias in more places instead of $host -- Set OBJCFLAGS when CFLAGS is set just before producing output --- configure.ac | 387 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 179 insertions(+), 208 deletions(-) diff --git a/configure.ac b/configure.ac index a32d61eb6..bf1e1f975 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.59) 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 +m4_esyscmd([./version.sh]) dnl Initialize autoconf, autoheader, and automake AC_INIT([xine-lib], XINE_VERSION_SPEC, [xine-bugs@lists.sourceforge.net]) @@ -63,11 +63,11 @@ 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. -ASFLAGS="$ASFLAGS -g" -CFLAGS="$CFLAGS -g" -CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE" -LDFLAGS="$LDFLAGS -g" -OBJCFLAGS="$OBJCFLAGS -g" +ASFLAGS="-g $ASFLAGS" +CFLAGS="-g $CFLAGS" +CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $CPPFLAGS" +LDFLAGS="-g $LDFLAGS" +OBJCFLAGS="-g $OBJCFLAGS" AC_SUBST(ASFLAGS) @@ -80,9 +80,9 @@ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [build with debugging code enabled]), [enable_debug="yes"], [enable_debug="no"]) if test x"$enable_debug" != x"no"; then - CPPFLAGS="$CPPFLAGS -DDEBUG" + CPPFLAGS="-DDEBUG $CPPFLAGS" else - CPPFLAGS="$CPPFLAGS -DNDEBUG" + CPPFLAGS="-DNDEBUG $CPPFLAGS" fi AM_CONDITIONAL([DEBUG_BUILD], [test x"$enable_debug" != x"no"]) @@ -90,9 +90,9 @@ AC_ARG_ENABLE([profiling], AS_HELP_STRING([--enable-profiling], [build with profiling code enabled]), [enable_profiling="yes"], [enable_profiling="no"]) if test x"$enable_profiling" != x"no"; then - CFLAGS="$CFLAGS -pg" - OBJCFLAGS="$OBJCFLAGS -pg" - LDFLAGS="$LDFLAGS -pg" + CFLAGS="-pg $CFLAGS" + OBJCFLAGS="-pg $OBJCFLAGS" + LDFLAGS="-pg $LDFLAGS" fi AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"]) @@ -117,61 +117,52 @@ host_or_hostalias="$host" test x"$host_or_hostalias" = x"" && host_or_hostalias="$host_alias" -dnl --------------------------------------------- -dnl Check for programs. -dnl --------------------------------------------- +dnl ------------------- +dnl checks for programs +dnl ------------------- AC_PROG_CC AC_PROG_OBJC AM_PROG_AS -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_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 --------------------------------------------- +AC_GNU_SOURCE +AC_ISC_POSIX +PKG_PROG_PKG_CONFIG + +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 + +dnl REVISIT: +dnl Nothing seems to use LIBTOOL_DEPS +dnl src/video_out/libdha and src/video_out/vidix both use STATIC -- why? AC_SUBST(LIBTOOL_DEPS) if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then - STATIC="-static" + STATIC="-static" else - STATIC= + 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 REVISIT: NLS Support 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" @@ -200,13 +191,35 @@ AC_PROG_GMSGFMT_PLURAL AC_CHECK_FUNCS([nl_langinfo]) -dnl --------------------------------------------- -dnl Checks for typedefs, structures, and compiler characteristics. -dnl --------------------------------------------- +dnl -------------------- +dnl checks for libraries +dnl -------------------- + +AM_DL() + +dnl Test for socket and network support library +AC_CHECK_LIB([socket], [socket], [NET_LIBS="-lsocket $NET_LIBS"]) +AC_CHECK_LIB([nsl], [gethostbyname], [NET_LIBS="-lnsl $NET_LIBS"]) +AC_SUBST(NET_LIBS) + +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_SUBST(RT_LIBS) + + +dnl ----------------------- +dnl checks for header files +dnl ----------------------- + +AC_HEADER_STDC + + +dnl ---------------- +dnl checks for types +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) @@ -216,13 +229,129 @@ 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 --------------------------------------------- +AC_CHECK_SOCKLEN_T + +dnl --------------------- +dnl checks for structures +dnl --------------------- + + + +dnl ----------------------------------- +dnl checks for compiler characteristics +dnl ----------------------------------- + +CC_CHECK_WERROR 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 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])]) + +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]) + +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([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]) + +CC_ATTRIBUTE_SENTINEL +CC_ATTRIBUTE_FORMAT +CC_ATTRIBUTE_FORMAT_ARG + +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. +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 +CC_CHECK_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"]) +warnflags="$warnflags $wformat" + +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"])]) + +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. +case $host_or_hostalias in + *-freebsd*) ;; + *) + AC_TRY_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) + ;; +esac +AC_SUBST([NOUNDEF]) + + +dnl ---------------------------- +dnl checks for library functions +dnl ---------------------------- + +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 +]) + +dnl contrib/libdca, src/video_out/vidix/drivers/mach64_vid.c +AC_CHECK_FUNCS([memalign]) + +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" = x"yes"; then + AC_CHECK_FUNCS([mmap]) +fi + + +dnl -------------------------- +dnl checks for system services +dnl -------------------------- + +AC_SYS_LARGEFILE + + + + + + + + + + + + + dnl --------------------------------------------- dnl Windows ports checks dnl --------------------------------------------- @@ -256,18 +385,12 @@ 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 +case $host_or_hostalias in *-*-linux*) # Test if the compiler is 64bit echo 'int i;' > conftest.$ac_ext @@ -364,21 +487,6 @@ AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test "x$enable_ffmpeg_popular_c 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 -]) -AC_CHECK_DECL(rintf,[ - AC_DEFINE(HAVE_RINTF,1,[Define this if the 'rintf' function is declared in math.h]) - ],,[ -#include -]) - -AC_CHECK_FUNCS(memalign) - AC_ARG_ENABLE([altivec], AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs])) @@ -430,23 +538,6 @@ AC_SUBST(MLIB_CFLAGS) XINE_X11_SUPPORT -dnl --------------------------------------------- -dnl socket library -dnl --------------------------------------------- - -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_SUBST(NET_LIBS) - - -dnl --------------------------------------------- -dnl socklen_t -dnl --------------------------------------------- -AC_CHECK_SOCKLEN_T - - dnl --------------------------------------------- dnl IPv6 dnl --------------------------------------------- @@ -495,17 +586,6 @@ AC_SUBST(ZLIB_CPPFLAGS) AC_SUBST(ZLIB_LIBS) -dnl --------------------------------------------- -dnl check posix timers -dnl --------------------------------------------- - -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_SUBST(RT_LIBS) - dnl --------------------------------------------- dnl Check for OpenGL & [GLut | GLU] dnl --------------------------------------------- @@ -1497,7 +1577,7 @@ AC_ARG_WITH([real-codecs-path], 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 +case $host_or_hostalias in *-darwin*) enable_real_codecs="no" ;; esac @@ -1516,17 +1596,6 @@ fi AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) -dnl -------------------------------------------- -dnl mmap() support -dnl -------------------------------------------- - -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]) -fi - dnl --------------------------------------------- dnl antialising support dnl --------------------------------------------- @@ -1544,38 +1613,10 @@ dnl --------------------------------------------- AC_CHECK_IP_MREQN -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< Date: Sat, 5 May 2007 20:15:41 -0400 Subject: More configure.ac cleanups - moving stuff around --- configure.ac | 153 +++++++++++++++++++++++++---------------------------------- 1 file changed, 65 insertions(+), 88 deletions(-) diff --git a/configure.ac b/configure.ac index bf1e1f975..f5b891d7a 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,25 @@ AH_BOTTOM([#ifdef ASMALIGN_1SLN #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 @@ -138,6 +157,14 @@ AC_ISC_POSIX 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],[]) @@ -200,6 +227,7 @@ AM_DL() dnl Test for socket and network support library 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) AC_CHECK_LIB([rt], [clock_getres], @@ -208,6 +236,7 @@ AC_CHECK_LIB([rt], [clock_getres], [AC_MSG_RESULT([*** no POSIX timers available.])]) AC_SUBST(RT_LIBS) +AC_CHECK_LIB([posix4], [sched_get_priority_min]) dnl ----------------------- dnl checks for header files @@ -215,6 +244,12 @@ dnl ----------------------- AC_HEADER_STDC +dnl REVISIT: should we not be using AC_FUNC_ALLOCA for this? +AC_CHECK_HEADERS([alloca.h]) + +AC_CHECK_HEADERS([assert.h byteswap.h dirent.h execinfo.h libgen.h malloc.h netdb.h ucontext.h]) +AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h]) + dnl ---------------- dnl checks for types @@ -235,6 +270,7 @@ dnl --------------------- dnl checks for structures dnl --------------------- +AC_CHECK_IP_MREQN dnl ----------------------------------- @@ -333,6 +369,35 @@ if test x"$enable_mmap" = x"yes"; then AC_CHECK_FUNCS([mmap]) fi +AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr va_copy]) + +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]) + +AC_FUNC_FSEEKO + +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 ]], [[hstrerror(0)]])], + [AC_DEFINE([HAVE_HSTRERROR], 1, [Define to 1 if you have 'hstrerror' in ])], + [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"$SYS" = x"mingw32"; then + AC_LIBOBJ([dirent_msvc]) + else + AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)]) + fi]) + dnl -------------------------- dnl checks for system services @@ -1607,58 +1672,6 @@ 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 - -dnl --------------------------------------------- -dnl Some extra checks. -dnl --------------------------------------------- - -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 -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 ]) - -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]) - AC_OPTIMIZATIONS @@ -1789,38 +1802,11 @@ if test "x$enable_impure_text" = xyes; then fi AC_SUBST(IMPURE_TEXT_LDFLAGS) -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 - -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 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 @@ -1986,15 +1972,6 @@ 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 -- cgit v1.2.3 From 807d1f979a8963e05b7403f3529c99b35cbe347d Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 5 May 2007 21:49:50 -0400 Subject: More configure cleanups. -- Move Windows port checks to an earlier point, but after AC_PROG_CC and AC_PROG_EGREP are done, because it depends on both of them. Also rename SYS to WIN32_SYS, because the former is way too generic and prone to clashes from elsewhere. -- Removed some dead automake work-arounds that should no longer be necessary with the new automake 1.9 requirement -- For Mac OS X universal builds, don't set CFLAGS/OBJCFLAGS/LDFLAGS so early with multiple -arch flags. Set them at the end from UNIVERSAL_CFLAGS and UNIVERSAL_LDFLAGS. -- Move set of INCLUDES down to final set of CFLAGS/OBJCFLAGS/LDFLAGS. --- configure.ac | 128 +++++++++++++++++++++++++---------------------------------- m4/macosx.m4 | 6 --- 2 files changed, 55 insertions(+), 79 deletions(-) diff --git a/configure.ac b/configure.ac index f5b891d7a..c2132d3de 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,6 @@ LIBNAME="libxine${XINE_MAJOR}" AC_SUBST(LIBNAME) AC_DEFINE_UNQUOTED([XINE_TEXTDOMAIN], "$LIBNAME", [catalog message text domain]) -dnl 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 @@ -187,6 +186,37 @@ else fi AC_SUBST(STATIC) +dnl Windows ports checks +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. +case "$host_or_hostalias" in + *-*-mingw* | *-*-cygwin*) + 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_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"$WIN32_SYS" = x"mingw32"]) + dnl --------------------------------------------- dnl REVISIT: NLS Support @@ -261,7 +291,7 @@ 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") +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 @@ -392,7 +422,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[hstrerror(0)]])], 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" = x"mingw32"; then + [if test x"$WIN32_SYS" = x"mingw32"; then AC_LIBOBJ([dirent_msvc]) else AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)]) @@ -417,39 +447,6 @@ AC_SYS_LARGEFILE -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 determine libdir name dnl --------------------------------------------- @@ -1674,6 +1671,16 @@ fi + + + + + + + + + + AC_OPTIMIZATIONS arch_x86="no" @@ -1830,7 +1837,7 @@ 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 +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'`" @@ -1930,14 +1937,6 @@ 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 --------------------------------------------- @@ -1962,32 +1961,6 @@ 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 Newest automake workaround -dnl --------------------------------------------- - -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 @@ -1995,9 +1968,18 @@ _AM_DEPENDENCIES([OBJC]) AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_gdkpixbuf" != "xyes"]) +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 Common cflags for all platforms -CFLAGS="\$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" -OBJCFLAGS="$warnflags $OBJCFLAGS" +CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" +LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS" +OBJCFLAGS="$UNIVERSAL_CFLAGS $warnflags $OBJCFLAGS" dnl --------------------------------------------- dnl Output configuration files diff --git a/m4/macosx.m4 b/m4/macosx.m4 index bcc40f0dc..1c1becd2e 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -30,16 +30,10 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ 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 -- cgit v1.2.3 From d7308052a0aeb970f7cf6ebc9ed73992858364e9 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sun, 6 May 2007 00:59:28 -0400 Subject: More cleanups - move stuff around some more and a few tweaks --- configure.ac | 158 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 84 insertions(+), 74 deletions(-) diff --git a/configure.ac b/configure.ac index c2132d3de..aa282de1a 100644 --- a/configure.ac +++ b/configure.ac @@ -95,8 +95,8 @@ dnl Build modes: debug and profile dnl ------------------------------ AC_ARG_ENABLE([debug], - AS_HELP_STRING([--enable-debug], [build with debugging code enabled]), - [enable_debug="yes"], [enable_debug="no"]) + [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 @@ -105,8 +105,8 @@ fi AM_CONDITIONAL([DEBUG_BUILD], [test x"$enable_debug" != x"no"]) AC_ARG_ENABLE([profiling], - AS_HELP_STRING([--enable-profiling], [build with profiling code enabled]), - [enable_profiling="yes"], [enable_profiling="no"]) + [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" @@ -115,6 +115,31 @@ fi AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"]) +dnl -------------- +dnl Build features +dnl -------------- + +AC_ARG_ENABLE([altivec], + [AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs])], + [], [enable_altivec="yes"]) + +AC_ARG_ENABLE([vis], + [AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs])], + [], [enable_vis="yes"]) + +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]) + +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]) + + dnl ---------------------------------------------- dnl Cross compilation, Mac OS X Universal Binaries dnl ---------------------------------------------- @@ -549,12 +574,6 @@ AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test "x$enable_ffmpeg_popular_c LIBMPEG2_CFLAGS="" -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])) @@ -600,17 +619,6 @@ AC_SUBST(MLIB_CFLAGS) XINE_X11_SUPPORT -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 --------------------------------------------- @@ -1659,16 +1667,42 @@ fi AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) dnl --------------------------------------------- -dnl antialising support +dnl For win32 libraries location, needed by libw32dll. dnl --------------------------------------------- -AC_ARG_ENABLE([antialiasing], - AS_HELP_STRING([--enable-antialiasing], [enable font antialiasing])) +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) -if test "x$enable_antialiasing" = "xyes"; then - AC_DEFINE(ENABLE_ANTIALIASING,1,[Define this to 1 to enable font antialising.]) +AC_ARG_ENABLE([w32dll], + AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support]), + , [enable_w32dll=$with_gnu_as]) + +case $host_or_hostalias 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") + + + @@ -1809,6 +1843,20 @@ if test "x$enable_impure_text" = xyes; then fi AC_SUBST(IMPURE_TEXT_LDFLAGS) + + + + + + + + + + + + + + dnl --------------------------------------------- dnl XINE_ROOTDIR does not work if architecture independent files are dnl installed to another place than architecture dependent files !!! @@ -1889,54 +1937,6 @@ eval XINE_SCRIPTPATH="$XINE_DATADIR/xine/scripts" 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_or_hostalias 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 Get where .m4 should be installed. dnl --------------------------------------------- @@ -1981,6 +1981,16 @@ CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS" OBJCFLAGS="$UNIVERSAL_CFLAGS $warnflags $OBJCFLAGS" + +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) + + dnl --------------------------------------------- dnl Output configuration files dnl --------------------------------------------- -- cgit v1.2.3 From 3736bbc56bd4cf5b0326a2d14a370f11e58ead83 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 00:03:41 -0400 Subject: RIP: AC_OPTIMIZATIONS -- Removed m4/optimizations.m4, and along with it, AC_OPTIMIZATIONS. -- Stripped down, cleaned up, and merged the former together with other compiler characteristic checks. -- Do not set any optimization flags into CFLAGS. Update all Makefile.am's with proper AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, etc. to set up optimization flags, usually from DEFAULT_OCFLAGS. -- Start cleaning up CFLAGS/CPPFLAGS stuff in Makefile.am's all over the place. -- Correct a number of places where CFLAGS itself was being mangled in Makefile to on-the-fly adjust optimizations to work around compiler bugs. This stuff is now done correctly. -- The run of automake from autogen.sh is now clean of warnings. -- Cleaned out some (now) dead macros from m4/_xine.m4 -- Mac OS X intel builds out-of-the-box now -- dropped optimization on post/deinterlace/plugins/kdetv-greedyh to O1_CFLAGS. -- OBJCFLAGS is now getting set correctly everywhere that it needs to be -- Various other miscellaneous cleanups all over --- autogen.sh | 2 +- configure.ac | 540 ++++++++++++++++++++----------- contrib/libdca/Makefile.am | 4 +- contrib/libmpcdec/Makefile.am | 3 +- contrib/libxdg-basedir/Makefile.am | 3 +- lib/Makefile.am | 2 + m4/Makefile.am | 1 - m4/_xine.m4 | 30 -- m4/attributes.m4 | 18 ++ m4/optimizations.m4 | 261 --------------- src/audio_out/Makefile.am | 44 +-- src/combined/Makefile.am | 10 +- src/demuxers/Makefile.am | 3 +- src/dxr3/Makefile.am | 9 +- src/input/Makefile.am | 41 +-- src/input/libdvdnav/Makefile.am | 4 +- src/input/libreal/Makefile.am | 3 +- src/input/librtsp/Makefile.am | 5 +- src/input/vcd/Makefile.am | 6 +- src/input/vcd/libcdio/Makefile.am | 5 +- src/input/vcd/libvcd/Makefile.am | 5 +- src/liba52/Makefile.am | 6 +- src/libfaad/Makefile.am | 6 +- src/libffmpeg/Makefile.am | 16 +- src/libmad/Makefile.am | 7 +- src/libmpeg2/Makefile.am | 6 +- src/libmpeg2new/Makefile.am | 7 +- src/libmpeg2new/libmpeg2/Makefile.am | 2 + src/libreal/Makefile.am | 5 +- src/libspucc/Makefile.am | 6 +- src/libspucmml/Makefile.am | 5 +- src/libspudec/Makefile.am | 8 +- src/libspudvb/Makefile.am | 5 +- src/libsputext/Makefile.am | 3 +- src/libw32dll/Makefile.am | 6 +- src/libw32dll/wine/Makefile.am | 14 +- src/libxineadec/Makefile.am | 14 +- src/libxineadec/gsm610/Makefile.am | 5 +- src/libxineadec/nosefart/Makefile.am | 5 +- src/libxinevdec/Makefile.am | 2 +- src/post/audio/Makefile.am | 5 +- src/post/deinterlace/Makefile.am | 7 +- src/post/deinterlace/plugins/Makefile.am | 18 +- src/post/goom/Makefile.am | 15 +- src/post/mosaico/Makefile.am | 7 +- src/post/planar/Makefile.am | 12 +- src/post/visualizations/Makefile.am | 5 +- src/video_out/Makefile.am | 55 ++-- src/video_out/libdha/Makefile.am | 2 +- src/video_out/macosx/Makefile.am | 10 +- src/video_out/vidix/Makefile.am | 6 +- src/video_out/vidix/drivers/Makefile.am | 30 +- src/xine-engine/Makefile.am | 3 +- src/xine-utils/Makefile.am | 3 +- 54 files changed, 569 insertions(+), 736 deletions(-) delete mode 100644 m4/optimizations.m4 diff --git a/autogen.sh b/autogen.sh index 33ef528a8..95bce9774 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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." } diff --git a/configure.ac b/configure.ac index aa282de1a..433387eb1 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ 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. ASFLAGS="-g $ASFLAGS" CFLAGS="-g $CFLAGS" -CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $CPPFLAGS" +CPPFLAGS="-D_REENTRANT -DXINE_COMPILE $CPPFLAGS" LDFLAGS="-g $LDFLAGS" OBJCFLAGS="-g $OBJCFLAGS" @@ -211,37 +211,6 @@ else fi AC_SUBST(STATIC) -dnl Windows ports checks -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. -case "$host_or_hostalias" in - *-*-mingw* | *-*-cygwin*) - 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_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"$WIN32_SYS" = x"mingw32"]) - dnl --------------------------------------------- dnl REVISIT: NLS Support @@ -332,6 +301,17 @@ dnl ----------------------------------- dnl checks for compiler characteristics dnl ----------------------------------- +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 +AC_SUBST(GCC_VERSION) +AC_SUBST(GCC_VERSION_MAJOR) +AC_SUBST(GCC_VERSION_MINOR) +AC_SUBST(GCC_VERSION_PATCHLEVEL) + CC_CHECK_WERROR CC_PTHREAD_FLAGS([], [AC_MSG_ERROR([Pthread support is needed])]) @@ -372,9 +352,14 @@ CC_ATTRIBUTE_SENTINEL CC_ATTRIBUTE_FORMAT CC_ATTRIBUTE_FORMAT_ARG +CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"]) + 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. + +CC_CHECK_CFLAGS([-Wall], [warnflags="$warnflags -Wall"]) + CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"], [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])]) if test x"$wformat" != x""; then @@ -389,16 +374,340 @@ CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags 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 ]], [[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 platform not behaving this way. -case $host_or_hostalias in +dnl use -Wl,-z,defs only for those platforms not behaving this way. +case "$host_or_hostalias" in *-freebsd*) ;; + + 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*) + 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_CPPFLAGS='-I$(top_srcdir)/win32/include' + LIBS="-lwinmm -lwsock32 $LIBS" + GOOM_LIBS="-liberty" + AC_SUBST(GOOM_LIBS) + AC_SUBST(WIN32_CPPFLAGS) + fi + LDFLAGS="-no-undefined $LDFLAGS" + ;; + *) - AC_TRY_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) + CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) + AC_SUBST([NOUNDEF]) + ;; +esac + +AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"]) + +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"]) + +case "$host_or_hostalias" in + alphaev56-*) cpuflags="-mcpu=ev56 -mieee $cpuflags" ;; + alpha*) cpuflags="-mieee $cpuflags" ;; + + armv4l-*-linux*) + cpuflags="-mcpu=strongarm1100 -ffast-math -fsigned-char $cpuflags" + DEFAULT_OCFLAGS='$(O2_CFLAGS)' + ;; + + 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]) + ;; + + x86_64-*) + arch_x86=yes + AC_DEFINE([ARCH_X86_64], [], [Define this if you're running x86 architecture 64 bits]) + ;; + + *-*-darwin*) + case "$host_or_hostalias" in + i386-* | universal-* | x86_64-*) + arch_x86=yes + ;; + ppc* | powerpc*) + dnl avoid ppc compilation crash + AS="$CC" + + 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" + ;; + + ppc-*-linux* | powerpc-*) + 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 + ;; + + 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_SUBST([NOUNDEF]) + +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 +fi +AM_CONDITIONAL([ENABLE_VIS], test x"$has_vis" = x"yes") + +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"]) +if test x"$enable_optimizations" = x"no"; then + O1_CFLAGS="$O0_CLFAGS" + O2_CFLAGS="$O0_CFLAGS" + O3_CFLAGS="$O0_CFLAGS" +else + O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags" + O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags" + O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags" + + 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(PASS1_CFLAGS) +AC_SUBST(PASS2_CFLAGS) + +test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)' +AC_SUBST(DEFAULT_OCFLAGS) + +if test x"$arch_x86" = x"yes"; 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_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") + +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) dnl ---------------------------- @@ -1702,161 +2011,6 @@ fi AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" != "xno") - - - - - - - - - - - - - -AC_OPTIMIZATIONS - -arch_x86="no" -enable_armv4l="no" - -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" - - 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_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") - -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" - ;; -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 XINE_ROOTDIR does not work if architecture independent files are dnl installed to another place than architecture dependent files !!! @@ -1977,9 +2131,9 @@ AC_SUBST(INCLUDES) dnl Common cflags for all platforms -CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" +CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $miscflags $warnflags $CFLAGS" LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS" -OBJCFLAGS="$UNIVERSAL_CFLAGS $warnflags $OBJCFLAGS" +OBJCFLAGS="$UNIVERSAL_CFLAGS $miscflags $warnflags $OBJCFLAGS" dnl Some informations about xine-lib compilation for xine-config diff --git a/contrib/libdca/Makefile.am b/contrib/libdca/Makefile.am index 14206a363..a118a9dc9 100644 --- a/contrib/libdca/Makefile.am +++ b/contrib/libdca/Makefile.am @@ -4,12 +4,14 @@ noinst_LTLIBRARIES = libdca.la endif endif +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + 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_CPPFLAGS = -I$(srcdir)/include libdca_la_LIBADD = -lm EXTRA_DIST = COPYING diff --git a/contrib/libmpcdec/Makefile.am b/contrib/libmpcdec/Makefile.am index 16ea80c28..5751239bf 100644 --- a/contrib/libmpcdec/Makefile.am +++ b/contrib/libmpcdec/Makefile.am @@ -4,11 +4,12 @@ noinst_LTLIBRARIES = libmpcdec.la endif endif +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + libmpcdec_la_SOURCES = huffsv46.c huffsv7.c idtag.c mpc_decoder.c mpc_reader.c \ requant.c streaminfo.c synth_filter.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/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/m4/Makefile.am b/m4/Makefile.am index 242fff4d3..90067a942 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -25,7 +25,6 @@ EXTRA_DIST = \ macosx.m4 \ objc.m4 \ opengl.m4 \ - optimizations.m4 \ pkg.m4 \ pthreads.m4 \ symbol.m4 \ diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 930703bbb..92e372fcb 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -142,36 +142,6 @@ AC_DEFUN([AC_CHECK_DXR3], 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], diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 23b5f2ee4..f781429f7 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 diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 deleted file mode 100644 index f25da2a02..000000000 --- a/m4/optimizations.m4 +++ /dev/null @@ -1,261 +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], [ - dnl By default, enable optimizations only if --enable-debug is not specified - 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"]) - - 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 ]], [[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"$host" = x"$build"; 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/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 20a4e708b..d9b44557e 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = audio_irixal_out.c @@ -70,77 +71,52 @@ xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ 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_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_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..64655c1eb 100644 --- a/src/combined/Makefile.am +++ b/src/combined/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + if HAVE_WAVPACK xineplug_wavpack = xineplug_wavpack.la endif @@ -11,11 +14,10 @@ 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_CFLAGS = $(AM_CFLAGS) $(WAVPACK_CFLAGS) +xineplug_wavpack_la_CPPFLAGS = -I$(srcdir)/../demuxers xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS) -xineplug_wavpack_la_LDFLAGS = $(xineplug_ldflags) xineplug_flac_la_SOURCES = demux_flac.c decoder_flac.c demux_flac.h -xineplug_flac_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBFLAC_CFLAGS) +xineplug_flac_la_CFLAGS = $(AM_CFLAGS) $(LIBFLAC_CFLAGS) xineplug_flac_la_LIBADD = $(XINE_LIB) $(LIBFLAC_LIBS) -xineplug_flac_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 8a931c2d6..4722a982d 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if HAVE_VORBIS @@ -101,7 +101,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 \ diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index 5f413f804..836f57e6e 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(X_CFLAGS) $(LIBFAME_CFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(X_CFLAGS) $(LIBFAME_CFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) if HAVE_DXR3 dxr3_modules = xineplug_decode_dxr3_video.la \ @@ -21,8 +22,6 @@ xineplug_LTLIBRARIES = $(dxr3_modules) 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) @@ -33,8 +32,6 @@ 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) 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,8 +40,6 @@ 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 \ diff --git a/src/input/Makefile.am b/src/input/Makefile.am index ae38de187..ce8c2fe33 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -1,5 +1,11 @@ include $(top_srcdir)/misc/Makefile.common +# REVISIT: This second line here bothers me more than just a little bit +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) \ + $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) +AM_CPPFLAGS = -D_LARGEFILE64_SOURCE +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = input_dvd.c input_vcd.c input_gnome_vfs.c input_rtp.c if HAVE_DVDNAV @@ -48,7 +54,6 @@ 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 \ @@ -71,85 +76,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_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_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) 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_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) 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_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_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..b7e313a38 100644 --- a/src/input/libdvdnav/Makefile.am +++ b/src/input/libdvdnav/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -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..500dfb910 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../librtsp noinst_LTLIBRARIES = libreal.la @@ -10,8 +11,6 @@ libreal_la_SOURCES = \ rmff.c \ sdpplin.c -libreal_la_CFLAGS = $(VISIBILITY_FLAG) - noinst_HEADERS = \ real.h \ asmrp.h \ diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am index bb85f9cf4..9027ab260 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../libreal +AM_LDFLAGS = $(xineplug_ldflags) noinst_LTLIBRARIES = librtsp.la @@ -8,9 +10,6 @@ librtsp_la_SOURCES = \ rtsp.c \ rtsp_session.c -librtsp_la_CFLAGS = $(VISIBILITY_FLAG) -librtsp_la_LDFLAGS = -avoid-version -module - noinst_HEADERS = \ rtsp.h \ rtsp_session.h diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 16eece779..014d28679 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libcdio libvcd vcd_SRCS = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c @@ -9,10 +12,9 @@ EXTRA_DIST = $(vcd_SRCS) if ENABLE_VCD xineplug_LTLIBRARIES = xineplug_inp_vcd.la -AM_CFLAGS = $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) +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 diff --git a/src/input/vcd/libcdio/Makefile.am b/src/input/vcd/libcdio/Makefile.am index c7415e787..0c6b26dac 100644 --- a/src/input/vcd/libcdio/Makefile.am +++ b/src/input/vcd/libcdio/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = cdio MSWindows image INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib @@ -54,9 +57,7 @@ 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 diff --git a/src/input/vcd/libvcd/Makefile.am b/src/input/vcd/libvcd/Makefile.am index 01b100aa4..cba784d26 100644 --- a/src/input/vcd/libvcd/Makefile.am +++ b/src/input/vcd/libvcd/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libvcd INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib @@ -36,10 +39,8 @@ 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 diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 6a0aebe62..948a7ab28 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + if A52 a52_module = xineplug_decode_a52.la endif @@ -27,9 +30,6 @@ else xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -lm endif -xineplug_decode_a52_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_a52_la_LDFLAGS = $(xineplug_ldflags) - noinst_HEADERS = \ a52.h \ a52_internal.h \ diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am index d1a4ed865..c02810f00 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = codebook if BUILD_FAAD @@ -10,7 +13,7 @@ xineplug_LTLIBRARIES = $(faad_module) VPATH = @srcdir@:@srcdir@/codebook: -xineplug_decode_faad_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing +xineplug_decode_faad_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing xineplug_decode_faad_la_SOURCES = \ bits.c \ cfft.c \ @@ -52,7 +55,6 @@ xineplug_decode_faad_la_SOURCES = \ tns.c \ xine_faad_decoder.c -xineplug_decode_faad_la_LDFLAGS = $(xineplug_ldflags) xineplug_decode_faad_la_LIBADD = -lm $(XINE_LIB) noinst_HEADERS = \ diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index 7b622cf74..b2571a4ea 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -1,7 +1,11 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + if HAVE_FFMPEG -AM_CFLAGS = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) +AM_CFLAGS += $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS) else @@ -39,25 +43,21 @@ 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) +AM_CPPFLAGS += -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) 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_LDFLAGS = $(AM_LDFLAGS) $(IMPURE_TEXT_LDFLAGS) xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \ $(link_ffmpeg) $(PTHREAD_LIBS) -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_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/contrib/ffmpeg/libavcodec xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index c879645c5..7e8b617f4 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -1,6 +1,8 @@ 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 @@ -35,8 +37,7 @@ 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) +xineplug_decode_mad_la_CFLAGS = $(AM_CFLAGS) $(LIBMAD_CFLAGS) noinst_HEADERS = \ D.dat \ diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index 66fb39f13..6b194ebbb 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = \ @@ -23,8 +26,7 @@ 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) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \ libmpeg2_accel.h diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 49959da86..8f8f1c940 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libmpeg2 xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la @@ -7,7 +10,5 @@ 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_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) - diff --git a/src/libmpeg2new/libmpeg2/Makefile.am b/src/libmpeg2new/libmpeg2/Makefile.am index f99894f12..83ae1c32f 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) + noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la libmpeg2_la_SOURCES = alloc.c header.c decode.c slice.c motion_comp.c idct.c diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am index c9cf62984..28d85fe45 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) + 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..c32e7a292 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) + 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_CFLAGS = $(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 diff --git a/src/libspucmml/Makefile.am b/src/libspucmml/Makefile.am index ac2970482..95b611008 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..d159728fc 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -1,5 +1,9 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_spu.la if HAVE_DVDNAV @@ -15,12 +19,10 @@ 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) endif -xineplug_decode_spu_la_CFLAGS = $(DVDNAV_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_spu_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_spu_la_CFLAGS = $(AM_CFLAGS) $(DVDNAV_CFLAGS) noinst_HEADERS = spu.h diff --git a/src/libspudvb/Makefile.am b/src/libspudvb/Makefile.am index e385e5553..f4248909f 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..71af2a1d3 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/Makefile.am b/src/libw32dll/Makefile.am index 367dc3bda..774cc8705 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,6 +1,8 @@ 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 @@ -15,7 +17,6 @@ EXTRA_DIST = common.c 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 \ @@ -28,7 +29,6 @@ xineplug_decode_w32dll_la_LIBADD = \ $(XDG_BASEDIR_LIBS) 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) \ diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index b53d2c078..1fd132dca 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,20 +1,16 @@ 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 diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am index 08d1df3dc..0d209be43 100644 --- a/src/libxineadec/Makefile.am +++ b/src/libxineadec/Makefile.am @@ -4,6 +4,7 @@ EXTRA_DIST = fooaudio.c SUBDIRS = gsm610 nosefart +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if HAVE_VORBIS @@ -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_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing +xineplug_decode_nsf_la_CPPFLAGS = -DNSF_PLAYER xineplug_decode_nsf_la_LIBADD = $(XINE_LIB) -lm nosefart/libnosefart.la 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_CFLAGS = $(AM_CFLAGS) $(MPCDEC_CFLAGS) xineplug_decode_mpc_la_DEPENDENCIES = $(MPCDEC_DEPS) xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(MPCDEC_LIBS) xineplug_decode_dts_la_SOURCES = xine_dts_decoder.c -xineplug_decode_dts_la_CFLAGS = $(LIBDTS_CFLAGS) $(VISIBILITY_FLAG) +xineplug_decode_dts_la_CFLAGS = $(AM_CFLAGS) $(LIBDTS_CFLAGS) xineplug_decode_dts_la_DEPENDENCIES = $(LIBDTS_DEPS) xineplug_decode_dts_la_LIBADD = $(XINE_LIB) $(LIBDTS_LIBS) 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..728991a96 100644 --- a/src/libxinevdec/Makefile.am +++ b/src/libxinevdec/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = foovideo.c diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am index f4018a780..3fae4f92c 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..4296b637c 100644 --- a/src/post/deinterlace/Makefile.am +++ b/src/post/deinterlace/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) + SUBDIRS = plugins EXTRA_DIST = @@ -11,8 +14,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..33cff9d7f 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -29,10 +29,17 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ 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 \ +AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \ -I$(top_srcdir)/contrib/ffmpeg/libpostproc -noinst_LTLIBRARIES = libdeinterlaceplugins.la +# 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 +libdeinterlacepluginsO1_la_CFLAGS = $(AM_CFLAGS) $(O1_CFLAGS) libdeinterlaceplugins_la_SOURCES = \ double.c \ @@ -43,10 +50,9 @@ libdeinterlaceplugins_la_SOURCES = \ 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 +libdeinterlaceplugins_la_LIBADD = libdeinterlacepluginsO1.la $(XINE_LIB) +libdeinterlaceplugins_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_OCFLAGS) +libdeinterlaceplugins_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = plugins.h greedyhmacros.h diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index 481b66b41..a8dc13ab0 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -1,15 +1,18 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + 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'` +#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'` +#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 @@ -19,18 +22,12 @@ xinepost_LTLIBRARIES = xineplug_post_goom.la #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 \ +xineplug_post_goom_la_SOURCES = mmx.c xmmx.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 -xineplug_post_goom_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_goom_la_LDFLAGS = -avoid-version -module 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 \ diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am index c18b4e19c..2fa3fc7a5 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 6d239202b..1c243397d 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -15,21 +15,19 @@ 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 +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) # 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'` +#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'` 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 diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index f42598d9c..a02a74f77 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = fooviz.c xinepost_LTLIBRARIES = xineplug_post_visualizations.la @@ -7,7 +10,5 @@ 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/video_out/Makefile.am b/src/video_out/Makefile.am index 148eda84c..acab646c8 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -1,13 +1,14 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) SUBDIRS = libdha vidix macosx 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 \ +VIDIX_CPPFLAGS = -I$(top_builddir)/src/video_out/vidix \ -I$(top_srcdir)/src/video_out/vidix if HAVE_X11 @@ -104,101 +105,93 @@ 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_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_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 = $(VIDIX_CPPFLAGS) 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_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_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 +xineplug_vo_out_macosx_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) +xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL noinst_HEADERS = deinterlace.h video_out_syncfb.h \ yuv2rgb.h x11osd.h xcbosd.h diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am index 8d94347d1..553907fc9 100644 --- a/src/video_out/libdha/Makefile.am +++ b/src/video_out/libdha/Makefile.am @@ -4,7 +4,7 @@ EXTRA_DIST = README pci_db2c.awk SUBDIRS = bin kernelhelper oth sysdep -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(STATIC) if HAVE_VIDIX dha_lib = libdha.la diff --git a/src/video_out/macosx/Makefile.am b/src/video_out/macosx/Makefile.am index a69f30dc5..d649dfe1d 100644 --- a/src/video_out/macosx/Makefile.am +++ b/src/video_out/macosx/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) EXTRA_DIST = \ video_window.h \ @@ -14,12 +14,8 @@ if HAVE_MACOSX_VIDEO 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 +libxineMacOSXVideo_la_LDFLAGS = -framework Cocoa -framework OpenGL \ + -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h diff --git a/src/video_out/vidix/Makefile.am b/src/video_out/vidix/Makefile.am index 2ca8f168a..e002c56f0 100644 --- a/src/video_out/vidix/Makefile.am +++ b/src/video_out/vidix/Makefile.am @@ -4,7 +4,9 @@ EXTRA_DIST = README vidix.txt SUBDIRS = drivers -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(STATIC) +AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ + -I$(top_builddir)/src/video_out/libdha if HAVE_VIDIX vidix_lib = libvidix.la @@ -17,5 +19,3 @@ libvidix_la_LIBADD = $(DYNAMIC_LD_LIBS) $(top_builddir)/src/video_out/libdha/lib 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..23272e4c9 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -1,5 +1,11 @@ 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 @@ -21,46 +27,36 @@ endif vidix_LTLIBRARIES = $(vidix_drivers) radeon_vid_la_SOURCES = radeon_vid.c -radeon_vid_la_LDFLAGS = -avoid-version -module -lm +radeon_vid_la_LIBADD = -lm rage128_vid_la_SOURCES = radeon_vid.c -rage128_vid_la_LDFLAGS = -avoid-version -module -lm -rage128_vid_la_CFLAGS = -DRAGE128 $(AM_CFLAGS) +rage128_vid_la_LIBADD = -lm +rage128_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DRAGE128 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 mach64_vid_la_SOURCES = mach64_vid.c -mach64_vid_la_LDFLAGS = -avoid-version -module 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) +mga_crtc2_vid_la_LIBADD = -lm +mga_crtc2_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DCRTC2 cyberblade_vid_la_SOURCES = cyberblade_vid.c -cyberblade_vid_la_LDFLAGS = -avoid-version -module unichrome_vid_la_SOURCES = unichrome_vid.c -unichrome_vid_la_LDFLAGS = -avoid-version -module nvidia_vid_la_SOURCES = nvidia_vid.c -nvidia_vid_la_LDFLAGS = -avoid-version -module sis_vid_la_SOURCES = sis_vid.c sis_bridge.c -sis_vid_la_LDFLAGS = -avoid-version -module 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 -AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_srcdir)/src/video_out/libdha \ - -I$(top_builddir)/src/video_out/libdha diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index aeb142708..f64dacba1 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,10 +1,9 @@ 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_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(XDG_BASEDIR_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE -LIBTOOL = $(SHELL) $(top_builddir)/libtool lib_LTLIBRARIES = libxine.la XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 95de06b9e..1e58d9fc1 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -1,6 +1,5 @@ include $(top_srcdir)/misc/Makefile.common -LIBTOOL = $(SHELL) $(top_builddir)/libtool noinst_LTLIBRARIES = libxineutils.la EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl @@ -11,7 +10,7 @@ pppc_files = ppcasm_string.S endif endif -AM_CFLAGS = $(X_CFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS=-DXINE_LIBRARY_COMPILE libxineutils_la_SOURCES = $(pppc_files) \ -- cgit v1.2.3 From 1956c347edc0af71e479eacbc9e64f67ba7cba05 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 00:14:51 -0400 Subject: Remove some more dead macros --- m4/_xine.m4 | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 92e372fcb..005ae3138 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -44,60 +44,6 @@ AC_DEFUN([AC_C_ALWAYS_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, -- cgit v1.2.3 From ff308c044bab7e8b8b55f70853925ac44a2001ad Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 16:34:45 -0400 Subject: More configure.ac cleanups -- Revisit NLS stuff. Not much changed, remove the REVISIT tag -- Change XDG_BASEDIR_CFLAGS to XDG_BASEDIR_CPPFLAGS, because it only includes a -I, which is a CPPFLAGS option, not CFLAGS -- Move XDG stuff up to library checks -- Cleanup and move zlib checks -- Move X11 checks up to checks for system services -- Break audio out plugin stuff into m4/audio_out.m4 -- Break video out plugin stuff into m4/video_out.m4 -- Move libdir name stuff into m4/libFLAC.m4 since that's the only thing that uses it. --- configure.ac | 675 +++++------------------------------------ m4/Makefile.am | 6 +- m4/audio_out.m4 | 170 +++++++++++ m4/libFLAC.m4 | 27 ++ m4/video_out.m4 | 318 +++++++++++++++++++ src/input/Makefile.am | 4 +- src/libw32dll/Makefile.am | 2 +- src/libw32dll/wine/Makefile.am | 2 +- src/xine-engine/Makefile.am | 4 +- 9 files changed, 600 insertions(+), 608 deletions(-) create mode 100644 m4/audio_out.m4 create mode 100644 m4/video_out.m4 diff --git a/configure.ac b/configure.ac index 433387eb1..609ef16a8 100644 --- a/configure.ac +++ b/configure.ac @@ -212,17 +212,16 @@ fi AC_SUBST(STATIC) -dnl --------------------------------------------- -dnl REVISIT: 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. * @@ -231,22 +230,33 @@ 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]) +AM_DL() -dnl -------------------- -dnl checks for libraries -dnl -------------------- +AC_ARG_WITH([external-libxdg-basedir], + [AS_HELP_STRING([--with-external-libxdg-basedir], [use external copy of libxdg-basedir])]) -AM_DL() +if test x"$with_external_libxdg_basedir" = x"yes"; then + PKG_CHECK_MODULES([XDG_BASEDIR], [libxdg-basedir >= 0.1.3]) +else + 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_CPPFLAGS]) +AC_SUBST([XDG_BASEDIR_LIBS]) +AC_SUBST([XDG_BASEDIR_DEPS]) + +AM_CONDITIONAL([EXTERNAL_LIBXDG_BASEDIR], [test x"$with_external_libxdg_basedir" = x"yes"]) dnl Test for socket and network support library AC_CHECK_LIB([socket], [socket], [NET_LIBS="-lsocket $NET_LIBS"]) @@ -262,6 +272,26 @@ AC_SUBST(RT_LIBS) AC_CHECK_LIB([posix4], [sched_get_priority_min]) +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) + + dnl ----------------------- dnl checks for header files dnl ----------------------- @@ -714,6 +744,9 @@ dnl ---------------------------- dnl checks for library functions dnl ---------------------------- +dnl NLS: src/input/mms.c src/input/vcd, xine-utils +AC_CHECK_FUNCS([nl_langinfo]) + dnl src/libfaad AC_CHECK_DECL(lrintf,[ AC_DEFINE([HAVE_LRINTF], [1], [Define this if the 'lrintf' function is declared in math.h]) @@ -767,9 +800,23 @@ dnl -------------------------- dnl checks for system services dnl -------------------------- +XINE_X11_SUPPORT + AC_SYS_LARGEFILE +dnl ------- +dnl Plugins +dnl ------- + +XINE_AUDIO_OUT_PLUGINS +XINE_VIDEO_OUT_PLUGINS + + + + + + @@ -781,57 +828,25 @@ AC_SYS_LARGEFILE -dnl --------------------------------------------- -dnl determine libdir name -dnl --------------------------------------------- -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]) -dnl --------------------------------------------- -dnl libxdg-basedir detection -dnl --------------------------------------------- -AC_ARG_WITH([external-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]) -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' -fi -AC_SUBST([XDG_BASEDIR_CFLAGS]) -AC_SUBST([XDG_BASEDIR_LIBS]) -AC_SUBST([XDG_BASEDIR_DEPS]) -AM_CONDITIONAL([EXTERNAL_LIBXDG_BASEDIR], [test "x$with_external_libxdg_basedir" = "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 mpeg2lib and ffmpeg stuff @@ -924,73 +939,6 @@ AM_CONDITIONAL(HAVE_MLIB, test "x$ac_have_mlib" = "xyes") AC_SUBST(MLIB_LIBS) AC_SUBST(MLIB_CFLAGS) - -XINE_X11_SUPPORT - - -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 for OpenGL & [GLut | GLU] -dnl --------------------------------------------- - -AM_PATH_OPENGL() - - -dnl --------------------------------------------- -dnl Check for platform which supports syncfb -dnl --------------------------------------------- - -AC_ARG_ENABLE([syncfb], - AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin])) - -case "$host_os" in - *linux*) ;; - *) - if test "x$enable_syncfb" = "xyes"; then - AC_MSG_ERROR([You cannot build SyncFB support on non-Linux systems.]) - 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 ---------------------------------------------- @@ -1007,310 +955,6 @@ fi AM_CONDITIONAL(HAVE_V4L, [test "x$have_v4l" = "xyes"]) -XINE_XV_SUPPORT - -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" ) - - -dnl --------------------------------------------- -dnl Checks for Xinerama extension -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") - - -dnl --------------------------------------------- -dnl Checks for Ascii-Art library -dnl --------------------------------------------- - -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 - -AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes") - -dnl --------------------------------------------- -dnl Checks for Color AsCii Art library -dnl --------------------------------------------- - -AC_ARG_WITH([caca], - AS_HELP_STRING([--without-caca], [Do not build CACA support])) - -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 -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 --------------------------------------------- - -MACOSX_VIDEO_SUPPORT - - -dnl --------------------------------------------- -dnl Check whether to build Mac OS X audio output driver -dnl --------------------------------------------- - -MACOSX_AUDIO_SUPPORT - - -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 - -AC_SUBST(DIRECTFB_CFLAGS) -AC_SUBST(DIRECTFB_LIBS) -AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" ) - - -dnl --------------------------------------------- -dnl check for SDL -dnl --------------------------------------------- - -AC_ARG_WITH([sdl], - AS_HELP_STRING([--without-sdl], [Build without SDL video output])) - -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 -fi - -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 - -AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"]) - -dnl --------------------------------------------- -dnl check for pulseaudio -dnl --------------------------------------------- - -AC_ARG_WITH([pulseaudio], - AS_HELP_STRING([--without-pulseaudio], [Do not build Pulseaudio support])) - -if test "x$with_pulseaudio" != "xno"; then - PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) -fi -AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"]) - -dnl --------------------------------------------- -dnl check for DirectX -dnl --------------------------------------------- - -AM_PATH_DIRECTX() - - -dnl --------------------------------------------- -dnl dxr3 / hollywood plus card -dnl --------------------------------------------- - -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" - -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" - ;; - 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 --------------------------------------------- @@ -1594,130 +1238,6 @@ 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 - #endif - #ifdef HAVE_MACHINE_SOUNDCARD_H - # include - #endif - #ifdef HAVE_SOUNDCARD_H - # include - #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 --------------------------------------------- @@ -1785,51 +1305,6 @@ fi AM_CONDITIONAL(HAVE_LIBSMBCLIENT, test "x$have_libsmbclient" = "xyes") -dnl --------------------------------------------- -dnl SUN style audio interface -dnl --------------------------------------------- - -AC_MSG_CHECKING(for Sun audio support) -have_sunaudio=no -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - 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]) -fi - - -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 --------------------------------------------- diff --git a/m4/Makefile.am b/m4/Makefile.am index 90067a942..0eea187f8 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -14,6 +14,7 @@ EXTRA_DIST = \ aa.m4 \ arts.m4 \ attributes.m4 \ + audio_out.m4 \ directx.m4 \ dl.m4 \ dvdnav.m4 \ @@ -29,8 +30,9 @@ EXTRA_DIST = \ pthreads.m4 \ symbol.m4 \ summary.m4 \ + vcd.m4 \ + video_out.m4 \ xine.m4 \ _xine.m4 \ x11.m4 \ - xv.m4 \ - vcd.m4 + xv.m4 diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 new file mode 100644 index 000000000..9d3909598 --- /dev/null +++ b/m4/audio_out.m4 @@ -0,0 +1,170 @@ +dnl ----------------- +dnl Audio out plugins +dnl ----------------- +AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ + +dnl CoreAudio for Mac OS X +MACOSX_AUDIO_SUPPORT + +dnl PulseAudio +AC_ARG_WITH([pulseaudio], + [AS_HELP_STRING([--without-pulseaudio], [Do not build Pulseaudio support])]) + +if test "x$with_pulseaudio" != "xno"; then + PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) +fi +AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"]) + +dnl OSS style audio interface +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 + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include + #endif + #ifdef HAVE_SOUNDCARD_H + # include + #endif + ]) + + AC_IOCTL_REQUEST +fi + +AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes") + +dnl Alsa support + +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 SUN style audio interface +dnl --------------------------------------------- + +AC_MSG_CHECKING(for Sun audio support) +have_sunaudio=no +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]], [[ + 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]) +fi + + +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 XINE_AUDIO_OUT_PLUGINS 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/video_out.m4 b/m4/video_out.m4 new file mode 100644 index 000000000..61364ca52 --- /dev/null +++ b/m4/video_out.m4 @@ -0,0 +1,318 @@ +dnl ----------------- +dnl Video out plugins +dnl ----------------- +AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ + +dnl --------------------------------------------- +dnl Check for OpenGL & [GLut | GLU] +dnl --------------------------------------------- + +AM_PATH_OPENGL() + + +dnl --------------------------------------------- +dnl Check for platform which supports syncfb +dnl --------------------------------------------- + +AC_ARG_ENABLE([syncfb], + AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin])) + +case "$host_os" in + *linux*) ;; + *) + if test "x$enable_syncfb" = "xyes"; then + AC_MSG_ERROR([You cannot build SyncFB support on non-Linux systems.]) + fi + enable_syncfb=no ;; +esac + +AM_CONDITIONAL(HAVE_SYNCFB, test "x$enable_syncfb" != "xno") + + +XINE_XV_SUPPORT + +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" ) + + +dnl --------------------------------------------- +dnl Checks for Xinerama extension +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") + + +dnl --------------------------------------------- +dnl Checks for Ascii-Art library +dnl --------------------------------------------- + +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 + +AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes") + +dnl --------------------------------------------- +dnl Checks for Color AsCii Art library +dnl --------------------------------------------- + +AC_ARG_WITH([caca], + AS_HELP_STRING([--without-caca], [Do not build CACA support])) + +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 +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 --------------------------------------------- + +MACOSX_VIDEO_SUPPORT + + + + +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 + +AC_SUBST(DIRECTFB_CFLAGS) +AC_SUBST(DIRECTFB_LIBS) +AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" ) + + +dnl --------------------------------------------- +dnl check for SDL +dnl --------------------------------------------- + +AC_ARG_WITH([sdl], + AS_HELP_STRING([--without-sdl], [Build without SDL video output])) + +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 +fi + +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 + +AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"]) + +dnl --------------------------------------------- +dnl check for DirectX +dnl --------------------------------------------- + +AM_PATH_DIRECTX() + + +dnl --------------------------------------------- +dnl dxr3 / hollywood plus card +dnl --------------------------------------------- + +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" + +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" + ;; + 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 XINE_VIDEO_OUT_PLUGINS diff --git a/src/input/Makefile.am b/src/input/Makefile.am index ce8c2fe33..e5b6926dc 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -104,7 +104,7 @@ xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) 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 = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) +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 @@ -112,7 +112,7 @@ xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) libreal/libreal.la lib 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 = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) +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) diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 774cc8705..8da0e1c84 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -16,7 +16,7 @@ xineplug_LTLIBRARIES = $(w32dll_codec) $(qt_codec) EXTRA_DIST = common.c xineplug_decode_w32dll_la_SOURCES = w32codec.c -xineplug_decode_w32dll_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) +xineplug_decode_w32dll_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) xineplug_decode_w32dll_la_DEPS = $(XDG_BASEDIR_DEPS) xineplug_decode_w32dll_la_LIBADD = \ $(top_builddir)/src/libw32dll/wine/libwine.la \ diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 1fd132dca..05f15f908 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -31,7 +31,7 @@ libwine_la_SOURCES = \ win32.c \ stubs.s \ wrapper.S -libwine_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) +libwine_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) noinst_HEADERS = \ avifmt.h \ diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index f64dacba1..e5a9a6cdd 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/misc/Makefile.common include $(top_srcdir)/lib/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(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 lib_LTLIBRARIES = libxine.la -- cgit v1.2.3 From aa57f140aa3cf28debfa82e2200198ecb6871cfa Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 16:49:28 -0400 Subject: Minor cleanups for X11 checks. Mostly comment what's going on. --- m4/x11.m4 | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/m4/x11.m4 b/m4/x11.m4 index d8a951b19..700624450 100644 --- a/m4/x11.m4 +++ b/m4/x11.m4 @@ -3,14 +3,20 @@ dnl Checks for X11 dnl --------------------------------------------- AC_DEFUN([XINE_X11_SUPPORT], [ + dnl This is more than a little bit weird, but ... AC_PATH_EXTRA has an + dnl AC_ARG_WITH in it for x, so it'll be processed by the time that we + dnl get here. Check the result of that to see if X support is enabled + dnl or disabled from the command-line. If it's enabled, do a package + dnl check for X libraries first. If that fails, do the normal autoconf + dnl AC_PATH_XTRA check and other stuff. if test "x$with_x" != "xno"; then - PKG_CHECK_MODULES([X], [x11 xext], , [ + 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/'` + if test x"$xv_path" = x""; then + xv_path="`echo $X_LIBS | sed -e 's/\-L\(.*\)/\1/'`" fi dnl ---------------------------------------------- @@ -20,10 +26,10 @@ AC_DEFUN([XINE_X11_SUPPORT], [ 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]) + AC_CHECK_HEADERS([X11/extensions/XShm.h], [], + [AC_MSG_ERROR([XShm extension is required])]) + AC_CHECK_LIB([Xext], [main], [], + [AC_MSG_ERROR([libXext is required])], [$X_LIBS]) CPPFLAGS="$ac_save_CPPFLAGS" X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext" fi @@ -33,10 +39,14 @@ AC_DEFUN([XINE_X11_SUPPORT], [ fi if test "x$no_x" != "xyes"; then - AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed]) + AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed]) fi - AM_CONDITIONAL(HAVE_X11, [test "x$no_x" != "xyes"]) + AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"]) + dnl TODO: Take X_CFLAGS and split it into X_CFLAGS and X_CPPFLAGS + dnl -D, -I, and -U should all be in X_CPPFLAGS. Anything else should + dnl be in X_CFLAGS. For now, just leave X_CFLAGS alone and treat it + dnl as CFLAGS. dnl --------------------------------------------- dnl Locate libraries needed for X health check -- cgit v1.2.3 From b85d32719d535166bfbb292037c061e1e0e398d3 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 19:25:39 -0400 Subject: Add AC_MSG_RESULT([no]) for test failures so lines don't bunch up --- m4/pkg.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 .])], - [$4]) + [AC_MSG_RESULT([no]) + $4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS -- cgit v1.2.3 From b6fcbcf5e60a24b5d0f6cbfa81bf99dbbe308a53 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 8 May 2007 19:26:14 -0400 Subject: Clean up audio out plugin tests --- configure.ac | 1 + m4/Makefile.am | 5 +- m4/audio_out.m4 | 379 ++++++++++++++++++++++++++++++++------------------------ m4/irixal.m4 | 19 --- m4/macosx.m4 | 7 -- 5 files changed, 217 insertions(+), 194 deletions(-) delete mode 100644 m4/irixal.m4 diff --git a/configure.ac b/configure.ac index 609ef16a8..e9c24ae5b 100644 --- a/configure.ac +++ b/configure.ac @@ -319,6 +319,7 @@ AM_CONDITIONAL([GENERATED_INTTYPES_H], [test "x$ac_cv_header_inttypes_h" != x"ye 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 +AC_IOCTL_REQUEST dnl --------------------- dnl checks for structures diff --git a/m4/Makefile.am b/m4/Makefile.am index 0eea187f8..d924ff80b 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -19,8 +19,7 @@ EXTRA_DIST = \ dl.m4 \ dvdnav.m4 \ gas.m4 \ - ioctl_request.m4 \ - irixal.m4 \ + ioctl_request.m4 \ libFLAC.m4 \ libfame.m4 \ macosx.m4 \ @@ -28,7 +27,7 @@ EXTRA_DIST = \ opengl.m4 \ pkg.m4 \ pthreads.m4 \ - symbol.m4 \ + symbol.m4 \ summary.m4 \ vcd.m4 \ video_out.m4 \ diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 9d3909598..e14e21c79 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -2,169 +2,218 @@ dnl ----------------- dnl Audio out plugins dnl ----------------- AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ - -dnl CoreAudio for Mac OS X -MACOSX_AUDIO_SUPPORT - -dnl PulseAudio -AC_ARG_WITH([pulseaudio], - [AS_HELP_STRING([--without-pulseaudio], [Do not build Pulseaudio support])]) - -if test "x$with_pulseaudio" != "xno"; then - PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) -fi -AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"]) - -dnl OSS style audio interface -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 - #endif - #ifdef HAVE_MACHINE_SOUNDCARD_H - # include - #endif - #ifdef HAVE_SOUNDCARD_H - # include - #endif - ]) - - AC_IOCTL_REQUEST -fi - -AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes") - -dnl Alsa support - -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 SUN style audio interface -dnl --------------------------------------------- - -AC_MSG_CHECKING(for Sun audio support) -have_sunaudio=no -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - 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]) -fi - - -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 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 $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]) + AC_SUBST([ALSA_LIBS]) + AC_SUBST([ALSA_CFLAGS]) + if test x"$have_alsa" = x"yes"; then + AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) + elif test x"$with_alsa" = x"yes"; then + AC_MSG_ERROR([ALSA support requested but not found.]) + fi + fi + AM_CONDITIONAL([HAVE_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 $default_with_arts = without && with_arts="no"]) + if test x"$with_arts" != x"no"; then + AM_PATH_ARTS([0.9.5], + [AC_DEFINE([HAVE_ARTS], 1, [Define this if you have aRts (libartsc) installed])]) + else + no_arts=yes + fi + AM_CONDITIONAL([HAVE_ARTS], [test x"$no_arts" != x"yes"]) + + + dnl CoreAudio for Mac OS X + dnl TODO: CoreAudio tests could be much better, but there's not really much need + AC_ARG_ENABLE([coreaudio], + [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], + [have_coreaudio="$enableval"], + [test $default_enable_coreaudio = enable && have_coreaudio="yes"]) + AM_CONDITIONAL([HAVE_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 $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"no"; then + AC_MSG_ERROR([EsounD support requested, but libesd not found]) + elif test x"$have_esound" = x"yes"; then + AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) + fi + AC_SUBST([ESD_CFLAGS]) + AC_SUBST([ESD_LIBS]) + fi + AM_CONDITIONAL([HAVE_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 $default_with_fusionsound = without && with_fusionsound="no"]) + if test x"$with_fusionsound" != x"no"; then + PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], + [AC_DEFINE([HAVE_FUSIONSOUND], 1, [Define to 1 if you have FusionSound.])], []) + AC_SUBST(FUSIONSOUND_CFLAGS) + AC_SUBST(FUSIONSOUND_LIBS) + else + no_fusionsound=yes + fi + AM_CONDITIONAL([HAVE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) + + + dnl IRIX style audio interface + AC_ARG_ENABLE([irixal], + [AS_HELP_STRING([--enable-irixal], [Enable support for IRIX libaudio])], + [], [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([HAVE_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 $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"no"; then + AC_MSG_ERROR([Jack support requested, but Jack not found]) + fi + fi + AM_CONDITIONAL([HAVE_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 $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_ossaudio=yes], [], + [#ifdef HAVE_SYS_SOUNDCARD_H + # include + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include + #endif + #ifdef HAVE_SOUNDCARD_H + # include + #endif + ]) + fi + AM_CONDITIONAL([HAVE_OSS], [test x"$have_ossaudio" = x"yes"]) + + + dnl PulseAudio + AC_ARG_WITH([pulseaudio], + [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio support])], + [], [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"]) + fi + AM_CONDITIONAL([HAVE_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 $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 + #include ]], + [[audio_info_t audio_info; AUDIO_INITINFO(&audio_info)]])], + [have_sunaudio=yes], [have_sunaudio=no]) + AC_MSG_RESULT([$have_sunaudio]) + if 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([HAVE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"]) ])dnl XINE_AUDIO_OUT_PLUGINS 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/macosx.m4 b/m4/macosx.m4 index 1c1becd2e..8fb72da8f 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -43,13 +43,6 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ AC_SUBST(UNIVERSAL_LDFLAGS) ])dnl MACOSX_UNIVERSAL_BINARIES -AC_DEFUN([MACOSX_AUDIO_SUPPORT], [ - AC_ARG_ENABLE([coreaudio], - AS_HELP_STRING([--enable-coreaudio], [enable support for Mac OS X CoreAudio output]), - [have_coreaudio="$enableval"], [have_coreaudio="no"]) - AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" = x"yes"]) -])dnl MACOSX_AUDIO_SUPPORT - AC_DEFUN([MACOSX_VIDEO_SUPPORT], [ AC_ARG_ENABLE([macosx-video], AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]), -- cgit v1.2.3 From 93195afdbb3667f1e9d28a00fa2e03e0ae40c13b Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Wed, 9 May 2007 13:35:19 -0400 Subject: Clean up video output plugin configure checks --- m4/_xine.m4 | 44 ---- m4/audio_out.m4 | 10 +- m4/macosx.m4 | 7 - m4/video_out.m4 | 570 ++++++++++++++++++++++------------------------ src/video_out/Makefile.am | 2 + 5 files changed, 272 insertions(+), 361 deletions(-) diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 005ae3138..7868c0591 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -44,50 +44,6 @@ AC_DEFUN([AC_C_ALWAYS_INLINE], fi ]) -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_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], diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index e14e21c79..e802c66a9 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -70,8 +70,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [], [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]) - AC_SUBST([ALSA_LIBS]) - AC_SUBST([ALSA_CFLAGS]) if test x"$have_alsa" = x"yes"; then AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) elif test x"$with_alsa" = x"yes"; then @@ -99,8 +97,8 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_ARG_ENABLE([coreaudio], [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], [have_coreaudio="$enableval"], - [test $default_enable_coreaudio = enable && have_coreaudio="yes"]) - AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" = x"yes"]) + [test $default_enable_coreaudio = disable && have_coreaudio="no"]) + AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) dnl EsounD support @@ -114,8 +112,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ elif test x"$have_esound" = x"yes"; then AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) fi - AC_SUBST([ESD_CFLAGS]) - AC_SUBST([ESD_LIBS]) fi AM_CONDITIONAL([HAVE_ESD], [test x"$have_esound" = x"yes"]) @@ -127,8 +123,6 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ if test x"$with_fusionsound" != x"no"; then PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], [AC_DEFINE([HAVE_FUSIONSOUND], 1, [Define to 1 if you have FusionSound.])], []) - AC_SUBST(FUSIONSOUND_CFLAGS) - AC_SUBST(FUSIONSOUND_LIBS) else no_fusionsound=yes fi diff --git a/m4/macosx.m4 b/m4/macosx.m4 index 8fb72da8f..2fafa695c 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -42,10 +42,3 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ AC_SUBST(UNIVERSAL_CFLAGS) AC_SUBST(UNIVERSAL_LDFLAGS) ])dnl MACOSX_UNIVERSAL_BINARIES - -AC_DEFUN([MACOSX_VIDEO_SUPPORT], [ - AC_ARG_ENABLE([macosx-video], - AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]), - [have_macosx_video="$enableval"], [have_macosx_video="no"]) - AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" = x"yes"]) -])dnl MACOSX_VIDEO_SUPPORT diff --git a/m4/video_out.m4 b/m4/video_out.m4 index 61364ca52..ea9933eb7 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -2,317 +2,283 @@ 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 - SyncFB is Linux only, but disabled by default + dnl - Vidix is FreeBSD and Linux only + + default_enable_aalib=enable + default_enable_dha_kmod=disable + default_enable_directfb=disable + default_enable_directx=disable + default_enable_dxr3=disable + default_enable_linuxfb=disable + default_enable_macosx_video=disable + default_enable_syncfb=disable + default_enable_xinerama=enable + default_enable_vidix=disable + + 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 --------------------------------------------- -dnl Check for OpenGL & [GLut | GLU] -dnl --------------------------------------------- - -AM_PATH_OPENGL() - - -dnl --------------------------------------------- -dnl Check for platform which supports syncfb -dnl --------------------------------------------- - -AC_ARG_ENABLE([syncfb], - AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin])) -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 Video output plugins that depend on X11 support + if test x$"no_x" != x"yes"; then + dnl Xinerama + AC_ARG_ENABLE([xinerama], + [AS_HELP_STRING([--enable-xinerama], [enable support for Xinerama])], + [], [test $default_enable_xinerama = disable && enable_xinerama=no]) + 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 + AM_CONDITIONAL([HAVE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) + + dnl OpenGL, including GLut and/or GLU + AM_PATH_OPENGL + + dnl xv + XINE_XV_SUPPORT fi - enable_syncfb=no ;; -esac - -AM_CONDITIONAL(HAVE_SYNCFB, test "x$enable_syncfb" != "xno") - - -XINE_XV_SUPPORT - -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" ) - - -dnl --------------------------------------------- -dnl Checks for Xinerama extension -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") - - -dnl --------------------------------------------- -dnl Checks for Ascii-Art library -dnl --------------------------------------------- - -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 - -AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes") - -dnl --------------------------------------------- -dnl Checks for Color AsCii Art library -dnl --------------------------------------------- - -AC_ARG_WITH([caca], - AS_HELP_STRING([--without-caca], [Do not build CACA support])) - -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 -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 --------------------------------------------- - -MACOSX_VIDEO_SUPPORT - - - - -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 - -AC_SUBST(DIRECTFB_CFLAGS) -AC_SUBST(DIRECTFB_LIBS) -AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" ) - - -dnl --------------------------------------------- -dnl check for SDL -dnl --------------------------------------------- - -AC_ARG_WITH([sdl], - AS_HELP_STRING([--without-sdl], [Build without SDL video output])) - -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 -fi - -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 - -AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"]) - -dnl --------------------------------------------- -dnl check for DirectX -dnl --------------------------------------------- + dnl Ascii-Art + AC_ARG_ENABLE([aalib], + [AS_HELP_STRING([--enable-aalib], [enable support for AALIB])], + [], [test $default_enable_aalib = disable && enable_aalib=no]) + if test x"$enable_aalib" != x"no"; then + AM_PATH_AALIB([1.4], [], [AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***])]) + else + no_aalib=yes + fi + AM_CONDITIONAL([HAVE_AA], [test x"$no_aalib" != x"yes"]) + + + dnl Color AsCii Art + AC_ARG_WITH([caca], + [AS_HELP_STRING([--without-caca], [Do not build CACA support])], + [], [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"no"; then + AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found]) + fi + fi + AM_CONDITIONAL([HAVE_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 $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"]) -AM_PATH_DIRECTX() + dnl DirectFB + AC_ARG_ENABLE([directfb], + [AS_HELP_STRING([--enable-directfb], [enable use of DirectFB])], + [], [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"]) + fi + AM_CONDITIONAL([HAVE_DIRECTFB], [test x"$have_directfb" = x"yes"]) + + + dnl DirectX + AM_PATH_DIRECTX + + + dnl dxr3 / hollywood plus card + AC_ARG_ENABLE([dxr3], + [AS_HELP_STRING([--enable-dxr3], [enable support for DXR3/HW+])], + [], [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)]) + AM_PATH_LIBFAME([0.8.10], + [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([HAVE_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 $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"no"; then + AC_MSG_ERROR([libstk support requested, but libstk not found]) + fi + fi + AM_CONDITIONAL([HAVE_STK], [test x"$have_libstk" = x"yes"]) -dnl --------------------------------------------- -dnl dxr3 / hollywood plus card -dnl --------------------------------------------- -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])) + dnl Linux framebuffer device + AC_ARG_ENABLE([fb], + [AS_HELP_STRING([--enable-fb], [enable Linux framebuffer support])], + [], [test $default_enable_linuxfb = disable && enable_linuxfb=no]) + if test x"$enable_linuxfb" != x"no"; then + AC_CHECK_HEADERS([linux/fb.h], + [AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support]) + have_fb=yes]) 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)]) + AM_CONDITIONAL([HAVE_FB], [test x"$have_fb" = x"yes"]) + + + dnl Mac OS X OpenGL video output + dnl TODO: test could be much better, but there's not really much need + AC_ARG_ENABLE([macosx-video], + [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])], + [have_macosx_video="$enableval"], + [test $default_enable_macosx_video = disable && have_macosx_video=no]) + AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) + + + dnl SDL + AC_ARG_WITH([sdl], + [AS_HELP_STRING([--without-sdl], [Build without SDL video output])], + [], [test $default_with_sdl = without && with_sdl=no]) + if test "x$with_sdl" != "xno"; then + PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no]) + if test x"$with_sdl" = x"yes" && test x"$have_sdl" = x"no"; then + AC_MSG_ERROR([SDL support requested, but SDL not found]) + elif test x"$have_sdl" = x"yes"; then + AC_DEFINE([HAVE_SDL], 1, [Define this if you have SDL installed]) + fi 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" - -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" - ;; - 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") - + AM_CONDITIONAL([HAVE_SDL], [test x"$have_sdl" = x"yes"]) + + + dnl Solaris framebuffer device support (exists for more than just Solaris) + AC_CHECK_HEADERS([sys/fbio.h], [ac_have_sunfb=yes], [ac_have_sunfb=no]) + if test x"$ac_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" + ac_have_sundga=yes])]) + CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" + AC_SUBST(SUNDGA_CPPFLAGS) + AC_SUBST(SUNDGA_LIBS) + fi + AM_CONDITIONAL([HAVE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) + AM_CONDITIONAL([HAVE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) + + + dnl syncfb (Linux only) + AC_ARG_ENABLE([syncfb], + [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])], + [], [test $default_enable_syncfb = disable && enable_syncfb=no]) + AM_CONDITIONAL([HAVE_SYNCFB], [test x"$enable_syncfb" != x"no"]) + + + dnl xcb + AC_ARG_WITH([xcb], + [AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins])], + [], [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$"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([HAVE_XCB], [test x"$have_xcb" = x"yes"]) + AM_CONDITIONAL([HAVE_XCBSHM], [test x"$have_xcbshm" = x"yes"]) + AM_CONDITIONAL([HAVE_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 $default_enable_vidix = disable && enable_vidix=no]) + if test x"$enable_vidix" != x"no"; then + if test x"$ac_cv_prog_AWK" = x"no"; then + enable_vidix=no + else + if test x"$no_x" = x"yes" -o x"$have_fb" != x"yes"; then + enable_vidix=no + else + case "$host_or_hostalias" in + i?86-*-linux* | k?-*-linux* | athlon-*-linux*) ;; + i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*) ;; + *) enable_vidix="no" ;; + esac + fi + fi + fi + AM_CONDITIONAL([HAVE_VIDIX], test x"$enable_vidix" != x"no") ])dnl XINE_VIDEO_OUT_PLUGINS diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index acab646c8..3e080f84e 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -141,10 +141,12 @@ xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) 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 = $(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 = $(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) \ -- cgit v1.2.3 From 88cb45ef27eb73eec0731074d59bf051b2b35f4c Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Wed, 9 May 2007 15:25:05 -0400 Subject: Clean up input plugin configuration checks -- Split input plugin checks out of configure.ac into m4/input.m4 -- Move m4/vcd.m4 (previously split out from configure.ac) into m4/input.m4 -- Fold m4/dl.m4 into configure.ac -- Various miscellaneous cleanups throughout configure.ac and m4/*.m4 --- configure.ac | 132 ++++------------------ m4/Makefile.am | 3 +- m4/_xine.m4 | 114 ++++++------------- m4/directx.m4 | 94 ++++++---------- m4/dl.m4 | 53 --------- m4/input.m4 | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/ioctl_request.m4 | 26 ++--- m4/macosx.m4 | 2 +- m4/vcd.m4 | 230 --------------------------------------- 9 files changed, 407 insertions(+), 555 deletions(-) delete mode 100644 m4/dl.m4 create mode 100644 m4/input.m4 delete mode 100644 m4/vcd.m4 diff --git a/configure.ac b/configure.ac index e9c24ae5b..3d02113ae 100644 --- a/configure.ac +++ b/configure.ac @@ -239,7 +239,19 @@ fi AM_GNU_GETTEXT([external]) AC_PROG_GMSGFMT_PLURAL -AM_DL() +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 + #include ]], [[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])]) @@ -272,6 +284,11 @@ AC_SUBST(RT_LIBS) 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) + AC_ARG_WITH([zlib-prefix], [AS_HELP_STRING([--with-zlib-prefix=PREFIX], [path to zlib compression library])], [if test x"$withval" != x"no"; then @@ -325,8 +342,6 @@ dnl --------------------- dnl checks for structures dnl --------------------- -AC_CHECK_IP_MREQN - dnl ----------------------------------- dnl checks for compiler characteristics @@ -812,10 +827,7 @@ dnl ------- XINE_AUDIO_OUT_PLUGINS XINE_VIDEO_OUT_PLUGINS - - - - +XINE_INPUT_PLUGINS @@ -839,15 +851,6 @@ XINE_VIDEO_OUT_PLUGINS - -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 mpeg2lib and ffmpeg stuff @@ -940,22 +943,6 @@ AM_CONDITIONAL(HAVE_MLIB, test "x$ac_have_mlib" = "xyes") AC_SUBST(MLIB_LIBS) AC_SUBST(MLIB_CFLAGS) -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 Ogg/Vorbis libs. dnl --------------------------------------------- @@ -1239,30 +1226,6 @@ AC_SUBST([FONTCONFIG_CFLAGS]) AC_SUBST([FONTCONFIG_LIBS]) -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 --------------------------------------------- @@ -1286,63 +1249,6 @@ else 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") - - -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"]) - -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 - -AM_CONDITIONAL(HAVE_DVDNAV, [test "x$no_dvdnav" != "xyes"]) - - -dnl --------------------------------------------- -dnl Video CD -dnl --------------------------------------------- - -VCD_SUPPORT - - dnl --------------------------------------------- dnl ASF build can be optional dnl --------------------------------------------- diff --git a/m4/Makefile.am b/m4/Makefile.am index d924ff80b..6fb4d6f80 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -16,9 +16,9 @@ EXTRA_DIST = \ attributes.m4 \ audio_out.m4 \ directx.m4 \ - dl.m4 \ dvdnav.m4 \ gas.m4 \ + input.m4 \ ioctl_request.m4 \ libFLAC.m4 \ libfame.m4 \ @@ -29,7 +29,6 @@ EXTRA_DIST = \ pthreads.m4 \ symbol.m4 \ summary.m4 \ - vcd.m4 \ video_out.m4 \ xine.m4 \ _xine.m4 \ diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 7868c0591..90a1699f1 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -3,8 +3,8 @@ dnl Define inline to something appropriate, including the new always_inline dnl attribute from gcc 3.1 dnl Thanks to Michel LESPINASSE dnl __inline__ "check" added by Darren Salt -AC_DEFUN([AC_C_ALWAYS_INLINE], - [AC_C_INLINE +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" @@ -44,6 +44,16 @@ AC_DEFUN([AC_C_ALWAYS_INLINE], fi ]) + +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], @@ -226,64 +236,7 @@ EOF #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 -#ifdef HAVE_SYS_CDIO_H -# include -#endif -#ifdef HAVE_LINUX_CDROM_H -# include -#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 @@ -411,30 +364,25 @@ _ACEOF 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 -#include - ]], [[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 -#include ]], [[ -int a=0; -getsockname(0,(struct sockaddr*)0, &a);]])], - [ac_cv_socklen_t=int],[ac_cv_socklen_t=size_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 + #include ]], + [[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 + #include ]], + [[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 - ]) - 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/directx.m4 b/m4/directx.m4 index 6d023528e..4aa13cbf3 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 - -#include -#include -#include - -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 + #include + #include + #include ]], + [[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([HAVE_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 -#include - -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/input.m4 b/m4/input.m4 new file mode 100644 index 000000000..31d22f128 --- /dev/null +++ b/m4/input.m4 @@ -0,0 +1,308 @@ +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 - v4l is Linux only + + default_enable_gnomevfs=enable + default_enable_samba=enable + default_enable_v4l=disable + default_enable_vcd=enable + + default_with_internal_vcdlibs=without + + case "$host_os" in + linux*) default_enable_v4l=enable ;; + esac + + + dnl gnome-vfs + AC_ARG_ENABLE([gnomevfs], + [AS_HELP_STRING([--disable-gnomevfs], [do not build gnome-vfs support])], + [], [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], [no_gnome_vfs=no], [no_gnome_vfs=yes]) + if test x"$no_gnome_vfs" != x"yes"; then + AC_DEFINE([HAVE_GNOME_VFS], 1, [Define this if you have gnome-vfs installed]) + fi + else + no_gnome_vfs=yes + fi + AM_CONDITIONAL([HAVE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) + + + dnl libsmbclient + AC_ARG_ENABLE([samba], + [AS_HELP_STRING([--disable-samba], [do not build Samba support])], + [], [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_libsmbclient=yes + LIBSMBCLIENT_LIBS="-lsmbclient"])]) + AC_SUBST(LIBSMBCLIENT_LIBS) + fi + AM_CONDITIONAL([HAVE_LIBSMBCLIENT], [test x"$have_libsmbclient" = x"yes"]) + + + dnl video-for-linux (v4l) + AC_ARG_ENABLE([v4l], + [AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugin])], + [], [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"no"; then + AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.]) + fi + fi + AM_CONDITIONAL([HAVE_V4L], [test x"$have_v4l" = x"yes"]) + + + 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 ]], + [[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 + AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h]) + AC_CACHE_CHECK([if cdrom ioctls are available], [am_cv_have_cdrom_ioctls], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[CDROM_DRIVE_STATUS]])], + [am_cv_have_cdrom_ioctls=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[CDIOCALLOW]])], + [am_cv_have_cdrom_ioctls=yes], + [AC_EGREP_CPP([we_have_cdrom_ioctls], + [#include + #ifdef HAVE_SYS_CDIO_H + # include + #endif + #ifdef HAVE_LINUX_CDROM_H + # include + #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" = x"yes"; then + AC_DEFINE([HAVE_CDROM_IOCTLS], 1, [Define this if you have CDROM ioctls]) + fi + AM_CONDITIONAL([HAVE_CDROM_IOCTLS], [test x"$have_cdrom_ioctls" = x"yes"]) + + + dnl dvdnav + dnl REVISIT: Something doesn't feel right about this ... I'm not sure it works as intended + 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]) + 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 + AM_CONDITIONAL([HAVE_DVDNAV], [test x"$no_dvdnav" != x"yes"]) + + + dnl Video CD + AC_ARG_ENABLE([vcd], + [AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin])], + [], [test $default_enable_vcd = disable && enable_vcd=no]) + if test x"$enable_vcd" != x"no"; then + AC_ARG_WITH([internal-vcdlibs], + [AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo])], + [], [test $default_with_internal_vcdlibs = without && with_internal_vcdlibs=no]) + 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_internval_vcdlibs=yes]) + PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [with_internval_vcdlibs=yes]) + if test x"$with_internval_vcdlibs" = x"yes"; then + AC_MSG_RESULT([Using included libcdio/libvcdinfo support]) + fi + fi + if test "x$with_internval_vcdlibs" = "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_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 ]) + + dnl empty_array_size + 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_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 + 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]) + + AC_CHECK_HEADERS([errno.h fcntl.h glob.h stdbool.h]) + if test x"$ac_cv_header_stdint_h" != x"yes"; then + AC_CHECK_SIZEOF([int], 4) + AC_CHECK_SIZEOF([long], 4) + AC_CHECK_SIZEOF([long long], 8) + fi + + 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 + + dnl REVISIT: CFLAGS stuff here is wrong; it should be CPPFLAGS + 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])]) + ;; + 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 + + 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"$with_internval_vcdlibs" = x"no"]) + AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" = x"yes"]) +]) + + + + + + + + + diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4 index c6d12258e..b90559592 100644 --- a/m4/ioctl_request.m4 +++ b/m4/ioctl_request.m4 @@ -34,19 +34,15 @@ 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 - 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_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 + 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/macosx.m4 b/m4/macosx.m4 index 2fafa695c..8a66c49b9 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -30,7 +30,7 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ 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]) + 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" diff --git a/m4/vcd.m4 b/m4/vcd.m4 deleted file mode 100644 index 917fc5128..000000000 --- a/m4/vcd.m4 +++ /dev/null @@ -1,230 +0,0 @@ -AC_DEFUN([VCD_SUPPORT], [ - AC_ARG_ENABLE(vcd, AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin]), - enable_vcd=$enableval, enable_vcd=yes) - -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 - - 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 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 - - 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 -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.) - ;; - 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 ]) - 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"]) -]) -- cgit v1.2.3 From 3c6845e7816dd7bfa0607cbb9243ef9e8f8da25a Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Wed, 9 May 2007 16:49:03 -0400 Subject: Move decoder/demuxer checks from configure.ac to decoders.m4 --- configure.ac | 633 ++++----------------------------------------------------- m4/Makefile.am | 1 + m4/decoders.m4 | 547 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 583 insertions(+), 598 deletions(-) create mode 100644 m4/decoders.m4 diff --git a/configure.ac b/configure.ac index 3d02113ae..ff9d9fdf4 100644 --- a/configure.ac +++ b/configure.ac @@ -828,569 +828,7 @@ dnl ------- XINE_AUDIO_OUT_PLUGINS XINE_VIDEO_OUT_PLUGINS XINE_INPUT_PLUGINS - - - - - - - - - - - - - - - - - - - - - - - - -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_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 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 - #endif - #ifdef HAVE_INTTYPES_H - # include - #endif - #ifdef HAVE_STDINT_H - # include - #endif - - #include -]) - 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 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 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 -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' -fi - -AC_SUBST(LIBDTS_LIBS) -AC_SUBST(LIBDTS_DEPS) -AC_SUBST(LIBDTS_CFLAGS) - -AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes") -AM_CONDITIONAL(EXTERNAL_LIBDTS, test "x$have_dts" = "xyes") - -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]) -fi - -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]) -fi - -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 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_or_hostalias 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 For these there are no replacements - AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) - - 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 - -AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) - -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_or_hostalias 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") +XINE_DECODER_PLUGINS dnl --------------------------------------------- @@ -1407,11 +845,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" @@ -1422,35 +860,35 @@ 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$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.]) + 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.]) + 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_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) @@ -1461,7 +899,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 @@ -1494,7 +932,7 @@ dnl ;; dnl esac dnl fi AC_SUBST(ACLOCAL_DIR) -AM_CONDITIONAL([INSTALL_M4],[test "x$ACLOCAL_DIR" != "x"]) +AM_CONDITIONAL([INSTALL_M4], [test x"$ACLOCAL_DIR" != x""]) dnl this is an internal function we should not use, but @@ -1502,7 +940,6 @@ 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 --------------------------------------------- dnl some include paths ( !!! DO NOT REMOVE !!! ) diff --git a/m4/Makefile.am b/m4/Makefile.am index 6fb4d6f80..02c1fa072 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ arts.m4 \ attributes.m4 \ audio_out.m4 \ + decoders.m4 \ directx.m4 \ dvdnav.m4 \ gas.m4 \ diff --git a/m4/decoders.m4 b/m4/decoders.m4 new file mode 100644 index 000000000..f5b8df489 --- /dev/null +++ b/m4/decoders.m4 @@ -0,0 +1,547 @@ +dnl --------------------------- +dnl Decoder and Demuxer Plugins +dnl --------------------------- +AC_DEFUN([XINE_DECODER_PLUGINS], [ + +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_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 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 + #endif + #ifdef HAVE_INTTYPES_H + # include + #endif + #ifdef HAVE_STDINT_H + # include + #endif + + #include +]) + 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 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 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 +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' +fi + +AC_SUBST(LIBDTS_LIBS) +AC_SUBST(LIBDTS_DEPS) +AC_SUBST(LIBDTS_CFLAGS) + +AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes") +AM_CONDITIONAL(EXTERNAL_LIBDTS, test "x$have_dts" = "xyes") + +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]) +fi + +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]) +fi + +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 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_or_hostalias 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 For these there are no replacements + AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) + + 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 + +AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) + +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_or_hostalias 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") +AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_gdkpixbuf" != "xyes"]) + +]) -- cgit v1.2.3 From a7262056033f55a17b80ed793044b04182d93180 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Wed, 9 May 2007 16:57:09 -0400 Subject: Move some more macros around into more approriately named places -- Create programs.m4 to hold program related checks -- Move the always inline check macro (currently dead) into attributes.m4 -- Rename the remainder of _xine.m4 to types.m4, because there's just type related checks left. --HG-- rename : m4/_xine.m4 => m4/types.m4 --- m4/Makefile.am | 3 +- m4/_xine.m4 | 388 ------------------------------------------------------- m4/attributes.m4 | 47 +++++++ m4/programs.m4 | 124 ++++++++++++++++++ m4/types.m4 | 215 ++++++++++++++++++++++++++++++ 5 files changed, 388 insertions(+), 389 deletions(-) delete mode 100644 m4/_xine.m4 create mode 100644 m4/programs.m4 create mode 100644 m4/types.m4 diff --git a/m4/Makefile.am b/m4/Makefile.am index 02c1fa072..dc73fee64 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -27,11 +27,12 @@ EXTRA_DIST = \ objc.m4 \ opengl.m4 \ pkg.m4 \ + programs.m4 \ pthreads.m4 \ symbol.m4 \ summary.m4 \ + types.m4 \ video_out.m4 \ xine.m4 \ - _xine.m4 \ x11.m4 \ xv.m4 diff --git a/m4/_xine.m4 b/m4/_xine.m4 deleted file mode 100644 index 90a1699f1..000000000 --- a/m4/_xine.m4 +++ /dev/null @@ -1,388 +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 -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 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 -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_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 -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 -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 - #include ]], - [[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 - #include ]], - [[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/attributes.m4 b/m4/attributes.m4 index f781429f7..1f4750a71 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -380,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 +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/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 +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 +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/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 +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 + #include ]], + [[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 + #include ]], + [[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 +]) -- cgit v1.2.3 From 02a74c36db24a8f9c43b4a123285c803f142e2e9 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Wed, 9 May 2007 22:17:44 -0400 Subject: Clean up decoder/demuxer configuration checks --- configure.ac | 44 ++- m4/decoders.m4 | 914 ++++++++++++++++++++++++--------------------------------- m4/input.m4 | 2 +- m4/summary.m4 | 6 +- 4 files changed, 430 insertions(+), 536 deletions(-) diff --git a/configure.ac b/configure.ac index ff9d9fdf4..5283b8e85 100644 --- a/configure.ac +++ b/configure.ac @@ -119,14 +119,6 @@ dnl -------------- dnl Build features dnl -------------- -AC_ARG_ENABLE([altivec], - [AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs])], - [], [enable_altivec="yes"]) - -AC_ARG_ENABLE([vis], - [AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs])], - [], [enable_vis="yes"]) - AC_ARG_ENABLE([ipv6], [AS_HELP_STRING([--enable-ipv6], [enable use of IPv6])], [if test x"$enableval" != x"no"; then @@ -308,6 +300,35 @@ test x"$have_zlib" != x"yes" && AC_MSG_ERROR(zlib needed) AC_SUBST(ZLIB_CPPFLAGS) AC_SUBST(ZLIB_LIBS) +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 +fi + +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 + dnl ----------------------- dnl checks for header files @@ -472,6 +493,10 @@ esac AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"]) +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" @@ -681,6 +706,9 @@ case "$host_or_hostalias" in ;; esac +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 diff --git a/m4/decoders.m4 b/m4/decoders.m4 index f5b8df489..577473432 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -3,33 +3,71 @@ dnl Decoder and Demuxer Plugins dnl --------------------------- AC_DEFUN([XINE_DECODER_PLUGINS], [ -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]) + dnl a52dec (optional; enabled by default; external version allowed) + AC_ARG_ENABLE([a52dec], + [AS_HELP_STRING([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)])], + [], [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"]) + if test x"$enable_a52dec" != x"no"; then + dnl REVISIT: --with-external-a52dec=PREFIX + if test x"$external_a52dec" != x"no"; then + AC_CHECK_LIB([a52], [a52_init], + [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], [have_a52=yes], [have_a52=no], + [#ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_INTTYPES_H + # include + #endif + #ifdef HAVE_STDINT_H + # include + #endif + #include ])], [have_a52=no], [-lm]) + if test x"$have_a52" = 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([A52], [test x"$enable_a52dec" != x"no"]) + AM_CONDITIONAL([EXTERNAL_A52DEC], [test x"$have_a52" = x"yes"]) + + + dnl ASF (optional; enabled by default) + AC_ARG_ENABLE([asf], + [AS_HELP_STRING([--disable-asf], [do not build ASF demuxer])], + [], [enable_asf=yes]) + AM_CONDITIONAL([BUILD_ASF], [test x"$enable_asf" != x"no"]) + + + dnl FAAD (optional; enabled by default) + AC_ARG_ENABLE([faad], + [AS_HELP_STRING([--disable-faad], [do not build FAAD decoder])], + [], [enable_faad=yes]) + AM_CONDITIONAL([BUILD_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]) + case x"$with_external_ffmpeg" in + x"yes") + PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0]) + ;; + x"soft") + PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], + [with_external_ffmpeg=yes], [with_external_ffmpeg=no]) + ;; + esac + if test "x$with_external_ffmpeg" = "xyes"; then + PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc]) + AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have ffmpeg library]) - AC_MSG_NOTICE([ + AC_MSG_NOTICE([ ********************************************************************* xine is configured with external ffmpeg. @@ -37,511 +75,339 @@ 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") - + else + AC_MSG_RESULT([using included ffmpeg]) + AC_ARG_ENABLE([ffmpeg_uncommon_codecs], + [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs])], + [], [enable_ffmpeg_uncommon_codecs=yes]) + AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"]) + AC_ARG_ENABLE([ffmpeg_popular_codecs], + [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs])], + [], [enable_ffmpeg_popular_codecs=yes]) + AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) + fi + AM_CONDITIONAL([HAVE_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) + + + dnl gdk-pixbuf (optional; enabled by default) + AC_ARG_ENABLE([gdkpixbuf], + [AS_HELP_STRING([--disable-gdkpixbuf], [do not build gdk-pixbuf support])], + [], [enable_gdkpixbuf=yes]) + if test x"$enable_gdkpixbuf" != x"no"; then + PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [no_gdkpixbuf=no], [no_gdkpixbuf=yes]) + if test x"$no_gdkpixbuf" != x"yes"; then + AC_DEFINE([HAVE_GDK_PIXBUF], 1, [Define this if you have gdk-pixbuf installed]) + fi + else + no_gdkpixbuf=yes + fi + AM_CONDITIONAL([HAVE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) + + + dnl ImageMagick (optional; enabled by default) + AC_ARG_WITH([imagemagick], + [AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder])], + [], [with_imagemagic=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 Wand not found]) + elif test x"$have_imagemagick" = x"yes"; then + AC_DEFINE([HAVE_WAND], 1, [Define this if you have ImageMagick installed]) + fi + fi + AM_CONDITIONAL([HAVE_WAND], [test x"$have_imagemagick" = x"yes"]) + + + dnl libdts (optional; enabled by default; external version allowed) + AC_ARG_ENABLE([dts], + [AS_HELP_STRING([--disable-dts], [Disable support for DTS decoding library (default: enabled)])], + [], [enable_dts=yes]) + AC_ARG_WITH([external-libdts], + [AS_HELP_STRING([--with-external-libdts], [use external libdts/libdca library (not recommended)])], + [], [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_dts=yes], [have_dts=no]) + if test x"$have_dts" = x"no"; then + AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***]) + fi + else + AC_MSG_RESULT([Using 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' + AC_SUBST(LIBDTS_CFLAGS) + AC_SUBST(LIBDTS_DEPS) + AC_SUBST(LIBDTS_LIBS) + fi + fi + AM_CONDITIONAL([DTS], [test x"$enable_dts" != x"no"]) + AM_CONDITIONAL([EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) + + + dnl libFLAC (optional; disabled by default) +dnl AC_ARG_WITH([libflac], +dnl [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer])], +dnl [], [enable_libflac=no]) +dnl if test x"$with_libflac" != x"no"; then +dnl AM_PATH_LIBFLAC([have_libflac=yes]) +dnl fi +dnl AM_CONDITIONAL([HAVE_LIBFLAC], [test x"$have_libflac" = x"yes"]) + + + dnl libmad (optional; enabled by default; external version allowed) + AC_ARG_ENABLE([mad], + [AS_HELP_STRING([--disable-mad], [Disable support for MAD decoding library (default: enabled)])], + [], [enable_mad=yes]) + AC_ARG_WITH([external-libmad], + [AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)])], + [], [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], [], [with_external_libmad=no])], [with_external_libmad=no]) + if test x$"with_external_libmad" = x"no"; then + AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***]) + fi + fi + if test x$"with_external_libmad" != x"no"; then + AC_MSG_RESULT([Using 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 + fi + AM_CONDITIONAL([MAD], [test x"$enable_mad" = x"yes"]) + AM_CONDITIONAL([EXTERNAL_LIBMAD], [test x"$have_mad" = x"yes"]) + + + dnl libmodplug (optional; enabled by default) + AC_ARG_ENABLE([modplug], + [AS_HELP_STRING([--enable-modplug], [Enable modplug support])], + [], [enable_modplug=yes]) + if test x"$enable_modplug" != x"no"; then + PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], + [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])], + [enable_modplug=no]) + fi + AM_CONDITIONAL([HAVE_MODPLUG], [test x"$have_modplug" = x"yes"]) + + + dnl libmpcdec (optional; enabled by default; external version allowed) + AC_ARG_ENABLE([musepack], + [AS_HELP_STRING([--disable-musepack], [Disable support for MusePack decoding (default: enabled)])], + [], [enable_musepack=yes]) + AC_ARG_WITH([external-libmpcdec], + [AS_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library])], + [], [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_mpcdec=yes])]) + if test x"$have_mpcdec" != x"yes"; 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_CFLAGS) + AC_SUBST(MPCDEC_DEPS) + AC_SUBST(MPCDEC_LIBS) + fi + AM_CONDITIONAL([MUSEPACK], [test x"$enable_musepack" != x"no"]) + AM_CONDITIONAL([EXTERNAL_MPCDEC], [test x"$have_mpcdec" = x"yes"]) + + + dnl libw32dll (optional; x86 only; enabled if using GNU as; GNU as required) + dnl REVISIT: fixup with_gnu_as stuff + AC_ARG_ENABLE([w32dll], + [AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support])], + [], [enable_w32dll="$with_gnu_as"]) + if test x"$enable_w32dll" != x"no"; then + case "$host_or_hostalias" in + *-mingw* | *-cygwin) + enable_w32dll=no + ;; + i?86-* | k?-* | athlon-* | pentium*-) + CC_PROG_AS + test x"$with_gnu_as" = x"no" && enable_w32dll=no + ;; + *) + enable_w32dll=no + ;; + esac + fi + if test x"$enable_w32dll" != x"no"; then + if test x"with_gnu_as" = x"no"; then + AC_MSG_ERROR([You need GNU as to enable Win32 codecs support]) + fi + AC_ARG_WITH([w32-path], + [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])], + [], [w32_path="/usr/lib/codecs"]) + AC_SUBST(w32_path) + fi + AM_CONDITIONAL([HAVE_W32DLL], [test x"$enable_w32dll" != x"no"]) + + + dnl mlib + AC_ARG_ENABLE([mlib], + [AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support])], + [], [enable_mlib=yes]) + AC_ARG_ENABLE([mlib-lazyload], + [AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])], + [], [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" + LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS $MLIB_CFLAGS" + AC_SUBST(LIBMPEG2_CFLAGS) + AC_SUBST(MLIB_LIBS) + AC_SUBST(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" = x"yes"]) -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"]) + dnl mng (optional; enabled by default) + AC_ARG_ENABLE([mng], + [AS_HELP_STRING([--disable-mng], [do not build mng support])], + [], [enable_mng=yes]) + if test x"$with_mng" != x"no"; then + AC_CHECK_LIB([mng], [mng_initialize], + [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=no])], [enable_mng=no]) + AC_SUBST(MNG_LIBS) + fi + AM_CONDITIONAL([HAVE_LIBMNG], [test x"$enable_mng" != x"no"]) + + + dnl Ogg/Speex (optional; enabled by default; external) + AC_ARG_WITH([speex], + [AS_HELP_STRING([--without-speex], [Build without Speex audio decoder])]) + 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"no"; 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([HAVE_SPEEX], [test x"$have_speex" = x"yes"]) + + + dnl Ogg/Theora (optional; enabled by default; external) + AC_ARG_WITH([theora], + [AS_HELP_STRING([--without-theora], [Build without Theora video decoder])]) + 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([HAVE_THEORA], [test x"$have_theora" = x"yes"]) -LIBMPEG2_CFLAGS="" -AC_ARG_ENABLE([mlib], - AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support])) + dnl Ogg/Vorbis (optional; enabled by default; external) + AC_ARG_WITH([vorbis], + [AS_HELP_STRING([--without-vorbis], [Build without Vorbis audio decoder])]) + 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]) + fi + fi + AM_CONDITIONAL([HAVE_VORBIS], [test x"$have_vorbis" = x"yes"]) + + + dnl real (optional; default depends on platform) + 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([--disable-real-codecs], [Disable Real binary codecs support])], + [], [case $host_os in + darwin*) enable_real_codecs=no ;; + *) enable_real_codes=yes ;; + esac]) + if test x"$enable_real_codecs" != x"no"; then + AC_ARG_WITH([real-codecs-path], + [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])], + [AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$withval"], [Specified path for Real binary codecs])]) + + 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" = "xyes"; then + CC_ATTRIBUTE_ALIAS([], [AC_MSG_ERROR([You need weak aliases support for Real codecs on your platform])]) + fi + fi + AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) -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" + dnl wavpack (optional; disabled by default) + AC_ARG_WITH([wavpack], + [AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)])], + [], [with_wavpack=no]) + if test x"$with_wavpack" != x"no"; then + PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes]) fi + AM_CONDITIONAL([HAVE_WAVPACK], [test x"$have_wavpack" = x"yes"]) - 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 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 - #endif - #ifdef HAVE_INTTYPES_H - # include - #endif - #ifdef HAVE_STDINT_H - # include - #endif - - #include -]) - 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 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 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 -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' -fi - -AC_SUBST(LIBDTS_LIBS) -AC_SUBST(LIBDTS_DEPS) -AC_SUBST(LIBDTS_CFLAGS) - -AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes") -AM_CONDITIONAL(EXTERNAL_LIBDTS, test "x$have_dts" = "xyes") - -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]) -fi - -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]) -fi - -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 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_or_hostalias 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 For these there are no replacements - AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) - - 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 - -AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) - -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_or_hostalias 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") -AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_gdkpixbuf" != "xyes"]) + 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"$no_gdkpixbuf" != x"yes"]) ]) diff --git a/m4/input.m4 b/m4/input.m4 index 31d22f128..9af69289d 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -107,7 +107,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ [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]) + AC_MSG_RESULT([Using included DVDNAV support]) fi AM_CONDITIONAL([HAVE_DVDNAV], [test x"$no_dvdnav" != x"yes"]) diff --git a/m4/summary.m4 b/m4/summary.m4 index 9bebcde27..a1a270f4b 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -67,7 +67,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ if test "x$have_vorbis" = "xyes"; then echo " - ogg" fi - if test "x$have_libmng" = "xyes"; then + if test "x$enable_mng" != x"no"; then echo " - mng" fi if test "x$enable_modplug" != x"no"; then @@ -162,8 +162,8 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ if test "x$enable_faad" = "xyes"; then echo " - faad" fi - if test "x$enable_libmad" = "xyes"; then - if test "x$have_mad" = "xyes"; then + if test "x$enable_mad" = "xyes"; then + if test "x$with_external_mad" != "xno"; then echo " - MAD (MPG 1/2/3) (external library)" else echo " - MAD (MPG 1/2/3) (internal library)" -- cgit v1.2.3 From 9621ee24fcaf6fa2c66eeca53eb00b4618e2ad61 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 14:11:01 -0400 Subject: Uncomment libFLAC tests accidentally left commented out --- m4/decoders.m4 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 577473432..5d2a3c37f 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -147,13 +147,13 @@ use internal ffmpeg. dnl libFLAC (optional; disabled by default) -dnl AC_ARG_WITH([libflac], -dnl [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer])], -dnl [], [enable_libflac=no]) -dnl if test x"$with_libflac" != x"no"; then -dnl AM_PATH_LIBFLAC([have_libflac=yes]) -dnl fi -dnl AM_CONDITIONAL([HAVE_LIBFLAC], [test x"$have_libflac" = x"yes"]) + AC_ARG_WITH([libflac], + [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer])], + [], [enable_libflac=no]) + if test x"$with_libflac" != x"no"; then + AM_PATH_LIBFLAC([have_libflac=yes]) + fi + AM_CONDITIONAL([HAVE_LIBFLAC], [test x"$have_libflac" = x"yes"]) dnl libmad (optional; enabled by default; external version allowed) -- cgit v1.2.3 From 68a59d5714f4cf1ac536d347c879995fb4685475 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 14:16:59 -0400 Subject: Remove -D_LARGEFILE64_SOURCE from AM_CPPFLAGS This is a transitional macro that's normally defined by the system includes if _GNU_SOURCE is defined, which it will be because of AC_GNU_SOURCE. It's only used by GNU libc. I cannot find anything in any of the code built by these Makefiles that uses any of the types, structures, or functions that defining this macro produces. --- src/input/Makefile.am | 1 - src/input/libdvdnav/Makefile.am | 2 +- src/input/libreal/Makefile.am | 2 +- src/input/librtsp/Makefile.am | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/input/Makefile.am b/src/input/Makefile.am index e5b6926dc..e4b46637e 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -3,7 +3,6 @@ include $(top_srcdir)/misc/Makefile.common # REVISIT: This second line here bothers me more than just a little bit AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) \ $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = input_dvd.c input_vcd.c input_gnome_vfs.c input_rtp.c diff --git a/src/input/libdvdnav/Makefile.am b/src/input/libdvdnav/Makefile.am index b7e313a38..f741b4f17 100644 --- a/src/input/libdvdnav/Makefile.am +++ b/src/input/libdvdnav/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -DDVDNAV_COMPILE -DHAVE_DLFCN_H +AM_CPPFLAGS = -DDVDNAV_COMPILE -DHAVE_DLFCN_H AM_LDFLAGS = $(xineplug_ldflags) noinst_LTLIBRARIES = libdvdnav.la diff --git a/src/input/libreal/Makefile.am b/src/input/libreal/Makefile.am index 500dfb910..5fb056195 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../librtsp +AM_CPPFLAGS = -I$(srcdir)/../librtsp noinst_LTLIBRARIES = libreal.la diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am index 9027ab260..0df52d3aa 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../libreal +AM_CPPFLAGS = -I$(srcdir)/../libreal AM_LDFLAGS = $(xineplug_ldflags) noinst_LTLIBRARIES = librtsp.la -- cgit v1.2.3 From 3d1f377ffb8343dea5311ff5f5cf9cd7908fb0df Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 14:18:52 -0400 Subject: Add large file macros to CPPFLAGS as required If AC_SYS_LARGEFILES defines _FILE_OFFSET_BITS=64 or _LARGEFILE_SOURCE, they'll only be in config.h. Add them to CPPFLAGS as well. If AC_FUNC_FSEEKO defines _LARGE_FILES, add it to CPPFLAGS as well. Do all of this for the benefit of those things that do not #include config.h --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 5283b8e85..db8ab01d2 100644 --- a/configure.ac +++ b/configure.ac @@ -846,8 +846,19 @@ dnl -------------------------- XINE_X11_SUPPORT +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"" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS" + dnl ------- dnl Plugins -- cgit v1.2.3 From 09004f653ee4f4c694260fe9792e9311a657f1ea Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 15:43:36 -0400 Subject: Change AUTOMAKE_OPTIONS to require automake 1.9 rather than 1.8 --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2b82d1bdc..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 -- cgit v1.2.3 From 8f4ef350573f8e01a1f1c4081809b6ee1c3403d1 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 15:46:32 -0400 Subject: Fix the $(XINE_LIB) build rule to build from top_builddir instead of building from top_srcdir. Also, use make -C instead of cd && make --- misc/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/Makefile.common b/misc/Makefile.common index 6df3b9228..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 -- cgit v1.2.3 From 722010dbea5887558dd7d954a19d918119e37b4f Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 10 May 2007 15:48:44 -0400 Subject: Rename PPC_ARCH to ARCH_PPC for consistency. Move the definition of it to a much more appropriate location. --- configure.ac | 10 +++++++++- m4/xv.m4 | 8 -------- src/post/goom/Makefile.am | 2 +- src/xine-utils/Makefile.am | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index db8ab01d2..0b8e042cd 100644 --- a/configure.ac +++ b/configure.ac @@ -599,10 +599,15 @@ case "$host_or_hostalias" in *-*-darwin*) case "$host_or_hostalias" in - i386-* | universal-* | x86_64-*) + universal-*) + arch_ppc=yes + arch_x86=yes + ;; + i386-* | x86_64-*) arch_x86=yes ;; ppc* | powerpc*) + arch_ppc=yes dnl avoid ppc compilation crash AS="$CC" @@ -627,6 +632,8 @@ case "$host_or_hostalias" in ;; ppc-*-linux* | powerpc-*) + arch_ppc=yes + dnl avoid ppc compilation crash AS="$CC" AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture]) @@ -763,6 +770,7 @@ if test x"$arch_x86" = x"yes"; 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") diff --git a/m4/xv.m4 b/m4/xv.m4 index 073f339fb..1c1e98be9 100644 --- a/m4/xv.m4 +++ b/m4/xv.m4 @@ -128,15 +128,7 @@ AC_DEFUN([XINE_XV_SUPPORT], [ XV_LIBS="libXv.so" fi ;; - - ppc-*-linux* | powerpc-*) - ppc_arch="yes" - ;; - - *) - ;; esac - AM_CONDITIONAL(PPC_ARCH, test "x$ppc_arch" = "xyes") dnl dnl Check if we can enable the xxmc plugin. diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index a8dc13ab0..eeed54697 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -17,7 +17,7 @@ EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_releas xinepost_LTLIBRARIES = xineplug_post_goom.la ## doesn't work -#if PPC_ARCH +#if ARCH_PPC #extra_files = ppc_drawings.s ppc_zoom_ultimate.s #AM_CPPFLAGS = -DCPU_POWERPC #endif diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 1e58d9fc1..484830cf9 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -1,18 +1,18 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -DXINE_LIBRARY_COMPILE + noinst_LTLIBRARIES = libxineutils.la EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl -if PPC_ARCH +if ARCH_PPC if !HOST_OS_DARWIN pppc_files = ppcasm_string.S endif endif -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS=-DXINE_LIBRARY_COMPILE - libxineutils_la_SOURCES = $(pppc_files) \ cpu_accel.c \ color.c \ -- cgit v1.2.3 From 00dccb98dfe1ff21e14275b09806cbe4d69a3273 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 11 May 2007 16:14:58 -0400 Subject: Cleanup, fix, and generally rework assembler configure checks --- configure.ac | 15 +++-- m4/decoders.m4 | 1 - m4/gas.m4 | 196 +++++++++++++++++++++++++++------------------------------ 3 files changed, 98 insertions(+), 114 deletions(-) diff --git a/configure.ac b/configure.ac index 0b8e042cd..7a40caab0 100644 --- a/configure.ac +++ b/configure.ac @@ -81,14 +81,11 @@ 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. -ASFLAGS="-g $ASFLAGS" CFLAGS="-g $CFLAGS" CPPFLAGS="-D_REENTRANT -DXINE_COMPILE $CPPFLAGS" LDFLAGS="-g $LDFLAGS" OBJCFLAGS="-g $OBJCFLAGS" -AC_SUBST(ASFLAGS) - dnl ------------------------------ dnl Build modes: debug and profile @@ -157,8 +154,12 @@ dnl checks for programs dnl ------------------- AC_PROG_CC +AC_GNU_SOURCE +AC_ISC_POSIX + AC_PROG_OBJC -AM_PROG_AS + +CC_PROG_AS AC_PROG_MAKE_SET AC_PROG_EGREP @@ -168,9 +169,6 @@ AC_PROG_AWK AC_CHECK_TOOL([STRINGS], [strings], [false]) -AC_GNU_SOURCE -AC_ISC_POSIX - PKG_PROG_PKG_CONFIG dnl Check for documentation formatting tools @@ -605,11 +603,13 @@ case "$host_or_hostalias" in ;; 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 @@ -639,7 +639,6 @@ case "$host_or_hostalias" in 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" diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 5d2a3c37f..dda82f2d9 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -262,7 +262,6 @@ use internal ffmpeg. enable_w32dll=no ;; i?86-* | k?-* | athlon-* | pentium*-) - CC_PROG_AS test x"$with_gnu_as" = x"no" && enable_w32dll=no ;; *) diff --git a/m4/gas.m4 b/m4/gas.m4 index 923c3f90c..248057abd 100644 --- a/m4/gas.m4 +++ b/m4/gas.m4 @@ -10,111 +10,97 @@ 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 @])], + [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. + if test -z "$AS"; 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 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_MSG_RESULT([$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/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_prog="$ac_dir/$ac_prog" + 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 &1 Date: Fri, 11 May 2007 18:24:25 -0400 Subject: Another pass at cleaning up Makefile.am files. More to come. --- configure.ac | 11 ----- m4/input.m4 | 1 - src/audio_out/Makefile.am | 41 +++++++++-------- src/combined/Makefile.am | 8 ++-- src/demuxers/Makefile.am | 31 +++++++------ src/dxr3/Makefile.am | 32 ++++++------- src/input/Makefile.am | 44 +++++++++--------- src/input/libreal/Makefile.am | 18 ++------ src/input/librtsp/Makefile.am | 15 ++---- src/input/vcd/Makefile.am | 19 +++----- src/input/vcd/libcdio/Makefile.am | 37 ++++++--------- src/input/vcd/libvcd/Makefile.am | 66 ++++++++++++--------------- src/post/Makefile.am | 3 +- src/post/audio/Makefile.am | 2 +- src/post/deinterlace/Makefile.am | 4 +- src/post/deinterlace/plugins/Makefile.am | 10 ++-- src/post/mosaico/Makefile.am | 2 +- src/post/planar/Makefile.am | 22 ++++----- src/post/visualizations/Makefile.am | 6 +-- src/video_out/Makefile.am | 34 ++++++++++---- src/video_out/libdha/Makefile.am | 22 +++++---- src/video_out/libdha/kernelhelper/Makefile.am | 43 ++++++++--------- src/video_out/macosx/Makefile.am | 17 ++----- src/video_out/vidix/Makefile.am | 17 +++---- src/video_out/vidix/drivers/Makefile.am | 48 +++++++++---------- src/xine-engine/Makefile.am | 41 ++++++++--------- src/xine-utils/Makefile.am | 35 +++++++------- 27 files changed, 286 insertions(+), 343 deletions(-) diff --git a/configure.ac b/configure.ac index 7a40caab0..70f4e6619 100644 --- a/configure.ac +++ b/configure.ac @@ -190,17 +190,6 @@ AC_PATH_MAGIC AC_PROG_LIBTOOL AC_PROG_LIBTOOL_SANITYCHECK -dnl REVISIT: -dnl Nothing seems to use LIBTOOL_DEPS -dnl src/video_out/libdha and src/video_out/vidix both use STATIC -- why? -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 checks for libraries diff --git a/m4/input.m4 b/m4/input.m4 index 9af69289d..d88676e8c 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -241,7 +241,6 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ fi fi - dnl REVISIT: CFLAGS stuff here is wrong; it should be CPPFLAGS 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' diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index d9b44557e..a9d88ad8e 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -1,8 +1,15 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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 @@ -50,23 +57,19 @@ if HAVE_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 @@ -98,8 +101,8 @@ xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) $(XINE_LIB) 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_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) xineplug_ao_out_coreaudio_la_SOURCES = audio_coreaudio_out.c xineplug_ao_out_coreaudio_la_LIBADD = $(XINE_LIB) @@ -110,7 +113,7 @@ xineplug_ao_out_pulseaudio_la_LIBADD = $(PULSEAUDIO_LIBS) $(XINE_LIB) 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_fusionsound_la_SOURCES = audio_fusionsound_out.c diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am index 64655c1eb..26277f99b 100644 --- a/src/combined/Makefile.am +++ b/src/combined/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if HAVE_WAVPACK @@ -14,10 +14,10 @@ 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 = $(AM_CFLAGS) $(WAVPACK_CFLAGS) -xineplug_wavpack_la_CPPFLAGS = -I$(srcdir)/../demuxers xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS) +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 = $(AM_CFLAGS) $(LIBFLAC_CFLAGS) xineplug_flac_la_LIBADD = $(XINE_LIB) $(LIBFLAC_LIBS) +xineplug_flac_la_CFLAGS = $(AM_CFLAGS) $(LIBFLAC_CFLAGS) diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 4722a982d..9d8fc5ff1 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -1,8 +1,17 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) +## +# 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 HAVE_VORBIS ogg_module = xineplug_dmx_ogg.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) @@ -126,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 836f57e6e..dc1f26743 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -1,36 +1,40 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(X_CFLAGS) $(LIBFAME_CFLAGS) -AM_LDFLAGS = $(xineplug_ldflags) +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 HAVE_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) if HAVE_DVDNAV -AM_CPPFLAGS = $(DVDNAV_CFLAGS) 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_vo_out_dxr3_la_SOURCES = \ @@ -40,9 +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 - -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 e4b46637e..b5aa3f902 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -1,25 +1,29 @@ include $(top_srcdir)/misc/Makefile.common # REVISIT: This second line here bothers me more than just a little bit -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) \ - $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) -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 - ## # IMPORTANT: # --------- # All of xine input plugins should be named like the scheme "xineplug_inp_" # -if HAVE_CDROM_IOCTLS +SUBDIRS = dvb libreal librtsp +if ENABLE_VCD +SUBDIRS += vcd +endif +if !HAVE_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_VCD in_vcd = xineplug_inp_vcdo.la endif @@ -36,19 +40,16 @@ if HAVE_LIBSMBCLIENT in_smb = xineplug_inp_smb.la endif -# For DVD -in_dvd = xineplug_inp_dvd.la if HAVE_DVDNAV -DVD_CFLAGS = $(DVDNAV_CFLAGS) +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 @@ -57,7 +58,7 @@ endif xineplug_LTLIBRARIES = \ xineplug_inp_file.la \ xineplug_inp_http.la \ - $(in_dvd) \ + xineplug_inp_dvd.la \ $(in_vcd) \ $(in_v4l) \ $(in_gnome_vfs) \ @@ -78,6 +79,7 @@ xineplug_inp_file_la_LIBADD = $(XINE_LIB) 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 = $(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) @@ -115,16 +117,14 @@ 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 = $(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_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_pvr_la_SOURCES = input_pvr.c xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) - -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/libreal/Makefile.am b/src/input/libreal/Makefile.am index 5fb056195..bd97a7548 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -1,18 +1,10 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -I$(srcdir)/../librtsp +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/input/librtsp -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 +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 0df52d3aa..68d554c2c 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -1,15 +1,10 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -I$(srcdir)/../libreal -AM_LDFLAGS = $(xineplug_ldflags) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/input/libreal -noinst_LTLIBRARIES = librtsp.la +noinst_HEADERS = rtsp.h rtsp_session.h -librtsp_la_SOURCES = \ - rtsp.c \ - rtsp_session.c +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 014d28679..28f6290fd 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -1,26 +1,21 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) AM_LDFLAGS = $(xineplug_ldflags) -SUBDIRS = libcdio libvcd - -vcd_SRCS = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c +SUBDIRS = +if !HAVE_VCDNAV +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 = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c -xineplug_inp_vcd_la_SOURCES = $(vcd_SRCS) 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 diff --git a/src/input/vcd/libcdio/Makefile.am b/src/input/vcd/libcdio/Makefile.am index 0c6b26dac..6414d8230 100644 --- a/src/input/vcd/libcdio/Makefile.am +++ b/src/input/vcd/libcdio/Makefile.am @@ -1,13 +1,24 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = cdio MSWindows image INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib -libcdio_SRCS = \ +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_la_SOURCES = \ _cdio_bsdi.c \ _cdio_generic.c \ _cdio_linux.c \ @@ -44,28 +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) -libiso9660_la_SOURCES = $(libiso9660_SRCS) -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 cba784d26..65ffc6255 100644 --- a/src/input/vcd/libvcd/Makefile.am +++ b/src/input/vcd/libvcd/Makefile.am @@ -1,13 +1,35 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) -AM_LDFLAGS = $(xineplug_ldflags) + +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/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 \ @@ -25,43 +47,11 @@ libvcd_SRCS = \ stream.c \ stream_stdio.c \ util.c +libvcd_la_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS) +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_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS) -libvcdinfo_la_SOURCES = $(libvcdinfo_SRCS) -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 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 3fae4f92c..7ede380da 100644 --- a/src/post/audio/Makefile.am +++ b/src/post/audio/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = dsp.h filter.h window.h audio_filters.h diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am index 4296b637c..ef030b22d 100644 --- a/src/post/deinterlace/Makefile.am +++ b/src/post/deinterlace/Makefile.am @@ -1,12 +1,10 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) SUBDIRS = plugins -EXTRA_DIST = - xinepost_LTLIBRARIES = xineplug_post_tvtime.la xineplug_post_tvtime_la_SOURCES = xine_plugin.c \ diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index 33cff9d7f..c04c3b7b2 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -28,10 +28,12 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ tomsmocomp/TomsMoCompAll2.inc tomsmocomp/WierdBob.inc \ tomsmocomp/tomsmocompmacros.h x86-64_macros.inc +noinst_HEADERS = plugins.h greedyhmacros.h + # libpostproc is here so we can use their nice mangle.h -AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CFLAGS = $(VISIBILITY_FLAG) AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \ - -I$(top_srcdir)/contrib/ffmpeg/libpostproc + -I$(top_srcdir)/contrib/ffmpeg/libpostproc # per-object CFLAGS -- drop optimization on kdetv_greedyh.c so that gcc # doesn't run out of general registers trying to compile it. @@ -53,6 +55,4 @@ libdeinterlaceplugins_la_SOURCES = \ kdetv_tomsmocomp.c libdeinterlaceplugins_la_LIBADD = libdeinterlacepluginsO1.la $(XINE_LIB) libdeinterlaceplugins_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_OCFLAGS) -libdeinterlaceplugins_la_LDFLAGS = $(xineplug_ldflags) - -noinst_HEADERS = plugins.h greedyhmacros.h +libdeinterlaceplugins_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am index 2fa3fc7a5..6f9cca937 100644 --- a/src/post/mosaico/Makefile.am +++ b/src/post/mosaico/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index a051ea14f..609fd7f0f 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -1,25 +1,26 @@ include $(top_srcdir)/misc/Makefile.common -POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la +# -fomit-frame-pointer is always needed. it might cause debug to not +# work, but at least it compiles. +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer +AM_CPPFLAGS = +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) if HAVE_FFMPEG postproc_lib = $(FFMPEG_POSTPROC_LIBS) 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/ -f makefile.xine libpostproc/libpostproc.a + $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a: $(MAKE) -C $(top_builddir)/contrib/ffmpeg/ -f makefile.xine libpostproc/libpostproc.a endif -# -fomit-frame-pointer is always needed. it might cause debug to not -# work, but at least it compiles. -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer -AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) - # 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'` @@ -30,6 +31,3 @@ 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) - -$(POSTPROC_INT_LIB): - cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index a02a74f77..bea89ac49 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -1,14 +1,14 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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 - -noinst_HEADERS = fft.h visualizations.h diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 3e080f84e..efea3f3b7 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -1,15 +1,30 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -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 HAVE_VIDIX +if !BUILD_DHA_KMOD +SUBDIRS += libdha +endif +SUBDIRS += vidix +endif + +if HAVE_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_CPPFLAGS = -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 @@ -152,7 +167,9 @@ 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 = $(AM_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing -xineplug_vo_out_vidix_la_CPPFLAGS = $(VIDIX_CPPFLAGS) +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) @@ -185,8 +202,8 @@ xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS) 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 = $(DIRECTX_CPPFLAGS) xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) +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) @@ -194,6 +211,3 @@ xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_vo_out_macosx_la_SOURCES = video_out_macosx.m xineplug_vo_out_macosx_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL - -noinst_HEADERS = deinterlace.h video_out_syncfb.h \ - yuv2rgb.h x11osd.h xcbosd.h diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am index 553907fc9..de63444c0 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 = $(DEFAULT_OCFLAGS) $(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 HAVE_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 d649dfe1d..ae6a5acc8 100644 --- a/src/video_out/macosx/Makefile.am +++ b/src/video_out/macosx/Makefile.am @@ -1,23 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +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 -libxineMacOSXVideo_la_LDFLAGS = -framework Cocoa -framework OpenGL \ +libxineMacOSXVideo_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL \ -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) - -xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h - -endif - diff --git a/src/video_out/vidix/Makefile.am b/src/video_out/vidix/Makefile.am index e002c56f0..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_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_builddir)/src/video_out/libdha +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 - diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am index 23272e4c9..1ad68da26 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -1,15 +1,17 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) +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) + -I$(top_srcdir)/src/video_out/libdha -I$(top_builddir)/src/video_out/libdha +AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = genfb_vid.c +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 + if HAVE_VIDIX -vidix_drivers = \ +vidix_LTLIBRARIES = \ mach64_vid.la \ mga_crtc2_vid.la \ mga_vid.la \ @@ -24,39 +26,33 @@ vidix_drivers = \ savage_vid.la endif -vidix_LTLIBRARIES = $(vidix_drivers) - -radeon_vid_la_SOURCES = radeon_vid.c -radeon_vid_la_LIBADD = -lm - -rage128_vid_la_SOURCES = radeon_vid.c -rage128_vid_la_LIBADD = -lm -rage128_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DRAGE128 - -pm2_vid_la_SOURCES = pm2_vid.c - -pm3_vid_la_SOURCES = pm3_vid.c +cyberblade_vid_la_SOURCES = cyberblade_vid.c mach64_vid_la_SOURCES = mach64_vid.c -mga_vid_la_SOURCES = mga_vid.c -mga_vid_la_LIBADD = -lm - mga_crtc2_vid_la_SOURCES = mga_vid.c mga_crtc2_vid_la_LIBADD = -lm mga_crtc2_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DCRTC2 -cyberblade_vid_la_SOURCES = cyberblade_vid.c - -unichrome_vid_la_SOURCES = unichrome_vid.c +mga_vid_la_SOURCES = mga_vid.c +mga_vid_la_LIBADD = -lm nvidia_vid_la_SOURCES = nvidia_vid.c -sis_vid_la_SOURCES = sis_vid.c sis_bridge.c +pm2_vid_la_SOURCES = pm2_vid.c + +pm3_vid_la_SOURCES = pm3_vid.c + +radeon_vid_la_SOURCES = radeon_vid.c +radeon_vid_la_LIBADD = -lm + +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_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 +unichrome_vid_la_SOURCES = unichrome_vid.c diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index e5a9a6cdd..8e4a9777a 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,17 +1,29 @@ include $(top_srcdir)/misc/Makefile.common include $(top_srcdir)/lib/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = $(XDG_BASEDIR_CPPFLAGS) $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE -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 \ @@ -20,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: @@ -49,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 484830cf9..a9c37465a 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -3,10 +3,25 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -DXINE_LIBRARY_COMPILE -noinst_LTLIBRARIES = libxineutils.la - EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl +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 @@ -31,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 - -- cgit v1.2.3 From 67b0ebb21185cb8ea2972dead6870bab8306724e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 11 May 2007 19:28:18 -0400 Subject: Another round of Makefile.am cleanups --- src/liba52/Makefile.am | 28 +++++----- src/libfaad/Makefile.am | 102 +++++++++++++++++------------------ src/libmad/Makefile.am | 57 +++++++++----------- src/libmpeg2/Makefile.am | 8 +-- src/libmpeg2new/Makefile.am | 8 ++- src/libmpeg2new/libmpeg2/Makefile.am | 3 +- src/libreal/Makefile.am | 6 +-- src/libspucc/Makefile.am | 8 +-- src/libspucmml/Makefile.am | 2 +- src/libspudec/Makefile.am | 29 ++++------ src/libspudvb/Makefile.am | 2 +- src/libsputext/Makefile.am | 2 +- src/libw32dll/DirectShow/Makefile.am | 33 ++++++------ src/libw32dll/Makefile.am | 32 ++++------- src/libw32dll/dmo/Makefile.am | 23 ++++---- src/libw32dll/wine/Makefile.am | 50 ++++++++--------- src/libxineadec/Makefile.am | 14 ++--- src/libxinevdec/Makefile.am | 8 +-- 18 files changed, 186 insertions(+), 229 deletions(-) diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 948a7ab28..9eec4f6d2 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -1,16 +1,22 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) +noinst_HEADERS = \ + a52.h \ + a52_internal.h \ + bitstream.h \ + tables.h \ + crc.c + if A52 -a52_module = xineplug_decode_a52.la +xineplug_LTLIBRARIES = xineplug_decode_a52.la endif -xineplug_LTLIBRARIES = $(a52_module) - if EXTERNAL_A52DEC internal_sources = +external_libs = -la52 else internal_sources = \ bitstream.c \ @@ -18,21 +24,11 @@ internal_sources = \ downmix.c \ imdct.c \ parse.c +external_libs = endif xineplug_decode_a52_la_SOURCES = \ xine_a52_decoder.c \ $(internal_sources) -if EXTERNAL_A52DEC -xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -la52 -lm -else -xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -lm -endif - -noinst_HEADERS = \ - a52.h \ - a52_internal.h \ - bitstream.h \ - tables.h \ - crc.c +xineplug_decode_a52_la_LIBADD = $(XINE_LIB) $(external_libs) -lm diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am index c02810f00..5f4be9cd4 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -1,61 +1,11 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) -SUBDIRS = codebook - -if BUILD_FAAD -faad_module = xineplug_decode_faad.la -endif - -xineplug_LTLIBRARIES = $(faad_module) - VPATH = @srcdir@:@srcdir@/codebook: -xineplug_decode_faad_la_CFLAGS = $(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_LIBADD = -lm $(XINE_LIB) +SUBDIRS = codebook noinst_HEADERS = \ analysis.h \ @@ -106,3 +56,51 @@ noinst_HEADERS = \ structs.h \ syntax.h \ tns.h + +if BUILD_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/libmad/Makefile.am b/src/libmad/Makefile.am index 7e8b617f4..b1e1f29f5 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -1,19 +1,36 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -DOPT_SPEED -AM_LDFLAGS = $(xineplug_ldflags) +AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = imdct_l_arm.S +noinst_HEADERS = \ + D.dat \ + imdct_s.dat \ + qc_table.dat \ + rq_table.dat \ + sf_table.dat \ + bit.h \ + fixed.h \ + frame.h \ + global.h \ + huffman.h \ + layer12.h \ + layer3.h \ + stream.h \ + synth.h \ + timer.h \ + version.h + if MAD -mad_module = xineplug_decode_mad.la +xineplug_LTLIBRARIES = xineplug_decode_mad.la endif -xineplug_LTLIBRARIES = $(mad_module) - if EXTERNAL_LIBMAD internal_sources = +external_libs = $(LIBMAD_LIBS) else internal_sources = \ bit.c \ @@ -26,33 +43,9 @@ internal_sources = \ synth.c \ timer.c \ version.c +external_libs = 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_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) - -noinst_HEADERS = \ - D.dat \ - imdct_s.dat \ - qc_table.dat \ - rq_table.dat \ - sf_table.dat \ - bit.h \ - fixed.h \ - frame.h \ - global.h \ - huffman.h \ - layer12.h \ - layer3.h \ - stream.h \ - synth.h \ - timer.h \ - version.h diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index 6b194ebbb..a970c6d24 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -1,8 +1,11 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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 = \ @@ -27,6 +30,3 @@ xineplug_decode_mpeg2_la_SOURCES = \ xineplug_decode_mpeg2_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) - -noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \ - libmpeg2_accel.h diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 8f8f1c940..4e9e6305b 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -1,14 +1,12 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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 = $(AM_CFLAGS) $(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_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) diff --git a/src/libmpeg2new/libmpeg2/Makefile.am b/src/libmpeg2new/libmpeg2/Makefile.am index 83ae1c32f..2caa3ddc2 100644 --- a/src/libmpeg2new/libmpeg2/Makefile.am +++ b/src/libmpeg2new/libmpeg2/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la @@ -12,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 28d85fe45..0f765394e 100644 --- a/src/libreal/Makefile.am +++ b/src/libreal/Makefile.am @@ -1,13 +1,13 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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) - -noinst_HEADERS = real_common.h diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am index c32e7a292..87266505c 100644 --- a/src/libspucc/Makefile.am +++ b/src/libspucc/Makefile.am @@ -1,12 +1,12 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +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 = $(AM_CFLAGS) -fno-strict-aliasing xineplug_decode_spucc_la_LIBADD = $(XINE_LIB) - -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 95b611008..fb92ff589 100644 --- a/src/libspucmml/Makefile.am +++ b/src/libspucmml/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) xineplug_LTLIBRARIES = xineplug_decode_spucmml.la diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am index d159728fc..13d5da6f5 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -1,28 +1,21 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav -AM_LDFLAGS = $(xineplug_ldflags) +AM_LDFLAGS = $(xineplug_ldflags) + +noinst_HEADERS = spu.h xineplug_LTLIBRARIES = xineplug_decode_spu.la if HAVE_DVDNAV - -xineplug_decode_spu_la_SOURCES = \ - spu.c \ - xine_spu_decoder.c -xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS) $(PTHREAD_LIBS) - +external_dvdnav_libs = $(DVDNAV_LIBS) +internal_dvdnav_sources = else - -xineplug_decode_spu_la_SOURCES = \ - nav_read.c \ - spu.c \ - xine_spu_decoder.c -xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) - +external_dvdnav_libs = +internal_dvdnav_sources = nav_read.c endif -xineplug_decode_spu_la_CFLAGS = $(AM_CFLAGS) $(DVDNAV_CFLAGS) - -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 f4248909f..f822df0d9 100644 --- a/src/libspudvb/Makefile.am +++ b/src/libspudvb/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) xineplug_LTLIBRARIES = xineplug_decode_spudvb.la diff --git a/src/libsputext/Makefile.am b/src/libsputext/Makefile.am index 71af2a1d3..f09219043 100644 --- a/src/libsputext/Makefile.am +++ b/src/libsputext/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) xineplug_LTLIBRARIES = xineplug_decode_sputext.la xineplug_dmx_sputext.la diff --git a/src/libw32dll/DirectShow/Makefile.am b/src/libw32dll/DirectShow/Makefile.am index a74c65815..414e6764f 100644 --- a/src/libw32dll/DirectShow/Makefile.am +++ b/src/libw32dll/DirectShow/Makefile.am @@ -1,16 +1,25 @@ 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 +noinst_HEADERS = \ + allocator.h \ + cmediasample.h \ + guids.h \ + inputpin.h \ + interfaces.h \ + iunk.h \ + outputpin.h \ + DS_AudioDecoder.h \ + DS_Filter.h \ + DS_VideoDecoder.h + if HAVE_W32DLL -ds_filter_lib = libds_filter.la +noinst_LTLIBRARIES = libds_filter.la endif -noinst_LTLIBRARIES = $(ds_filter_lib) - libds_filter_la_SOURCES = \ allocator.c \ cmediasample.c \ @@ -20,15 +29,3 @@ libds_filter_la_SOURCES = \ DS_Filter.c \ DS_AudioDecoder.c \ DS_VideoDecoder.c - -noinst_HEADERS = \ - allocator.h \ - cmediasample.h \ - guids.h \ - inputpin.h \ - interfaces.h \ - iunk.h \ - outputpin.h \ - DS_AudioDecoder.h \ - DS_Filter.h \ - DS_VideoDecoder.h diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 8da0e1c84..94dae4ab9 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,39 +1,29 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" -AM_LDFLAGS = $(xineplug_ldflags) +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 -endif +EXTRA_DIST = common.c -xineplug_LTLIBRARIES = $(w32dll_codec) $(qt_codec) +noinst_HEADERS = libwin32.h w32codec.h -EXTRA_DIST = common.c +if HAVE_W32DLL +xineplug_LTLIBRARIES = xineplug_decode_w32dll.la xineplug_decode_qt.la +endif xineplug_decode_w32dll_la_SOURCES = w32codec.c -xineplug_decode_w32dll_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) 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_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..663e179a9 100644 --- a/src/libw32dll/dmo/Makefile.am +++ b/src/libw32dll/dmo/Makefile.am @@ -1,27 +1,24 @@ 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_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS \ -I$(srcdir)/.. -I$(srcdir)/../wine + +noinst_HEADERS = \ + DMO_AudioDecoder.h \ + dmo_guids.h \ + dmo_interfaces.h \ + DMO_Filter.h \ + dmo.h \ + DMO_VideoDecoder.h if HAVE_W32DLL -dmo_filter_lib = libdmo_filter.la +noinst_LTLIBRARIES = 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 - -noinst_HEADERS = \ - DMO_AudioDecoder.h \ - dmo_guids.h \ - dmo_interfaces.h \ - DMO_Filter.h \ - dmo.h \ - DMO_VideoDecoder.h diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 05f15f908..b9a28a151 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,37 +1,13 @@ include $(top_srcdir)/misc/Makefile.common -EXTRA_DIST = stubs.s wrapper.S - -noinst_LTLIBRARIES = $(wine_lib) - # 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@ \ +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__ \ +AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -I$(srcdir)/.. -D__WINE__ \ -Ddbg_printf=__vprintf -DTRACE=__vprintf - -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_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) +EXTRA_DIST = stubs.s wrapper.S noinst_HEADERS = \ avifmt.h \ @@ -71,3 +47,23 @@ noinst_HEADERS = \ winuser.h \ wrapper.h +if HAVE_W32DLL +noinst_LTLIBRARIES = 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_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am index 0d209be43..e65024184 100644 --- a/src/libxineadec/Makefile.am +++ b/src/libxineadec/Makefile.am @@ -1,11 +1,11 @@ include $(top_srcdir)/misc/Makefile.common -EXTRA_DIST = fooaudio.c +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = gsm610 nosefart -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_LDFLAGS = $(xineplug_ldflags) +EXTRA_DIST = fooaudio.c if HAVE_VORBIS vorbis_module = xineplug_decode_vorbis.la @@ -42,9 +42,9 @@ xineplug_decode_gsm610_la_SOURCES = gsm610.c xineplug_decode_gsm610_la_LIBADD = $(XINE_LIB) gsm610/libgsm610.la xineplug_decode_nsf_la_SOURCES = nsf.c -xineplug_decode_nsf_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing -xineplug_decode_nsf_la_CPPFLAGS = -DNSF_PLAYER 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_LIBADD = $(XINE_LIB) @@ -58,11 +58,11 @@ xineplug_decode_speex_la_LIBADD = $(XINE_LIB) $(SPEEX_LIBS) xineplug_decode_speex_la_CFLAGS = $(AM_CFLAGS) $(SPEEX_CFLAGS) xineplug_decode_mpc_la_SOURCES = xine_musepack_decoder.c -xineplug_decode_mpc_la_CFLAGS = $(AM_CFLAGS) $(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 = $(AM_CFLAGS) $(LIBDTS_CFLAGS) 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/libxinevdec/Makefile.am b/src/libxinevdec/Makefile.am index 728991a96..2902d23b3 100644 --- a/src/libxinevdec/Makefile.am +++ b/src/libxinevdec/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = foovideo.c @@ -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) -- cgit v1.2.3 From aa6b402b7a240b6f55c063b021c5c211f46ec8bd Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 14:18:38 -0400 Subject: More configure/Makefile cleanups -- Make a pass at cleaning up contrib/ Makefile.am files -- Rename many AM_CONDITIONALS for consistency and give them better names to better indicate what they mean -- Remove some dead input plugin tests -- Clean up AM_PATH_DVDNAV --- contrib/Makefile.am | 2 +- contrib/libdca/Makefile.am | 15 +- contrib/libmpcdec/Makefile.am | 12 +- m4/audio_out.m4 | 20 +-- m4/decoders.m4 | 37 +++-- m4/directx.m4 | 2 +- m4/dvdnav.m4 | 262 ++++++++++++++++---------------- m4/input.m4 | 46 +----- m4/summary.m4 | 18 +-- m4/video_out.m4 | 32 ++-- src/audio_out/Makefile.am | 22 +-- src/combined/Makefile.am | 4 +- src/demuxers/Makefile.am | 4 +- src/dxr3/Makefile.am | 4 +- src/input/Makefile.am | 10 +- src/input/vcd/Makefile.am | 4 +- src/libffmpeg/Makefile.am | 33 ++-- src/libmad/Makefile.am | 4 +- src/libspudec/Makefile.am | 2 +- src/libw32dll/DirectShow/Makefile.am | 2 - src/libw32dll/Makefile.am | 7 +- src/libw32dll/dmo/Makefile.am | 2 - src/libw32dll/wine/Makefile.am | 2 - src/libxineadec/Makefile.am | 8 +- src/libxinevdec/Makefile.am | 6 +- src/post/planar/Makefile.am | 2 +- src/video_out/Makefile.am | 34 ++--- src/video_out/libdha/Makefile.am | 2 +- src/video_out/vidix/drivers/Makefile.am | 2 - 29 files changed, 280 insertions(+), 320 deletions(-) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 8433d4ce8..8ad34d968 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -7,7 +7,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ VISIBILITY_FLAG = @VISIBILITY_FLAG@ -if HAVE_DXR3 +if ENABLE_DXR3 dxr3encoder = --enable-encoder=mpeg1video endif diff --git a/contrib/libdca/Makefile.am b/contrib/libdca/Makefile.am index a118a9dc9..faab0dd14 100644 --- a/contrib/libdca/Makefile.am +++ b/contrib/libdca/Makefile.am @@ -1,17 +1,16 @@ -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 -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) - 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_CPPFLAGS = -I$(srcdir)/include 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 5751239bf..24e2c0157 100644 --- a/contrib/libmpcdec/Makefile.am +++ b/contrib/libmpcdec/Makefile.am @@ -1,15 +1,15 @@ -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 -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) - libmpcdec_la_SOURCES = huffsv46.c huffsv7.c idtag.c mpc_decoder.c mpc_reader.c \ requant.c streaminfo.c synth_filter.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 - -EXTRA_DIST = diff_from_libmpcdec_1.2.5.patch COPYING diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index e802c66a9..625124ac7 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -76,7 +76,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_MSG_ERROR([ALSA support requested but not found.]) fi fi - AM_CONDITIONAL([HAVE_ALSA], [test x"$have_alsa" = x"yes"]) + AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"]) dnl aRts support @@ -89,7 +89,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ else no_arts=yes fi - AM_CONDITIONAL([HAVE_ARTS], [test x"$no_arts" != x"yes"]) + AM_CONDITIONAL([ENABLE_ARTS], [test x"$no_arts" != x"yes"]) dnl CoreAudio for Mac OS X @@ -98,7 +98,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], [have_coreaudio="$enableval"], [test $default_enable_coreaudio = disable && have_coreaudio="no"]) - AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) + AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) dnl EsounD support @@ -113,7 +113,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) fi fi - AM_CONDITIONAL([HAVE_ESD], [test x"$have_esound" = x"yes"]) + AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"]) dnl FusionSound support @@ -126,7 +126,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ else no_fusionsound=yes fi - AM_CONDITIONAL([HAVE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) + AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) dnl IRIX style audio interface @@ -145,7 +145,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_SUBST(IRIXAL_STATIC_LIB) fi fi - AM_CONDITIONAL([HAVE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"]) + AM_CONDITIONAL([ENABLE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"]) dnl JACK support @@ -158,7 +158,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_MSG_ERROR([Jack support requested, but Jack not found]) fi fi - AM_CONDITIONAL([HAVE_JACK], [test x"$have_jack" = x"yes"]) + AM_CONDITIONAL([ENABLE_JACK], [test x"$have_jack" = x"yes"]) dnl OSS (Open Sound System) @@ -179,7 +179,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ #endif ]) fi - AM_CONDITIONAL([HAVE_OSS], [test x"$have_ossaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_OSS], [test x"$have_ossaudio" = x"yes"]) dnl PulseAudio @@ -189,7 +189,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ if test x"$with_pulseaudio" != x"no"; then PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) fi - AM_CONDITIONAL([HAVE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"]) dnl SUN style audio interface @@ -209,5 +209,5 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_CHECK_MEMBERS([audio_info_t.output_muted]) fi fi - AM_CONDITIONAL([HAVE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"]) + 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 index dda82f2d9..2b048c1dd 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -86,7 +86,7 @@ use internal ffmpeg. [], [enable_ffmpeg_popular_codecs=yes]) AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) fi - AM_CONDITIONAL([HAVE_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) dnl gdk-pixbuf (optional; enabled by default) @@ -101,7 +101,7 @@ use internal ffmpeg. else no_gdkpixbuf=yes fi - AM_CONDITIONAL([HAVE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) dnl ImageMagick (optional; enabled by default) @@ -116,7 +116,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_WAND], 1, [Define this if you have ImageMagick installed]) fi fi - AM_CONDITIONAL([HAVE_WAND], [test x"$have_imagemagick" = x"yes"]) + AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" != x"no"]) dnl libdts (optional; enabled by default; external version allowed) @@ -142,8 +142,8 @@ use internal ffmpeg. AC_SUBST(LIBDTS_LIBS) fi fi - AM_CONDITIONAL([DTS], [test x"$enable_dts" != x"no"]) - AM_CONDITIONAL([EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) + AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) dnl libFLAC (optional; disabled by default) @@ -153,7 +153,7 @@ use internal ffmpeg. if test x"$with_libflac" != x"no"; then AM_PATH_LIBFLAC([have_libflac=yes]) fi - AM_CONDITIONAL([HAVE_LIBFLAC], [test x"$have_libflac" = x"yes"]) + AM_CONDITIONAL([ENABLE_LIBFLAC], [test x"$have_libflac" = x"yes"]) dnl libmad (optional; enabled by default; external version allowed) @@ -205,8 +205,8 @@ use internal ffmpeg. esac fi fi - AM_CONDITIONAL([MAD], [test x"$enable_mad" = x"yes"]) - AM_CONDITIONAL([EXTERNAL_LIBMAD], [test x"$have_mad" = x"yes"]) + AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" = x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_mad" = x"yes"]) dnl libmodplug (optional; enabled by default) @@ -218,7 +218,7 @@ use internal ffmpeg. [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])], [enable_modplug=no]) fi - AM_CONDITIONAL([HAVE_MODPLUG], [test x"$have_modplug" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"]) dnl libmpcdec (optional; enabled by default; external version allowed) @@ -247,12 +247,11 @@ use internal ffmpeg. AC_SUBST(MPCDEC_DEPS) AC_SUBST(MPCDEC_LIBS) fi - AM_CONDITIONAL([MUSEPACK], [test x"$enable_musepack" != x"no"]) - AM_CONDITIONAL([EXTERNAL_MPCDEC], [test x"$have_mpcdec" = x"yes"]) + AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_mpcdec" = x"yes"]) dnl libw32dll (optional; x86 only; enabled if using GNU as; GNU as required) - dnl REVISIT: fixup with_gnu_as stuff AC_ARG_ENABLE([w32dll], [AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support])], [], [enable_w32dll="$with_gnu_as"]) @@ -278,7 +277,7 @@ use internal ffmpeg. [], [w32_path="/usr/lib/codecs"]) AC_SUBST(w32_path) fi - AM_CONDITIONAL([HAVE_W32DLL], [test x"$enable_w32dll" != x"no"]) + AM_CONDITIONAL([ENABLE_W32DLL], [test x"$enable_w32dll" != x"no"]) dnl mlib @@ -323,10 +322,10 @@ use internal ffmpeg. [], [enable_mng=yes]) if test x"$with_mng" != x"no"; then AC_CHECK_LIB([mng], [mng_initialize], - [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=no])], [enable_mng=no]) + [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=yes])], [enable_mng=no]) AC_SUBST(MNG_LIBS) fi - AM_CONDITIONAL([HAVE_LIBMNG], [test x"$enable_mng" != x"no"]) + AM_CONDITIONAL([ENABLE_MNG], [test x"$enable_mng" != x"no"]) dnl Ogg/Speex (optional; enabled by default; external) @@ -340,7 +339,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex]) fi fi - AM_CONDITIONAL([HAVE_SPEEX], [test x"$have_speex" = x"yes"]) + AM_CONDITIONAL([ENABLE_SPEEX], [test x"$have_speex" = x"yes"]) dnl Ogg/Theora (optional; enabled by default; external) @@ -354,7 +353,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_THEORA], 1, [Define this if you have theora]) fi fi - AM_CONDITIONAL([HAVE_THEORA], [test x"$have_theora" = x"yes"]) + AM_CONDITIONAL([ENABLE_THEORA], [test x"$have_theora" = x"yes"]) dnl Ogg/Vorbis (optional; enabled by default; external) @@ -366,7 +365,7 @@ use internal ffmpeg. AC_MSG_ERROR([Vorbis support requested, but libvorbis not found]) fi fi - AM_CONDITIONAL([HAVE_VORBIS], [test x"$have_vorbis" = x"yes"]) + AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"]) dnl real (optional; default depends on platform) @@ -404,7 +403,7 @@ use internal ffmpeg. if test x"$with_wavpack" != x"no"; then PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes]) fi - AM_CONDITIONAL([HAVE_WAVPACK], [test x"$have_wavpack" = x"yes"]) + AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"]) dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled diff --git a/m4/directx.m4 b/m4/directx.m4 index 4aa13cbf3..fc8e22e16 100644 --- a/m4/directx.m4 +++ b/m4/directx.m4 @@ -37,7 +37,7 @@ AC_DEFUN([AM_PATH_DIRECTX], [ AC_SUBST(DIRECTX_CPPFLAGS) AC_SUBST(DIRECTX_AUDIO_LIBS) AC_SUBST(DIRECTX_VIDEO_LIBS) - AM_CONDITIONAL([HAVE_DIRECTX], [test x"$have_directx" = x"yes"]) + AM_CONDITIONAL([ENABLE_DIRECTX], [test x"$have_directx" = x"yes"]) AC_MSG_RESULT([$have_directx]) if test x"$have_directx" = x"yes"; then diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 index 0f24080f7..72e1a577f 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -26,93 +26,96 @@ 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_DEFUN([AM_PATH_DVDNAV], [ + AC_ARG_WITH([dvdnav-prefix], + [AS_HELP_STRING([--with-dvdnav-prefix=PATH], [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=yes]) - AC_LANG_PUSH([C]) + 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 + 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}" != x"set"; 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}" != x"set"; 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 + min_dvdnav_version=ifelse([$1], , [0.0.0], [$1]) + if test x"$enable_dvdnavtest" = x"no"; then + AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) 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([[ + AC_PATH_TOOL([DVDNAV_CONFIG], [dvdnav-config], [no]) + AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) + + if test x"$DVDNAV_CONFIG" = x"no"; then + with_external_dvdnav=no + 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/'` + ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $DVDNAV_CFLAGS" + ac_save_LIBS="$LIBS" LIBS="$DVDNAV_LIBS $LIBS" + + # Now check if the installed DVDNAV is sufficiently new. (Also sanity + # checks the results of dvdnav-config to some extent + + rm -f conf.dvdnavtest + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include -int -main () +int main(int argc, char *argv[]) { - int major, minor, sub; - char *tmp_version; + int major, minor, sub; + char *tmp_version; + FILE *fp; - system ("touch conf.dvdnavtest"); + if ((fp = fopen("conf.dvdnavtest", "w")) != NULL) { + fclose(fp); + } + else { + printf("*** could not write to file conf.dvdnavtest\n"); + exit(1); + } + + /* 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); + } + free(tmp_version); - /* 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 { + 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; + } 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); + $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); + major, minor, sub); printf("*** libdvdnav is always available from:\n"); printf("*** http://dvd.sourceforge.net\n"); printf("***\n"); @@ -123,65 +126,64 @@ main () 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; + + return 1; } -]])],[],[no_dvdnav=yes],[no_dvdnav=cc]) - if test "x$no_dvdnav" = xcc; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes]) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi + ]])], [], [with_external_dvdnav=no], [with_external_dvdnav=cc]) + if test x"$no_dvdnav" = x"cc"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[return 0]])], + [], [with_external_dvdnav=no]) + 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]) + + if test x"$with_external_dvdnav" != x"no"; 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 -#include -]], [[ 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" + AC_MSG_RESULT([no]) + if test x"$enable_dvdnavtest" != x"no"; then + if test x"$DVDNAV_CONFIG" = x"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 + echo "*** Could not run DVDNAV test program, checking why..." + CFLAGS="$CFLAGS $DVDNAV_CFLAGS" + LIBS="$LIBS $DVDNAV_LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[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" + else + rm -f conf.dvdnavtest + fi + fi 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 + DVDNAV_CFLAGS="" + DVDNAV_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(DVDNAV_CFLAGS) + AC_SUBST(DVDNAV_LIBS) + AC_LANG_POP([C]) ]) diff --git a/m4/input.m4 b/m4/input.m4 index d88676e8c..0255f879e 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -32,7 +32,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ else no_gnome_vfs=yes fi - AM_CONDITIONAL([HAVE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) + AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) dnl libsmbclient @@ -45,7 +45,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ LIBSMBCLIENT_LIBS="-lsmbclient"])]) AC_SUBST(LIBSMBCLIENT_LIBS) fi - AM_CONDITIONAL([HAVE_LIBSMBCLIENT], [test x"$have_libsmbclient" = x"yes"]) + AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_libsmbclient" = x"yes"]) dnl video-for-linux (v4l) @@ -59,7 +59,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.]) fi fi - AM_CONDITIONAL([HAVE_V4L], [test x"$have_v4l" = x"yes"]) + AM_CONDITIONAL([ENABLE_V4L], [test x"$have_v4l" = x"yes"]) dnl cdrom ioctls (common for dvdnav and vcd) @@ -73,43 +73,20 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ ;; esac AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h]) - AC_CACHE_CHECK([if cdrom ioctls are available], [am_cv_have_cdrom_ioctls], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[CDROM_DRIVE_STATUS]])], - [am_cv_have_cdrom_ioctls=yes], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[CDIOCALLOW]])], - [am_cv_have_cdrom_ioctls=yes], - [AC_EGREP_CPP([we_have_cdrom_ioctls], - [#include - #ifdef HAVE_SYS_CDIO_H - # include - #endif - #ifdef HAVE_LINUX_CDROM_H - # include - #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" = x"yes"; then - AC_DEFINE([HAVE_CDROM_IOCTLS], 1, [Define this if you have CDROM ioctls]) - fi - AM_CONDITIONAL([HAVE_CDROM_IOCTLS], [test x"$have_cdrom_ioctls" = x"yes"]) dnl dvdnav - dnl REVISIT: Something doesn't feel right about this ... I'm not sure it works as intended 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]) - if test "x$external_dvdnav" = "xyes"; then + [], [with_external_dvdnav=no]) + if test x"$with_external_dvdnav" != x"no"; 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([Using included DVDNAV support]) fi - AM_CONDITIONAL([HAVE_DVDNAV], [test x"$no_dvdnav" != x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_DVDNAV], [test x"$with_external_dvdnav" != x"no"]) dnl Video CD @@ -293,15 +270,6 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ AC_SUBST(LIBVCD_CFLAGS) AC_SUBST(LIBVCD_LIBS) AC_SUBST(LIBVCDINFO_LIBS) - AM_CONDITIONAL([HAVE_VCDNAV], [test x"$with_internval_vcdlibs" = x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" != x"no"]) AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" = x"yes"]) ]) - - - - - - - - - diff --git a/m4/summary.m4 b/m4/summary.m4 index a1a270f4b..a93e3f79c 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -13,22 +13,20 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - http - mms" echo " - pnm - rtsp" echo " - dvb" - if test "x$external_dvdnav" = "xyes"; then + if test "x$with_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 + if test "x$enable_vcd" = "xyes"; then + if test "x$internal_vcdnav" = "xno"; then + echo " - vcd (external libs)" + else + echo " - vcd (internal libs)" fi - echo " - vcdo" - echo " - cdda" fi + echo " - vcdo" + echo " - cdda" if test "x$no_gnome_vfs" = "xno"; then echo " - gnome-vfs" fi diff --git a/m4/video_out.m4 b/m4/video_out.m4 index ea9933eb7..2e89d3588 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -69,7 +69,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else ac_have_xinerama=no fi - AM_CONDITIONAL([HAVE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) + AM_CONDITIONAL([ENABLE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) dnl OpenGL, including GLut and/or GLU AM_PATH_OPENGL @@ -88,7 +88,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else no_aalib=yes fi - AM_CONDITIONAL([HAVE_AA], [test x"$no_aalib" != x"yes"]) + AM_CONDITIONAL([ENABLE_AA], [test x"$no_aalib" != x"yes"]) dnl Color AsCii Art @@ -101,7 +101,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found]) fi fi - AM_CONDITIONAL([HAVE_CACA], [test x"$have_caca" = x"yes"]) + AM_CONDITIONAL([ENABLE_CACA], [test x"$have_caca" = x"yes"]) dnl dha (Linux only) @@ -128,7 +128,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ if test "x$enable_directfb" = "xyes"; then PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"]) fi - AM_CONDITIONAL([HAVE_DIRECTFB], [test x"$have_directfb" = x"yes"]) + AM_CONDITIONAL([ENABLE_DIRECTFB], [test x"$have_directfb" = x"yes"]) dnl DirectX @@ -165,7 +165,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else have_dxr3=no have_libfame=no have_librte=no have_encoder=no fi - AM_CONDITIONAL([HAVE_DXR3], [test x"$have_dxr3" = x"yes"]) + 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"]) @@ -180,7 +180,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_MSG_ERROR([libstk support requested, but libstk not found]) fi fi - AM_CONDITIONAL([HAVE_STK], [test x"$have_libstk" = x"yes"]) + AM_CONDITIONAL([ENABLE_STK], [test x"$have_libstk" = x"yes"]) dnl Linux framebuffer device @@ -192,7 +192,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ [AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support]) have_fb=yes]) fi - AM_CONDITIONAL([HAVE_FB], [test x"$have_fb" = x"yes"]) + AM_CONDITIONAL([ENABLE_FB], [test x"$have_fb" = x"yes"]) dnl Mac OS X OpenGL video output @@ -201,7 +201,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])], [have_macosx_video="$enableval"], [test $default_enable_macosx_video = disable && have_macosx_video=no]) - AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) + AM_CONDITIONAL([ENABLE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) dnl SDL @@ -216,7 +216,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_DEFINE([HAVE_SDL], 1, [Define this if you have SDL installed]) fi fi - AM_CONDITIONAL([HAVE_SDL], [test x"$have_sdl" = x"yes"]) + AM_CONDITIONAL([ENABLE_SDL], [test x"$have_sdl" = x"yes"]) dnl Solaris framebuffer device support (exists for more than just Solaris) @@ -233,15 +233,15 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_SUBST(SUNDGA_CPPFLAGS) AC_SUBST(SUNDGA_LIBS) fi - AM_CONDITIONAL([HAVE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) - AM_CONDITIONAL([HAVE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) dnl syncfb (Linux only) AC_ARG_ENABLE([syncfb], [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])], [], [test $default_enable_syncfb = disable && enable_syncfb=no]) - AM_CONDITIONAL([HAVE_SYNCFB], [test x"$enable_syncfb" != x"no"]) + AM_CONDITIONAL([ENABLE_SYNCFB], [test x"$enable_syncfb" != x"no"]) dnl xcb @@ -255,9 +255,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"]) fi fi - AM_CONDITIONAL([HAVE_XCB], [test x"$have_xcb" = x"yes"]) - AM_CONDITIONAL([HAVE_XCBSHM], [test x"$have_xcbshm" = x"yes"]) - AM_CONDITIONAL([HAVE_XCBXV], [test x"$have_xcbxv" = x"yes"]) + 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 @@ -280,5 +280,5 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ fi fi fi - AM_CONDITIONAL([HAVE_VIDIX], test x"$enable_vidix" != x"no") + AM_CONDITIONAL([ENABLE_VIDIX], test x"$enable_vidix" != x"no") ])dnl XINE_VIDEO_OUT_PLUGINS diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index a9d88ad8e..8759b123f 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -12,48 +12,48 @@ AM_LDFLAGS = $(xineplug_ldflags) 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 diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am index 26277f99b..ed513cd4d 100644 --- a/src/combined/Makefile.am +++ b/src/combined/Makefile.am @@ -3,11 +3,11 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) -if HAVE_WAVPACK +if ENABLE_WAVPACK xineplug_wavpack = xineplug_wavpack.la endif -if HAVE_LIBFLAC +if ENABLE_LIBFLAC xineplug_flac = xineplug_flac.la endif diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 9d8fc5ff1..0cfec1e89 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -12,7 +12,7 @@ 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 HAVE_VORBIS +if ENABLE_VORBIS ogg_module = xineplug_dmx_ogg.la endif @@ -20,7 +20,7 @@ if BUILD_ASF asf_module = xineplug_dmx_asf.la endif -if HAVE_LIBMNG +if ENABLE_MNG mng_module = xineplug_dmx_mng.la endif diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index dc1f26743..26743d43c 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -18,7 +18,7 @@ endif noinst_HEADERS = em8300.h dxr3.h dxr3_scr.h video_out_dxr3.h -if HAVE_DXR3 +if ENABLE_DXR3 xineplug_LTLIBRARIES = xineplug_decode_dxr3_video.la \ xineplug_decode_dxr3_spu.la \ xineplug_vo_out_dxr3.la @@ -27,7 +27,7 @@ endif xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB) -if HAVE_DVDNAV +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) diff --git a/src/input/Makefile.am b/src/input/Makefile.am index b5aa3f902..a5c98c85f 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -14,7 +14,7 @@ SUBDIRS = dvb libreal librtsp if ENABLE_VCD SUBDIRS += vcd endif -if !HAVE_DVDNAV +if !WITH_EXTERNAL_DVDNAV SUBDIRS += libdvdnav endif @@ -27,20 +27,20 @@ if ENABLE_VCD 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 -if HAVE_DVDNAV +if WITH_EXTERNAL_DVDNAV DVD_CFLAGS = $(DVDNAV_CFLAGS) link_dvdnav = $(DVDNAV_LIBS) else diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 28f6290fd..0ff664605 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -4,7 +4,7 @@ AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = -if !HAVE_VCDNAV +if !WITH_EXTERNAL_VCDLIBS SUBDIRS += libcdio libvcd endif @@ -14,7 +14,7 @@ xineplug_LTLIBRARIES = xineplug_inp_vcd.la xineplug_inp_vcd_la_SOURCES = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c -if HAVE_VCDNAV +if WITH_EXTERNAL_VCDLIBS xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS) else xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index b2571a4ea..ab866706c 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -1,21 +1,19 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) -AM_LDFLAGS = $(xineplug_ldflags) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = $(ZLIB_CPPFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) -if HAVE_FFMPEG -AM_CFLAGS += $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) +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 @@ -33,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 @@ -42,8 +40,9 @@ 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) +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 @@ -54,10 +53,10 @@ endif nodist_xineplug_decode_ff_la_SOURCES = ffmpeg_config.h -xineplug_decode_ff_la_LDFLAGS = $(AM_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_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 -xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c -xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index b1e1f29f5..482d68bb3 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -24,11 +24,11 @@ noinst_HEADERS = \ timer.h \ version.h -if MAD +if ENABLE_MAD xineplug_LTLIBRARIES = xineplug_decode_mad.la endif -if EXTERNAL_LIBMAD +if WITH_EXTERNAL_MAD internal_sources = external_libs = $(LIBMAD_LIBS) else diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am index 13d5da6f5..62de3774d 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -8,7 +8,7 @@ noinst_HEADERS = spu.h xineplug_LTLIBRARIES = xineplug_decode_spu.la -if HAVE_DVDNAV +if WITH_EXTERNAL_DVDNAV external_dvdnav_libs = $(DVDNAV_LIBS) internal_dvdnav_sources = else diff --git a/src/libw32dll/DirectShow/Makefile.am b/src/libw32dll/DirectShow/Makefile.am index 414e6764f..02eddc00a 100644 --- a/src/libw32dll/DirectShow/Makefile.am +++ b/src/libw32dll/DirectShow/Makefile.am @@ -16,9 +16,7 @@ noinst_HEADERS = \ DS_Filter.h \ DS_VideoDecoder.h -if HAVE_W32DLL noinst_LTLIBRARIES = libds_filter.la -endif libds_filter_la_SOURCES = \ allocator.c \ diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 94dae4ab9..7d11bb2dc 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -4,13 +4,16 @@ AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"$(w32_path)\" AM_LDFLAGS = $(xineplug_ldflags) -SUBDIRS = wine DirectShow dmo qtx +SUBDIRS = +if ENABLE_W32DLL +SUBDIRS += wine DirectShow dmo qtx +endif EXTRA_DIST = common.c noinst_HEADERS = libwin32.h w32codec.h -if HAVE_W32DLL +if ENABLE_W32DLL xineplug_LTLIBRARIES = xineplug_decode_w32dll.la xineplug_decode_qt.la endif diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am index 663e179a9..56bfc8f34 100644 --- a/src/libw32dll/dmo/Makefile.am +++ b/src/libw32dll/dmo/Makefile.am @@ -12,9 +12,7 @@ noinst_HEADERS = \ dmo.h \ DMO_VideoDecoder.h -if HAVE_W32DLL noinst_LTLIBRARIES = libdmo_filter.la -endif libdmo_filter_la_SOURCES = \ buffer.c \ diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index b9a28a151..1756e3262 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -47,9 +47,7 @@ noinst_HEADERS = \ winuser.h \ wrapper.h -if HAVE_W32DLL noinst_LTLIBRARIES = libwine.la -endif libwine_la_SOURCES = \ afl.c \ diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am index e65024184..474dda1a1 100644 --- a/src/libxineadec/Makefile.am +++ b/src/libxineadec/Makefile.am @@ -7,19 +7,19 @@ SUBDIRS = gsm610 nosefart 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 diff --git a/src/libxinevdec/Makefile.am b/src/libxinevdec/Makefile.am index 2902d23b3..28a926a79 100644 --- a/src/libxinevdec/Makefile.am +++ b/src/libxinevdec/Makefile.am @@ -5,15 +5,15 @@ 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 diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index 609fd7f0f..44f09c6b6 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-po AM_CPPFLAGS = AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) -if HAVE_FFMPEG +if WITH_EXTERNAL_FFMPEG postproc_lib = $(FFMPEG_POSTPROC_LIBS) ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) else diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index efea3f3b7..a37eae3eb 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -11,14 +11,14 @@ SUBDIRS += libdha endif # vidix depends on portions of dha -if HAVE_VIDIX +if ENABLE_VIDIX if !BUILD_DHA_KMOD SUBDIRS += libdha endif SUBDIRS += vidix endif -if HAVE_MACOSX_VIDEO +if ENABLE_MACOSX_VIDEO SUBDIRS += macosx endif @@ -41,63 +41,63 @@ endif if HAVE_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 diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am index de63444c0..05aebb704 100644 --- a/src/video_out/libdha/Makefile.am +++ b/src/video_out/libdha/Makefile.am @@ -15,7 +15,7 @@ CLEANFILES = $(awk_generated) noinst_HEADERS = AsmMacros.h libdha.h pci_ids.h pci_names.h pci_vendors.h -if HAVE_VIDIX +if ENABLE_VIDIX noinst_LTLIBRARIES = libdha.la endif diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am index 1ad68da26..db3adc078 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -10,7 +10,6 @@ EXTRA_DIST = genfb_vid.c 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 -if HAVE_VIDIX vidix_LTLIBRARIES = \ mach64_vid.la \ mga_crtc2_vid.la \ @@ -24,7 +23,6 @@ vidix_LTLIBRARIES = \ nvidia_vid.la \ sis_vid.la \ savage_vid.la -endif cyberblade_vid_la_SOURCES = cyberblade_vid.c -- cgit v1.2.3 From b6b1d1381f468c4f4d3d1db3f2071b073a049d37 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 16:15:40 -0400 Subject: Miscellaneous cleanups, revisit REVISIT tags --- configure.ac | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 70f4e6619..936b0ff68 100644 --- a/configure.ac +++ b/configure.ac @@ -323,9 +323,7 @@ dnl ----------------------- AC_HEADER_STDC -dnl REVISIT: should we not be using AC_FUNC_ALLOCA for this? AC_CHECK_HEADERS([alloca.h]) - AC_CHECK_HEADERS([assert.h byteswap.h dirent.h execinfo.h libgen.h malloc.h netdb.h ucontext.h]) AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h]) @@ -337,15 +335,14 @@ dnl ---------------- 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])) - +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 AC_IOCTL_REQUEST + dnl --------------------- dnl checks for structures dnl --------------------- @@ -361,10 +358,6 @@ if test x"$GCC" = x"yes"; then GCC_VERSION_MINOR="`echo "$GCC_VERSION" | cut -d '.' -f2`" GCC_VERSION_PATCHLEVEL="`echo "$GCC_VERSION" | cut -d '.' -f3`" fi -AC_SUBST(GCC_VERSION) -AC_SUBST(GCC_VERSION_MAJOR) -AC_SUBST(GCC_VERSION_MINOR) -AC_SUBST(GCC_VERSION_PATCHLEVEL) CC_CHECK_WERROR @@ -449,6 +442,7 @@ case "$host_or_hostalias" in 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 @@ -463,21 +457,20 @@ case "$host_or_hostalias" in esac if test "$WIN32_SYS" = "mingw32"; then - WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include' + WIN32_INCLUDES='-I$(top_srcdir)/win32/include' LIBS="-lwinmm -lwsock32 $LIBS" GOOM_LIBS="-liberty" AC_SUBST(GOOM_LIBS) - AC_SUBST(WIN32_CPPFLAGS) fi LDFLAGS="-no-undefined $LDFLAGS" ;; *) CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) - AC_SUBST([NOUNDEF]) ;; esac +AC_SUBST(NOUNDEF) AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"]) AC_ARG_ENABLE([altivec], @@ -980,7 +973,7 @@ 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' +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) -- cgit v1.2.3 From 75417b28a7b623141262a12e3a71c451d9b6c7cf Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 16:16:14 -0400 Subject: Minor fixes and cleanups --- m4/dvdnav.m4 | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 index 72e1a577f..d944a581c 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -74,7 +74,7 @@ AC_DEFUN([AM_PATH_DVDNAV], [ ac_save_LIBS="$LIBS" LIBS="$DVDNAV_LIBS $LIBS" # Now check if the installed DVDNAV is sufficiently new. (Also sanity - # checks the results of dvdnav-config to some extent + # checks the results of dvdnav-config to some extent) rm -f conf.dvdnavtest AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -98,8 +98,8 @@ int main(int argc, char *argv[]) } /* 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) { + tmp_version = strdup("$min_dvdnav_version"); + if (!tmp_version || sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) { printf("%s, bad version string\n", "$min_dvdnav_version"); exit(1); } @@ -130,10 +130,10 @@ int main(int argc, char *argv[]) return 1; } ]])], [], [with_external_dvdnav=no], [with_external_dvdnav=cc]) - if test x"$no_dvdnav" = x"cc"; then + if test x"$with_external_dvdnav" = x"cc"; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include ]], [[return 0]])], - [], [with_external_dvdnav=no]) + [with_external_dvdnav=yes], [with_external_dvdnav=no]) fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" @@ -155,9 +155,8 @@ int main(int argc, char *argv[]) if test ! -f conf.dvdnavtest ; then echo "*** Could not run DVDNAV test program, checking why..." CFLAGS="$CFLAGS $DVDNAV_CFLAGS" - LIBS="$LIBS $DVDNAV_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], [[return 0]])], + LIBS="$DVDNAV_LIBS $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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" @@ -172,8 +171,8 @@ int main(int argc, char *argv[]) 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" + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" else rm -f conf.dvdnavtest fi -- cgit v1.2.3 From 51e8dac9666d4f18a352ff61063464c02e7be6aa Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 16:16:48 -0400 Subject: Final pass over audio_out configure checks --- m4/arts.m4 | 272 ++++++++++++++++++++++++++------------------------------ m4/audio_out.m4 | 104 +++++++++++++--------- m4/summary.m4 | 44 +++------ 3 files changed, 200 insertions(+), 220 deletions(-) diff --git a/m4/arts.m4 b/m4/arts.m4 index 079c21ba8..ae34b5f04 100644 --- a/m4/arts.m4 +++ b/m4/arts.m4 @@ -1,168 +1,148 @@ -# Configure paths for ARTS -# Philip Stadermann 2001-06-21 -# stolen from esd.m4 +dnl Configure paths for ARTS +dnl Philip Stadermann 2001-06-21 +dnl 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) +AC_DEFUN([AM_PATH_ARTS], [ + 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=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_LANG_PUSH([C]) - 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` + if test x"$arts_prefix" != x""; then + arts_args="$arts_args --arts-prefix=$arts_prefix" + test x"${ARTS_CONFIG+set}" != x"set" && ARTS_CONFIG="$arts_prefix/bin/artsc-config" + fi - 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]) + min_arts_version=ifelse([$1], , [0.9.5], [$1]) + if test x"$enable_artstest" = x"no"; then + AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) + else + AC_PATH_TOOL([ARTS_CONFIG], [artsc-config], [no]) + AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) -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([[ + if test x"$ARTS_CONFIG" = x"no"; then + with_arts=no + 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/'` + ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ARTS_CFLAGS" + ac_save_LIBS="$LIBS" LIBS="$ARTS_LIBS $LIBS" + + # Now check if the installed ARTS is sufficiently new. (Also sanity + # checks the results of arts-config to some extent) + + rm -f conf.artstest + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include -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 main(int argc, char *argv[]) { - int major, minor, micro; - char *tmp_version; + int major, minor, micro; + char *tmp_version; + FILE *fp; - 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, µ) != 3) { - printf("%s, bad version string\n", "$min_arts_version"); - exit(1); - } + if ((fp = fopen("conf.artstest", "w")) != NULL) { + fclose(fp); + } + else { + printf("*** could not write to file conf.artstest\n"); + 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; + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = strdup("$min_arts_version"); + if (!tmp_version || sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_arts_version"); + exit(1); } - else + + 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))) { - 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; + return 0; } -} + 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"); -]])],[],[no_arts=yes],[no_arts=cc]) + return 1; +} + ]])], [], [with_arts=no], [with_arts=cc]) + if test x"$with_arts" = x"cc"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[return 0]])], + [with_arts=yes], [with_arts=no]) + fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi - if test "x$no_arts" = "xcc"; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -]], [[ 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 -#include -]], [[ 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 + if test x"$with_arts" != x"no"; then + AC_MSG_RESULT([yes]) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT([no]) + if test x"$enable_artstest" != x"no"; then + if test x"$ARTS_CONFIG" = x"no"; then + echo "*** The arts-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 arts-config." + else + if test ! -f conf.artstest ; then + echo "*** Could not run aRts test program, checking why..." + CFLAGS="$CFLAGS $ARTS_CFLAGS" + LIBS="$ARTS_LIBS $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[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 "***"], + [echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occurred. 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 arts-config script: $ARTS_CONFIG"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + else + rm -f conf.artstest + fi + fi + fi + ARTS_CFLAGS="" + ARTS_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(ARTS_CFLAGS) + AC_SUBST(ARTS_LIBS) + AC_LANG_POP([C]) ]) diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 625124ac7..8c2d63f86 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -67,13 +67,15 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl Alsa support AC_ARG_WITH([alsa], [AS_HELP_STRING([--with-alsa], [Build with ALSA audio output support])], - [], [test $default_with_alsa = without && with_alsa="no"]) + [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"$have_alsa" = x"yes"; then - AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) - elif test x"$with_alsa" = x"yes"; then + 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"]) @@ -82,35 +84,42 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl aRts support AC_ARG_WITH([arts], [AS_HELP_STRING([--with-arts], [Build with aRts audio output support])], - [], [test $default_with_arts = without && with_arts="no"]) + [test x"$withval" != x"no" && with_arts="yes"], + [test $default_with_arts = without && with_arts="no"]) if test x"$with_arts" != x"no"; then AM_PATH_ARTS([0.9.5], [AC_DEFINE([HAVE_ARTS], 1, [Define this if you have aRts (libartsc) installed])]) - else - no_arts=yes fi - AM_CONDITIONAL([ENABLE_ARTS], [test x"$no_arts" != x"yes"]) + AM_CONDITIONAL([ENABLE_ARTS], [test x"$with_arts" != x"no"]) dnl CoreAudio for Mac OS X - dnl TODO: CoreAudio tests could be much better, but there's not really much need AC_ARG_ENABLE([coreaudio], [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], - [have_coreaudio="$enableval"], - [test $default_enable_coreaudio = disable && have_coreaudio="no"]) - AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) + [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 $default_with_esound = without && with_esound="no"]) + [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"no"; then - AC_MSG_ERROR([EsounD support requested, but libesd not found]) - elif test x"$have_esound" = x"yes"; then - AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) + 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"]) @@ -119,20 +128,22 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl FusionSound support AC_ARG_WITH([fusionsound], [AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio output support])], - [], [test $default_with_fusionsound = without && with_fusionsound="no"]) + [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], - [AC_DEFINE([HAVE_FUSIONSOUND], 1, [Define to 1 if you have FusionSound.])], []) - else - no_fusionsound=yes + 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"$no_fusionsound" != x"yes"]) + 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 $default_enable_irixal = disable && enable_irixal="no"]) + [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], @@ -151,10 +162,11 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl JACK support AC_ARG_WITH([jack], [AS_HELP_STRING([--with-jack], [Build with Jack support])], - [], [test $default_with_jack = without && with_jack="no"]) + [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"no"; then + 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 @@ -164,20 +176,23 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl OSS (Open Sound System) AC_ARG_ENABLE([oss], [AS_HELP_STRING([--enable-oss], [Enable OSS (Open Sound System) support])], - [], [test $default_enable_oss = disable && enable_oss="no"]) + [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_ossaudio=yes], [], - [#ifdef HAVE_SYS_SOUNDCARD_H - # include - #endif - #ifdef HAVE_MACHINE_SOUNDCARD_H - # include - #endif - #ifdef HAVE_SOUNDCARD_H - # include - #endif - ]) + AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no], + [#ifdef HAVE_SYS_SOUNDCARD_H + # include + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include + #endif + #ifdef HAVE_SOUNDCARD_H + # include + #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_ossaudio" = x"yes"]) @@ -185,9 +200,13 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl PulseAudio AC_ARG_WITH([pulseaudio], [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio support])], - [], [test $default_with_pulseaudio = without && with_pulseaudio="no"]) + [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"]) @@ -195,7 +214,8 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl SUN style audio interface AC_ARG_ENABLE([sunaudio], [AS_HELP_STRING([--enable-sunaudio], [Enable Sun audio support])], - [], [test $default_enable_sunaudio = disable && enable_sunaudio="no"]) + [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 @@ -203,7 +223,9 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [[audio_info_t audio_info; AUDIO_INITINFO(&audio_info)]])], [have_sunaudio=yes], [have_sunaudio=no]) AC_MSG_RESULT([$have_sunaudio]) - if test x"$have_sunaudio" = x"yes"; then + 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]) diff --git a/m4/summary.m4 b/m4/summary.m4 index a93e3f79c..67a1522f4 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -322,39 +322,17 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ 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 + test x"$have_alsa" = x"yes" && echo " - alsa (ALSA - Advanced Linux Sound Architecture)" + test x"$with_arts" != x"no" && 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 "---" -- cgit v1.2.3 From 3146f2b79aacbfd102c6883ad15108350c18109a Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 17:24:32 -0400 Subject: Fix stupid typos: instances of $" should be "$ --- m4/audio_out.m4 | 2 +- m4/decoders.m4 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 8c2d63f86..0b54c5d51 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -104,7 +104,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ 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 + 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 diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 2b048c1dd..665e93a27 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -164,14 +164,14 @@ use internal ffmpeg. [AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)])], [], [with_external_libmad=no]) if test x"$enable_mad" != x"no"; then - if test x$"with_external_libmad" != x"no"; then + if test x"$with_external_libmad" != x"no"; then PKG_CHECK_MODULES([LIBMAD], [mad], [AC_CHECK_HEADERS([mad.h], [], [with_external_libmad=no])], [with_external_libmad=no]) - if test x$"with_external_libmad" = x"no"; then + if test x"$with_external_libmad" = x"no"; then AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***]) fi fi - if test x$"with_external_libmad" != x"no"; then + if test x"$with_external_libmad" != x"no"; then AC_MSG_RESULT([Using included libmad support]) case "$host_or_hostalias" in i?86-* | k?-* | athlon-* | pentium*-) @@ -287,7 +287,7 @@ use internal ffmpeg. AC_ARG_ENABLE([mlib-lazyload], [AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])], [], [enable_mlib_lazyload=no]) - if test x$"enable_mlib" != x"no"; then + 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], -- cgit v1.2.3 From 525df80285aa9896df58be826eff17016a0077ab Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 17:28:20 -0400 Subject: Style consistency fixes. No functional change. --- m4/directx.m4 | 4 ++-- m4/ioctl_request.m4 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/directx.m4 b/m4/directx.m4 index fc8e22e16..4417023ee 100644 --- a/m4/directx.m4 +++ b/m4/directx.m4 @@ -30,8 +30,8 @@ AC_DEFUN([AM_PATH_DIRECTX], [ #include ]], [[DirectDrawCreate(0, NULL, 0); DirectsoundCreate(0, NULL, 0)]])], [have_directx=yes], [have_directx=no]) - CPPFLAGS=$ac_save_CPPFLAGS - LIBS=$ac_save_LIBS + CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" AC_LANG_POP([C]) AC_SUBST(DIRECTX_CPPFLAGS) diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4 index b90559592..8ded72504 100644 --- a/m4/ioctl_request.m4 +++ b/m4/ioctl_request.m4 @@ -40,7 +40,7 @@ AC_DEFUN([AC_IOCTL_REQUEST], [ 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 + if test x"$ac_cv_ioctl_request" = x""; then AC_MSG_ERROR([Unable to determine the type for ioctl() request parameter]) fi ]) -- cgit v1.2.3 From 0b248a5bd28ead6740cdd78f5a4d7e84a9435516 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 17:29:17 -0400 Subject: Typo fixes: instances of $" should be "$ --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 936b0ff68..2a518aa81 100644 --- a/configure.ac +++ b/configure.ac @@ -557,7 +557,7 @@ case "$host_or_hostalias" in ;; esac if test "$GCC_VERSION_MAJOR" -ge 3; then - test x$"enable_vis" != x"no" && has_vis=yes + test x"$enable_vis" != x"no" && has_vis=yes fi else case "`uname -m`" in @@ -684,7 +684,7 @@ case "$host_or_hostalias" in fi ;; esac - test x$"archopt_val" != x"" && cpuflags="$cpuflags $sarchopt=$archopt_val" + test x"$archopt_val" != x"" && cpuflags="$cpuflags $sarchopt=$archopt_val" fi else # Intel optimizations -- cgit v1.2.3 From 88e4fa03427252304dbbae078ce394269bfc71e9 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 22:58:40 -0400 Subject: Fix the sense of a check for with_external_libmad --- m4/decoders.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 665e93a27..5e3ec7b48 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -171,7 +171,7 @@ use internal ffmpeg. AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***]) fi fi - if test x"$with_external_libmad" != x"no"; then + if test x"$with_external_libmad" = x"no"; then AC_MSG_RESULT([Using included libmad support]) case "$host_or_hostalias" in i?86-* | k?-* | athlon-* | pentium*-) -- cgit v1.2.3 From cf7fe6007ee6008037e63c8d9fc7ad9af8bc8d23 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 23:02:00 -0400 Subject: X11 and video output plugin configuration check cleanups -- Move x11.m4 back into configure.ac, because AC_PATH_XTRA was behaving oddly inside a macro. That code is now cleaned up enough so that it's not too painful having it there. -- Move opengl.m4 inline into video_out.m4 -- Fix x11 checks to work on Darwin, including XShm checks, Xv checks, OpenGL, and GLU checks. --- configure.ac | 49 +++++++++- m4/Makefile.am | 2 - m4/opengl.m4 | 74 --------------- m4/summary.m4 | 15 ++-- m4/video_out.m4 | 223 ++++++++++++++++++++++++++++++++-------------- m4/x11.m4 | 64 ------------- m4/xv.m4 | 167 ++++++++++------------------------ src/video_out/Makefile.am | 2 +- 8 files changed, 261 insertions(+), 335 deletions(-) delete mode 100644 m4/opengl.m4 delete mode 100644 m4/x11.m4 diff --git a/configure.ac b/configure.ac index 2a518aa81..78f857581 100644 --- a/configure.ac +++ b/configure.ac @@ -833,7 +833,54 @@ dnl -------------------------- dnl checks for system services dnl -------------------------- -XINE_X11_SUPPORT +if test x"$with_x" != x"no"; then + dnl Do a package check first, falling back to autoconf's built in checks if + dnl no package is found. + PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [ + 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 + + 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_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" + fi + ]) +fi + +dnl Check for XShm support (required for xine X support) +if test x"$no_x" != x"yes"; then + AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed]) + ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" + AC_CHECK_HEADERS([X11/extensions/XShm.h], [], + [AC_MSG_ERROR([XShm extension is required])], + [#include ]) + CPPFLAGS="$ac_save_CPPFLAGS" + AC_CHECK_LIB([Xext], [main], + [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([libXext is required])], + [$X_LIBS]) +fi +AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"]) + +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) diff --git a/m4/Makefile.am b/m4/Makefile.am index dc73fee64..1d10b94e4 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -25,7 +25,6 @@ EXTRA_DIST = \ libfame.m4 \ macosx.m4 \ objc.m4 \ - opengl.m4 \ pkg.m4 \ programs.m4 \ pthreads.m4 \ @@ -34,5 +33,4 @@ EXTRA_DIST = \ types.m4 \ video_out.m4 \ xine.m4 \ - x11.m4 \ xv.m4 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 -#include ]], [[ 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/summary.m4 b/m4/summary.m4 index 67a1522f4..66cc1c322 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -219,8 +219,8 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ 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 + dnl syncfb + if test "x$have_syncfb" = "xyes"; then echo " - SyncFB (for Matrox G200/G400 cards)" fi dnl Xv @@ -243,9 +243,12 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ 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" + if test x"$have_opengl" = "xyes"; then + if test x"$have_glu" = x"yes"; then + echo " - OpenGL (with GLU support)" + else + echo " - OpenGL" + fi fi if test "x$ac_have_sunfb" = "xyes"; then if test "x$ac_have_sundga" = "xyes"; then @@ -289,7 +292,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - dxr3 (Hollywood+ and Creative dxr3, mpeg video only)" fi fi - if test "x$enable_vidix" = "xyes"; then + if test "x$have_vidix" = "xyes"; then echo $ECHO_N " - vidix (" if test "x$no_x" != "xyes"; then diff --git a/m4/video_out.m4 b/m4/video_out.m4 index 2e89d3588..c767c9d39 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -18,8 +18,10 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ 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_xinerama=enable default_enable_vidix=disable @@ -51,42 +53,14 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ esac - dnl Video output plugins that depend on X11 support - if test x$"no_x" != x"yes"; then - dnl Xinerama - AC_ARG_ENABLE([xinerama], - [AS_HELP_STRING([--enable-xinerama], [enable support for Xinerama])], - [], [test $default_enable_xinerama = disable && enable_xinerama=no]) - 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 - AM_CONDITIONAL([ENABLE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) - - dnl OpenGL, including GLut and/or GLU - AM_PATH_OPENGL - - dnl xv - XINE_XV_SUPPORT - fi - - dnl Ascii-Art + dnl REVISIT: FIX AM_PATH_AALIB AC_ARG_ENABLE([aalib], [AS_HELP_STRING([--enable-aalib], [enable support for AALIB])], - [], [test $default_enable_aalib = disable && enable_aalib=no]) + [test x"$enableval" != x"no" && enable_aalib="yes"], + [test $default_enable_aalib = disable && enable_aalib="no"]) if test x"$enable_aalib" != x"no"; then AM_PATH_AALIB([1.4], [], [AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***])]) - else - no_aalib=yes fi AM_CONDITIONAL([ENABLE_AA], [test x"$no_aalib" != x"yes"]) @@ -94,10 +68,11 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Color AsCii Art AC_ARG_WITH([caca], [AS_HELP_STRING([--without-caca], [Do not build CACA support])], - [], [test $default_with_caca = without && with_caca=no]) + [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"no"; then + 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 @@ -107,7 +82,8 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl dha (Linux only) AC_ARG_ENABLE([dha-kmod], [AS_HELP_STRING([--enable-dha-kmod], [build Linux DHA kernel module])], - [], [test $default_enable_dha_kmod = disable && enable_dha_kmod=no]) + [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])], @@ -124,21 +100,26 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl DirectFB AC_ARG_ENABLE([directfb], [AS_HELP_STRING([--enable-directfb], [enable use of DirectFB])], - [], [test $default_enable_directfb = disable && enable_directfb=no]) + [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"]) + 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 + 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 $default_enable_dxr3 = disable && enable_dxr3=no]) + [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]) @@ -173,10 +154,11 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ 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 $default_with_libstk = without && with_libstk=no]) + [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"no"; then + 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 @@ -186,34 +168,103 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Linux framebuffer device AC_ARG_ENABLE([fb], [AS_HELP_STRING([--enable-fb], [enable Linux framebuffer support])], - [], [test $default_enable_linuxfb = disable && enable_linuxfb=no]) + [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], - [AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support]) - have_fb=yes]) + 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 - dnl TODO: test could be much better, but there's not really much need AC_ARG_ENABLE([macosx-video], [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])], - [have_macosx_video="$enableval"], - [test $default_enable_macosx_video = disable && have_macosx_video=no]) - AM_CONDITIONAL([ENABLE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) + [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 + #include ]], + [[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([--without-sdl], [Build without SDL video output])], - [], [test $default_with_sdl = without && with_sdl=no]) - if test "x$with_sdl" != "xno"; then + [test x"$withval" != x"no" && withval="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"no"; then + if test x"$with_sdl" = x"yes" && test x"$have_sdl" != x"yes"; then AC_MSG_ERROR([SDL support requested, but SDL not found]) - elif test x"$have_sdl" = x"yes"; then - AC_DEFINE([HAVE_SDL], 1, [Define this if you have SDL installed]) fi fi AM_CONDITIONAL([ENABLE_SDL], [test x"$have_sdl" = x"yes"]) @@ -240,19 +291,30 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl syncfb (Linux only) AC_ARG_ENABLE([syncfb], [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])], - [], [test $default_enable_syncfb = disable && enable_syncfb=no]) - AM_CONDITIONAL([ENABLE_SYNCFB], [test x"$enable_syncfb" != x"no"]) + [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([--without-xcb], [Doesn't build XCB video out plugins])], - [], [test $default_with_xcb = without && with_xcb=no]) + [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$"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"]) + 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"]) @@ -264,21 +326,52 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Requires X11 or Linux framebuffer AC_ARG_ENABLE([vidix], [AS_HELP_STRING([--enable-vidix], [enable support for Vidix])], - [], [test $default_enable_vidix = disable && enable_vidix=no]) + [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 - enable_vidix=no + have_vidix=no else if test x"$no_x" = x"yes" -o x"$have_fb" != x"yes"; then - enable_vidix=no + have_vidix=no else case "$host_or_hostalias" in i?86-*-linux* | k?-*-linux* | athlon-*-linux*) ;; i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd*) ;; - *) enable_vidix="no" ;; + *) 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"$enable_vidix" != x"no") + 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" && enableval="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 + XINE_XV_SUPPORT ])dnl XINE_VIDEO_OUT_PLUGINS diff --git a/m4/x11.m4 b/m4/x11.m4 deleted file mode 100644 index 700624450..000000000 --- a/m4/x11.m4 +++ /dev/null @@ -1,64 +0,0 @@ -dnl --------------------------------------------- -dnl Checks for X11 -dnl --------------------------------------------- - -AC_DEFUN([XINE_X11_SUPPORT], [ - dnl This is more than a little bit weird, but ... AC_PATH_EXTRA has an - dnl AC_ARG_WITH in it for x, so it'll be processed by the time that we - dnl get here. Check the result of that to see if X support is enabled - dnl or disabled from the command-line. If it's enabled, do a package - dnl check for X libraries first. If that fails, do the normal autoconf - dnl AC_PATH_XTRA check and other stuff. - 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], [], - [AC_MSG_ERROR([XShm extension is required])]) - AC_CHECK_LIB([Xext], [main], [], - [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" != x"yes"]) - - dnl TODO: Take X_CFLAGS and split it into X_CFLAGS and X_CPPFLAGS - dnl -D, -I, and -U should all be in X_CPPFLAGS. Anything else should - dnl be in X_CFLAGS. For now, just leave X_CFLAGS alone and treat it - dnl as CFLAGS. - - 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()]) -]) diff --git a/m4/xv.m4 b/m4/xv.m4 index 1c1e98be9..5780aeb1b 100644 --- a/m4/xv.m4 +++ b/m4/xv.m4 @@ -1,135 +1,58 @@ -# 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 -]) - -dnl ---------------------------------------------- -dnl Check for Xv and XvMC support -dnl ---------------------------------------------- - AC_DEFUN([XINE_XV_SUPPORT], [ 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_WITH([xv-path], + [AS_HELP_STRING([--with-xv-path=path], [where libXv is installed])]) 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" - 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") - - + [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*) - if test "x$ac_have_xv_static" = "xyes"; then - echo "warning: hppa linker - disabling static libXv" - XV_LIBS="libXv.so" + 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) xv_try_libs="$xv_try_path/$xv_lib" ;; + *.$acl_cv_shlibext) xv_try_libs="-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 dnl Check if we can enable the xxmc plugin. dnl diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index a37eae3eb..bb3552039 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -38,7 +38,7 @@ endif if HAVE_XXMC xxmc_module = xineplug_vo_out_xxmc.la endif -if HAVE_OPENGL +if ENABLE_OPENGL opengl_module = xineplug_vo_out_opengl.la endif if ENABLE_SYNCFB -- cgit v1.2.3 From c1481489a453faec6d08a58416edce6ec0cf06da Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 23:09:25 -0400 Subject: Fix X checks to do AC_PATH_XTRA before PKG_CHECK_MODULES It seems that even embedded in a shell if-statement, AC_PATH_XTRA still runs before PKG_CHECK_MODULES, even if PKG_CHECK_MODULES comes first. There's something funky going on inside autoconf wrt AC_PATH_XTRA. I know that the intended behavior is to do the PKG_CHECK_MODULES first, but no matter what I do, it never actually works that way. I give up, and so here's the code written to reflect what _actually_ happens in that order that it happens. --- configure.ac | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 78f857581..156b1c741 100644 --- a/configure.ac +++ b/configure.ac @@ -833,28 +833,24 @@ dnl -------------------------- dnl checks for system services dnl -------------------------- -if test x"$with_x" != x"no"; then - dnl Do a package check first, falling back to autoconf's built in checks if - dnl no package is found. - PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [ - 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 +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 - 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_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" - fi - ]) +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_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_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) -- cgit v1.2.3 From 16252a6078a01d224ffd4014e9d8ebc580fa2b6d Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sun, 13 May 2007 11:32:16 -0400 Subject: Clean up xxmc/xvmc configure checks, move xv.m4 into video_out.m4 --- m4/Makefile.am | 3 +- m4/summary.m4 | 14 ++-- m4/video_out.m4 | 158 +++++++++++++++++++++++++++++++++--- m4/xv.m4 | 199 ---------------------------------------------- src/video_out/Makefile.am | 4 +- 5 files changed, 159 insertions(+), 219 deletions(-) delete mode 100644 m4/xv.m4 diff --git a/m4/Makefile.am b/m4/Makefile.am index 1d10b94e4..546c989fd 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -32,5 +32,4 @@ EXTRA_DIST = \ summary.m4 \ types.m4 \ video_out.m4 \ - xine.m4 \ - xv.m4 + xine.m4 diff --git a/m4/summary.m4 b/m4/summary.m4 index 66cc1c322..71c556c98 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -224,23 +224,23 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ 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 + if test "x$have_xv" = "xyes"; then + if test "x$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 + if test "x$have_xxmc" = "xyes"; then + if test "x$have_vldexts" = "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 + if test "x$have_xvmc" = "xyes"; then echo " - XvMC (XVideo motion compensation)" fi if test x"$have_opengl" = "xyes"; then @@ -250,8 +250,8 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - OpenGL" fi fi - if test "x$ac_have_sunfb" = "xyes"; then - if test "x$ac_have_sundga" = "xyes"; then + if test "x$have_sunfb" = "xyes"; then + if test "x$have_sundga" = "xyes"; then echo " - PGX64 (for Sun XVR100/PGX64/PGX24 cards)" echo " - PGX32 (for Sun PGX32 cards)" fi diff --git a/m4/video_out.m4 b/m4/video_out.m4 index c767c9d39..07f080b22 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -10,8 +10,10 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ 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 @@ -23,8 +25,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ default_enable_macosx_video=disable default_enable_opengl=enable default_enable_syncfb=disable - default_enable_xinerama=enable default_enable_vidix=disable + default_enable_xinerama=enable + default_enable_xvmc=enable default_with_caca=with default_with_libstk=without @@ -259,7 +262,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl SDL AC_ARG_WITH([sdl], [AS_HELP_STRING([--without-sdl], [Build without SDL video output])], - [test x"$withval" != x"no" && withval="yes"], + [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]) @@ -271,21 +274,21 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Solaris framebuffer device support (exists for more than just Solaris) - AC_CHECK_HEADERS([sys/fbio.h], [ac_have_sunfb=yes], [ac_have_sunfb=no]) - if test x"$ac_have_sunfb" = x"yes"; then + 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" - ac_have_sundga=yes])]) + have_sundga=yes])]) CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" AC_SUBST(SUNDGA_CPPFLAGS) AC_SUBST(SUNDGA_LIBS) fi - AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) - AM_CONDITIONAL([ENABLE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$have_sundga" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNFB], [test x"$have_sunfb" = x"yes"]) dnl syncfb (Linux only) @@ -353,7 +356,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Xinerama AC_ARG_ENABLE([xinerama], [AS_HELP_STRING([--enable-xinerama], [enable support for Xinerama])], - [test x"$enableval" != x"no" && enableval="yes"], + [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 @@ -373,5 +376,142 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl xv - XINE_XV_SUPPORT + 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="-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="-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="-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/xv.m4 b/m4/xv.m4 deleted file mode 100644 index 5780aeb1b..000000000 --- a/m4/xv.m4 +++ /dev/null @@ -1,199 +0,0 @@ -AC_DEFUN([XINE_XV_SUPPORT], [ - 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])]) - - 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) xv_try_libs="$xv_try_path/$xv_lib" ;; - *.$acl_cv_shlibext) xv_try_libs="-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 - 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) -]) diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index bb3552039..a4f219b9c 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -32,10 +32,10 @@ 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 ENABLE_OPENGL -- cgit v1.2.3 From 54cb4d20e4efde08bf6f93f192f7d01c8cd51539 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sun, 13 May 2007 20:57:00 -0400 Subject: Fixes to make Objective C tests actually work with versions of autoconf that do not have AC_PROG_OBJC. Pull missing bits from autoconf 2.61, guard with m4_ifdef, and forcibly m4_include m4/objc.m4 into configure.ac, because aclocal won't pick it up with the m4_ifdef present. --- configure.ac | 2 ++ m4/objc.m4 | 107 +++++++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 85 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 156b1c741..7acc64305 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,7 @@ AC_PREREQ(2.59) +m4_include([m4/objc.m4]) + 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. diff --git a/m4/objc.m4 b/m4/objc.m4 index 1e3b3cb41..73dd8b6a0 100644 --- a/m4/objc.m4 +++ b/m4/objc.m4 @@ -1,4 +1,6 @@ # 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. @@ -53,17 +55,79 @@ # Roland McGrath, Noah Friedman, david d zuhn, and many others. # ------------------------------ # -# 3d. The Objective C compiler. # +# 1d. The Objective C language. # # ------------------------------ # -m4_ifdef([AC_PROG_OBJCPP], [], [ -dnl Commented out, because aclocal freaks out about the ()'s -dnl # AC_LANG_PREPROC(Objective C) -dnl # ---------------------------- -dnl # Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. -dnl AC_DEFUN([AC_LANG_PREPROC(Objective C)], -dnl [AC_REQUIRE([AC_PROG_OBJCPP])]) +# 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 @@ -96,17 +160,12 @@ AC_SUBST(OBJCPP)dnl AC_LANG_POP(Objective C)dnl ])# AC_PROG_OBJCPP -])dnl m4_ifdef([AC_PROG_OBJCPP]) - -m4_ifdef([AC_PROG_OBJC], [], [ - -dnl Commented out, because aclocal freaks out about the ()'s -dnl # AC_LANG_COMPILER(Objective C) -dnl # ----------------------------- -dnl # Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. -dnl AC_DEFUN([AC_LANG_COMPILER(Objective C)], -dnl [AC_REQUIRE([AC_PROG_OBJC])]) +# 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])]) @@ -128,18 +187,19 @@ AC_DEFUN([AC_PROG_OBJC], AC_ARG_VAR([OBJC], [Objective C compiler command])dnl AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()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. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) +echo "$as_me:$LINENO:" \ + "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` -_AC_DO([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl @@ -190,5 +250,4 @@ else fi fi[]dnl ])# _AC_PROG_OBJC_G - ])dnl m4_ifdef([AC_PROG_OBJC]) -- cgit v1.2.3 From 85c8e939102267d606acb4a0828e02bd38e9449a Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Mon, 14 May 2007 02:04:30 -0400 Subject: Only check for Xext if X is found via AC_PATH_XTRA --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 7acc64305..59d0ab219 100644 --- a/configure.ac +++ b/configure.ac @@ -851,21 +851,21 @@ dnl X_EXTRA_LIBS and X_PRE_LIBS. AC_PATH_XTRA if test x"$no_x" != x"yes"; then X_LIBS="$X_PRE_LIBS $X_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_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed]) ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADERS([X11/extensions/XShm.h], [], [AC_MSG_ERROR([XShm extension is required])], [#include ]) CPPFLAGS="$ac_save_CPPFLAGS" - AC_CHECK_LIB([Xext], [main], - [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([libXext is required])], - [$X_LIBS]) + AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed]) fi AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"]) -- cgit v1.2.3 From a8559f87b6cf39292a94d457689a1dfd1b4b21bf Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Mon, 14 May 2007 02:06:16 -0400 Subject: Final pass over video_out.m4 -- Create ACX_PACKAGE_CHECK to remove duplicate code for aalib, arts, dvdnav, and libfame. Remove aa.m4, arts.m4, dvdnav.m4, and libfame.m4 -- ACX_PACKAGE_CHECK does not require compiling and running a test program. Stole version code from autogen.sh --- m4/Makefile.am | 4 - m4/aa.m4 | 272 -------------------------------------------------------- m4/arts.m4 | 148 ------------------------------ m4/audio_out.m4 | 10 ++- m4/dvdnav.m4 | 188 --------------------------------------- m4/input.m4 | 6 +- m4/libfame.m4 | 183 -------------------------------------- m4/package.m4 | 72 +++++++++++++++ m4/summary.m4 | 4 +- m4/video_out.m4 | 12 +-- 10 files changed, 91 insertions(+), 808 deletions(-) delete mode 100644 m4/aa.m4 delete mode 100644 m4/arts.m4 delete mode 100644 m4/dvdnav.m4 delete mode 100644 m4/libfame.m4 create mode 100644 m4/package.m4 diff --git a/m4/Makefile.am b/m4/Makefile.am index 546c989fd..3fd1e9313 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -11,18 +11,14 @@ endif m4data_DATA = xine.m4 EXTRA_DIST = \ - aa.m4 \ - arts.m4 \ attributes.m4 \ audio_out.m4 \ decoders.m4 \ directx.m4 \ - dvdnav.m4 \ gas.m4 \ input.m4 \ ioctl_request.m4 \ libFLAC.m4 \ - libfame.m4 \ macosx.m4 \ objc.m4 \ pkg.m4 \ 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 -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 -#include -#include - -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 -#include -]], [[ 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 -#include -]], [[ - 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 ae34b5f04..000000000 --- a/m4/arts.m4 +++ /dev/null @@ -1,148 +0,0 @@ -dnl Configure paths for ARTS -dnl Philip Stadermann 2001-06-21 -dnl 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], [ - 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=yes]) - - AC_LANG_PUSH([C]) - - if test x"$arts_prefix" != x""; then - arts_args="$arts_args --arts-prefix=$arts_prefix" - test x"${ARTS_CONFIG+set}" != x"set" && ARTS_CONFIG="$arts_prefix/bin/artsc-config" - fi - - min_arts_version=ifelse([$1], , [0.9.5], [$1]) - if test x"$enable_artstest" = x"no"; then - AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) - else - AC_PATH_TOOL([ARTS_CONFIG], [artsc-config], [no]) - AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) - - if test x"$ARTS_CONFIG" = x"no"; then - with_arts=no - 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/'` - ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ARTS_CFLAGS" - ac_save_LIBS="$LIBS" LIBS="$ARTS_LIBS $LIBS" - - # Now check if the installed ARTS is sufficiently new. (Also sanity - # checks the results of arts-config to some extent) - - rm -f conf.artstest - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - FILE *fp; - - if ((fp = fopen("conf.artstest", "w")) != NULL) { - fclose(fp); - } - else { - printf("*** could not write to file conf.artstest\n"); - exit(1); - } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = strdup("$min_arts_version"); - if (!tmp_version || sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 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; - } - 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; -} - ]])], [], [with_arts=no], [with_arts=cc]) - if test x"$with_arts" = x"cc"; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], [[return 0]])], - [with_arts=yes], [with_arts=no]) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - if test x"$with_arts" != x"no"; then - AC_MSG_RESULT([yes]) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT([no]) - if test x"$enable_artstest" != x"no"; then - if test x"$ARTS_CONFIG" = x"no"; then - echo "*** The arts-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 arts-config." - else - if test ! -f conf.artstest ; then - echo "*** Could not run aRts test program, checking why..." - CFLAGS="$CFLAGS $ARTS_CFLAGS" - LIBS="$ARTS_LIBS $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], [[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 "***"], - [echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occurred. 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 arts-config script: $ARTS_CONFIG"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - else - rm -f conf.artstest - fi - fi - fi - ARTS_CFLAGS="" - ARTS_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(ARTS_CFLAGS) - AC_SUBST(ARTS_LIBS) - AC_LANG_POP([C]) -]) diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 0b54c5d51..53b719991 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -87,10 +87,14 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [test x"$withval" != x"no" && with_arts="yes"], [test $default_with_arts = without && with_arts="no"]) if test x"$with_arts" != x"no"; then - AM_PATH_ARTS([0.9.5], - [AC_DEFINE([HAVE_ARTS], 1, [Define this if you have aRts (libartsc) installed])]) + 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"$with_arts" != x"no"]) + AM_CONDITIONAL([ENABLE_ARTS], [test x"$have_arts" = x"yes"]) dnl CoreAudio for Mac OS X diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 deleted file mode 100644 index d944a581c..000000000 --- a/m4/dvdnav.m4 +++ /dev/null @@ -1,188 +0,0 @@ -dnl Configure paths for DVDNAV -dnl -dnl Copyright (C) 2001 Daniel Caujolle-Bert -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], [ - AC_ARG_WITH([dvdnav-prefix], - [AS_HELP_STRING([--with-dvdnav-prefix=PATH], [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=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}" != x"set"; 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}" != x"set"; 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" = x"no"; 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]) - - if test x"$DVDNAV_CONFIG" = x"no"; then - with_external_dvdnav=no - 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/'` - ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $DVDNAV_CFLAGS" - ac_save_LIBS="$LIBS" LIBS="$DVDNAV_LIBS $LIBS" - - # Now check if the installed DVDNAV is sufficiently new. (Also sanity - # checks the results of dvdnav-config to some extent) - - rm -f conf.dvdnavtest - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - int major, minor, sub; - char *tmp_version; - FILE *fp; - - if ((fp = fopen("conf.dvdnavtest", "w")) != NULL) { - fclose(fp); - } - else { - printf("*** could not write to file conf.dvdnavtest\n"); - exit(1); - } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = strdup("$min_dvdnav_version"); - if (!tmp_version || sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) { - printf("%s, bad version string\n", "$min_dvdnav_version"); - exit(1); - } - free(tmp_version); - - 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; - } - 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; -} - ]])], [], [with_external_dvdnav=no], [with_external_dvdnav=cc]) - if test x"$with_external_dvdnav" = x"cc"; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], [[return 0]])], - [with_external_dvdnav=yes], [with_external_dvdnav=no]) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - if test x"$with_external_dvdnav" != x"no"; then - AC_MSG_RESULT([yes]) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT([no]) - if test x"$enable_dvdnavtest" != x"no"; then - if test x"$DVDNAV_CONFIG" = x"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 - echo "*** Could not run DVDNAV test program, checking why..." - CFLAGS="$CFLAGS $DVDNAV_CFLAGS" - LIBS="$DVDNAV_LIBS $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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" - else - rm -f conf.dvdnavtest - fi - fi - fi - DVDNAV_CFLAGS="" - DVDNAV_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(DVDNAV_CFLAGS) - AC_SUBST(DVDNAV_LIBS) - AC_LANG_POP([C]) -]) diff --git a/m4/input.m4 b/m4/input.m4 index 0255f879e..4a1462bbe 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -80,9 +80,9 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ [AS_HELP_STRING([--with-external-dvdnav], [use external dvdnav library (not recommended)])], [], [with_external_dvdnav=no]) if test x"$with_external_dvdnav" != x"no"; 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 ***])]) + 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 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 -#include -#include - -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, µ) != 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 -#include -], [ 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 -#include -], [ 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/package.m4 b/m4/package.m4 new file mode 100644 index 000000000..764f70d45 --- /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[$#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 -ge $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/summary.m4 b/m4/summary.m4 index 71c556c98..c99153674 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -267,7 +267,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - xcb-xv (XVideo using XCB)" fi fi - if test "x$no_aalib" != "xyes"; then + if test "x$have_aalib" = "xyes"; then echo " - aa (Ascii ART)" fi if test "x$have_caca" = "xyes"; then @@ -326,7 +326,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ dnl Audio plugins echo " * audio driver plugins:" test x"$have_alsa" = x"yes" && echo " - alsa (ALSA - Advanced Linux Sound Architecture)" - test x"$with_arts" != x"no" && echo " - arts (aRts - KDE soundserver)" + 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)" diff --git a/m4/video_out.m4 b/m4/video_out.m4 index 07f080b22..4a6bc431b 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -57,15 +57,17 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Ascii-Art - dnl REVISIT: FIX AM_PATH_AALIB 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 - AM_PATH_AALIB([1.4], [], [AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***])]) + 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"$no_aalib" != x"yes"]) + AM_CONDITIONAL([ENABLE_AA], [test x"$have_aalib" = x"yes"]) dnl Color AsCii Art @@ -131,8 +133,8 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ 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)]) - AM_PATH_LIBFAME([0.8.10], - [AC_DEFINE([HAVE_NEW_LIBFAME], 1, [Define this if you have libfame 0.8.10 or above])]) + 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]) -- cgit v1.2.3 From 0f8df48c99c5ba5bc6b27e07a85df183400e9410 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Mon, 14 May 2007 20:08:12 -0400 Subject: Final pass over input plugin configuration checks -- Move some generic checks out of m4/input.m4 and back into configure.ac -- Remove ioctl_request.m4 and inline it in configure.ac -- Fix compilation of internal libcdio and libvcd stuff -- now works for Darwin -- Add a switch for enabling/disabling dvb support. Disabled by default for all platforms except for Linux. Only allowed to be used on Linux. -- Disable vcd support on all platforms except for FreeBSD, Linux, and Solaris, because src/input/input_vcd.c is only supported on those platforms even though libcdio and libvcd will compile on other platforms -- Clean up some summary.m4 stuff --- configure.ac | 88 +++++++++++++++---- m4/Makefile.am | 1 - m4/input.m4 | 149 ++++++++++++++++---------------- m4/ioctl_request.m4 | 48 ----------- m4/summary.m4 | 175 ++++++++++++++++---------------------- m4/video_out.m4 | 6 +- src/input/Makefile.am | 10 ++- src/input/vcd/Makefile.am | 8 +- src/input/vcd/libcdio/Makefile.am | 4 +- src/input/vcd/libvcd/Makefile.am | 6 +- 10 files changed, 239 insertions(+), 256 deletions(-) delete mode 100644 m4/ioctl_request.m4 diff --git a/configure.ac b/configure.ac index 59d0ab219..f721454b7 100644 --- a/configure.ac +++ b/configure.ac @@ -326,8 +326,25 @@ dnl ----------------------- AC_HEADER_STDC AC_CHECK_HEADERS([alloca.h]) -AC_CHECK_HEADERS([assert.h byteswap.h dirent.h execinfo.h libgen.h malloc.h netdb.h ucontext.h]) -AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.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 ]], + [[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 +AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h]) dnl ---------------- @@ -336,19 +353,35 @@ dnl ---------------- AC_TYPE_OFF_T AC_TYPE_SIZE_T -AC_CHECK_SIZEOF(long) +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 -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 + 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()]) dnl --------------------- dnl checks for structures dnl --------------------- +AC_CHECK_MEMBER([struct tm.tm_gmtoff], + [AC_DEFINE([HAVE_TM_GMTOFF], 1, [Define if struct tm has the tm_gmtoff member.])], + [], [#include ]) + dnl ----------------------------------- dnl checks for compiler characteristics @@ -372,6 +405,26 @@ AC_C_CONST AC_C_INLINE AC_C_RESTRICT +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_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 ASM ALIGN is power of two ? dnl src/post/planar AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm(".align 3");]])], @@ -783,17 +836,22 @@ dnl NLS: src/input/mms.c src/input/vcd, xine-utils AC_CHECK_FUNCS([nl_langinfo]) 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 -]) +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 ]) dnl contrib/libdca, src/video_out/vidix/drivers/mach64_vid.c AC_CHECK_FUNCS([memalign]) +dnl src/input/vcd/libcdio/portable.h +AC_CHECK_FUNCS([bzero]) + +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)])) @@ -850,7 +908,7 @@ 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_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" + 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]) @@ -889,9 +947,9 @@ 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"" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS" +test x"$ac_cv_sys_file_offset_bits" = x"yes" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS" +test x"$ac_cv_sys_largefile_source" = x"yes" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS" +test x"$ac_cv_sys_large_files" = x"yes" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS" dnl ------- diff --git a/m4/Makefile.am b/m4/Makefile.am index 3fd1e9313..71e4b9d51 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -17,7 +17,6 @@ EXTRA_DIST = \ directx.m4 \ gas.m4 \ input.m4 \ - ioctl_request.m4 \ libFLAC.m4 \ macosx.m4 \ objc.m4 \ diff --git a/m4/input.m4 b/m4/input.m4 index 4a1462bbe..b12992170 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -6,79 +6,105 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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_vcd=disable default_with_internal_vcdlibs=without case "$host_os" in - linux*) default_enable_v4l=enable ;; + cygwin* | mingw*) + default_enable_gnomevfs=disable + default_enable_samba=disable + ;; + darwin*) + default_enable_gnomevfs=disable + default_enable_samba=disable + ;; + freebsd*) + default_enable_vcd=enable + ;; + linux*) + default_enable_v4l=enable + default_enable_vcd=enable + ;; + solaris*) + default_enable_vcd=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([--disable-gnomevfs], [do not build gnome-vfs support])], - [], [test $default_enable_gnomevfs = disable && enable_gnomevfs=no]) + [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], [no_gnome_vfs=no], [no_gnome_vfs=yes]) - if test x"$no_gnome_vfs" != x"yes"; then - AC_DEFINE([HAVE_GNOME_VFS], 1, [Define this if you have gnome-vfs installed]) + 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 - else - no_gnome_vfs=yes fi - AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) + AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$have_gnomevfs" = x"yes"]) dnl libsmbclient AC_ARG_ENABLE([samba], - [AS_HELP_STRING([--disable-samba], [do not build Samba support])], - [], [test $default_enable_samba = disable && enable_samba=no]) + [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_libsmbclient=yes - LIBSMBCLIENT_LIBS="-lsmbclient"])]) + [AC_CHECK_HEADERS([libsmbclient.h], [have_libsmbclient=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_libsmbclient" = x"yes"]) + AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_samba" = x"yes"]) dnl video-for-linux (v4l) AC_ARG_ENABLE([v4l], - [AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugin])], - [], [test $default_enable_v4l = disable && enable_v4l=no]) + [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"no"; then + 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 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 ]], - [[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 - AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h]) - - 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)])], - [], [with_external_dvdnav=no]) + [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])], @@ -90,57 +116,29 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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([--disable-vcd], [do not compile VCD plugin])], - [], [test $default_enable_vcd = disable && enable_vcd=no]) + [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 - AC_ARG_WITH([internal-vcdlibs], - [AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo])], - [], [test $default_with_internal_vcdlibs = without && with_internal_vcdlibs=no]) 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_internval_vcdlibs=yes]) - PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [with_internval_vcdlibs=yes]) - if test x"$with_internval_vcdlibs" = x"yes"; 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_internval_vcdlibs" = "xno"; then + 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]) - 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 ]) - - dnl empty_array_size - 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_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 - 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]) - - AC_CHECK_HEADERS([errno.h fcntl.h glob.h stdbool.h]) - if test x"$ac_cv_header_stdint_h" != x"yes"; then - AC_CHECK_SIZEOF([int], 4) - AC_CHECK_SIZEOF([long], 4) - AC_CHECK_SIZEOF([long long], 8) - fi dnl dnl bitfield order @@ -239,6 +237,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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]) @@ -270,6 +269,6 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" = x"no"]) + AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" != x"no"]) ]) diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4 deleted file mode 100644 index 8ded72504..000000000 --- a/m4/ioctl_request.m4 +++ /dev/null @@ -1,48 +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 - 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/summary.m4 b/m4/summary.m4 index c99153674..b695b212a 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -12,30 +12,23 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - stdin_fifo - rtp" echo " - http - mms" echo " - pnm - rtsp" - echo " - dvb" - if test "x$with_external_dvdnav" = "xyes"; then + if test x"$enable_vcd" != x"no"; then + if test x"$with_internal_vcdlibs" = x"no"; then + echo " - vcdo - vcd (external libs)" + else + echo " - vcdo - vcd (internal libs)" + fi + fi + if test x"$with_external_dvdnav" = x"yes"; then echo " - dvd (external libs)" else echo " - dvd (internal libs)" fi - 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" + test x"$have_dvb" = x"yes" && echo " - dvb" + 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" - 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 @@ -59,26 +52,26 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - FLAC - aac" echo " - iff - matroska" echo " - vmd - flv" - if test "x$enable_asf" = "xyes"; then + if test x"$enable_asf" != x"no"; then echo " - asf" fi - if test "x$have_vorbis" = "xyes"; then + if test x"$have_vorbis" = x"yes"; then echo " - ogg" fi - if test "x$enable_mng" != x"no"; then + if test x"$enable_mng" != x"no"; then echo " - mng" fi - if test "x$enable_modplug" != x"no"; then + if test x"$enable_modplug" != x"no"; then echo " - mod" fi - if test "x$have_libflac" = "xyes"; then + if test x"$have_libflac" = x"yes"; then echo " - FLAC (with libFLAC)" fi - if test "x$have_wavpack" = "xyes"; then + if test x"$have_wavpack" = x"yes"; then echo " - WavPack" fi - if test "x$enable_a52dec" = "xyes"; then - if test "x$have_a52" = "xyes"; then + if test x"$enable_a52dec" != x"no"; then + if test x"$have_a52" = x"yes"; then echo " - ac3 (external library)" else echo " - ac3 (internal library)" @@ -90,7 +83,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " * video decoder plugins:" echo " - MPEG 1,2 - Amiga Bitplane" echo " - Raw RGB - Raw YUV" - if test "x$with_external_ffmpeg" = "xyes"; then + if test x"$with_external_ffmpeg" = x"yes"; then echo " - ffmpeg (external library):" else echo " - ffmpeg (internal library):" @@ -112,19 +105,19 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - 8BPS - Duck TrueMotion v1" echo " - ATI VCR1 - Flash Video" echo " - ZLIB - MSZH" - if test "x$have_dxr3" = "xyes"; then + if test x"$have_dxr3" = x"yes"; then echo " - dxr3_video" fi - if test "x$enable_w32dll" = "xyes"; then + if test x"$enable_w32dll" != x"no"; then echo " - w32dll" fi - if test "x$have_imagemagick" = "xyes"; then + if test x"$have_imagemagick" = x"yes"; then echo " - image" fi - if test x"no_gdkpixbuf" != "xyes"; then + if test x"no_gdkpixbuf" != x"yes"; then echo " - gdk-pixbuf" fi - if test "x$have_theora" = "xyes"; then + if test x"$have_theora" = x"yes"; then echo " - theora" fi echo "" @@ -133,7 +126,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " * audio decoder plugins:" echo " - GSM 06.10" echo " - linear PCM - Nosefart (NSF)" - if test "x$with_external_ffmpeg" = "xyes"; then + if test x"$with_external_ffmpeg" = x"yes"; then echo " - ffmpeg (external library):" else echo " - ffmpeg (internal library):" @@ -145,50 +138,50 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - XA ADPCM - Game DPCM/ADPCM" echo " - Mace 3:13 - Mace 6:1" echo " - FLAC" - if test "x$have_libflac" = "xyes"; then + if test x"$have_libflac" = x"yes"; then echo " - FLAC (with libFLAC)" fi - if test "x$have_vorbis" = "xyes"; then + if test x"$have_vorbis" = x"yes"; then echo " - vorbis" fi - if test "x$have_speex" = "xyes"; then + if test x"$have_speex" = x"yes"; then echo " - speex" fi - if test "x$enable_w32dll" = "xyes"; then + if test x"$enable_w32dll" != x"no"; then echo " - w32dll" fi - if test "x$enable_faad" = "xyes"; then + if test x"$enable_faad" != x"no"; then echo " - faad" fi - if test "x$enable_mad" = "xyes"; then - if test "x$with_external_mad" != "xno"; then + if test x"$enable_mad" != x"no"; then + if test x"$with_external_mad" != x"no"; 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 + if test x"$enable_libdts" != x"no"; then + if test x"$have_dts" = x"yes"; 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 + if test x"$enable_a52dec" != x"no"; then + if test x"$have_a52" = x"yes"; 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 + if test x"$enable_musepack" != x"no"; then + if test x"$have_mpcdec" = x"yes"; then echo " - MusePack (external library)" else echo " - MusePack (internal library)" fi fi - if test "x$have_wavpack" = "xyes"; then + if test x"$have_wavpack" = x"yes"; then echo " - WavPack" fi echo "" @@ -198,9 +191,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - spu - spucc" echo " - spucmml - sputext" echo " - spudvb" - if test "x$have_dxr3" = "xyes"; then - echo " - dxr3_spu" - fi + test x"$have_dxr3" = x"yes" && echo " - dxr3_spu" echo "" dnl post plugins @@ -217,109 +208,91 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ dnl Video plugins echo " * video driver plugins:" - if test "x$no_x" != "xyes"; then + if test x"$no_x" != x"yes"; then echo " - XShm (X11 shared memory)" - dnl syncfb - if test "x$have_syncfb" = "xyes"; then + if test x"$have_syncfb" = x"yes"; then echo " - SyncFB (for Matrox G200/G400 cards)" fi - dnl Xv - if test "x$have_xv" = "xyes"; then - if test "x$have_xv_static" = "xyes"; then + 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 - dnl XxMC - if test "x$have_xxmc" = "xyes"; then - if test "x$have_vldexts" = "xyes"; then + 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 - dnl XvMC - if test "x$have_xvmc" = "xyes"; then + if test x"$have_xvmc" = x"yes"; then echo " - XvMC (XVideo motion compensation)" fi - if test x"$have_opengl" = "xyes"; then + 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" = "xyes"; then - if test "x$have_sundga" = "xyes"; then + 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" = "xyes"; then - dnl xcb-shm - if test "x$have_xcbshm" = "xyes"; then + 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 - dnl xcb-xv - if test "x$have_xcbxv" = "xyes"; then + if test x"$have_xcbxv" = x"yes"; then echo " - xcb-xv (XVideo using XCB)" fi fi - if test "x$have_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 + + + 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" = "xyes"; then + if test x"$have_vidix" = x"yes"; then echo $ECHO_N " - vidix (" - if test "x$no_x" != "xyes"; then + if test x"$no_x" != x"yes"; then echo $ECHO_N "X11" - if test "x$have_fb" = "xyes"; then + if test x"$have_fb" = x"yes"; then echo $ECHO_N " and " fi fi - if test "x$have_fb" = "xyes"; then + if test x"$have_fb" = x"yes"; then echo $ECHO_N "framebuffer" fi echo $ECHO_N " support" - if test "x$enable_dha_kmod" = "xyes"; then + if test x"$enable_dha_kmod" != x"no"; 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 "" diff --git a/m4/video_out.m4 b/m4/video_out.m4 index 4a6bc431b..a0ab163fa 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -72,7 +72,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl Color AsCii Art AC_ARG_WITH([caca], - [AS_HELP_STRING([--without-caca], [Do not build CACA support])], + [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 @@ -263,7 +263,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl SDL AC_ARG_WITH([sdl], - [AS_HELP_STRING([--without-sdl], [Build without SDL video output])], + [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 @@ -310,7 +310,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ dnl xcb AC_ARG_WITH([xcb], - [AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins])], + [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 diff --git a/src/input/Makefile.am b/src/input/Makefile.am index a5c98c85f..b1cd89bb5 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -10,7 +10,10 @@ AM_LDFLAGS = $(xineplug_ldflags) # All of xine input plugins should be named like the scheme "xineplug_inp_" # -SUBDIRS = dvb libreal librtsp +SUBDIRS = libreal librtsp +if ENABLE_DVB +SUBDIRS += dvb +endif if ENABLE_VCD SUBDIRS += vcd endif @@ -23,6 +26,10 @@ 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_VCD in_vcd = xineplug_inp_vcdo.la endif @@ -51,7 +58,6 @@ endif # not ported to native Windows if !WIN32 in_rtp = xineplug_inp_rtp.la -in_dvb = xineplug_inp_dvb.la endif diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 0ff664605..1f03720cb 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = @@ -13,9 +13,5 @@ noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h xineplug_LTLIBRARIES = xineplug_inp_vcd.la xineplug_inp_vcd_la_SOURCES = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c - -if WITH_EXTERNAL_VCDLIBS -xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS) -else xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm -endif +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 6414d8230..a79525c8f 100644 --- a/src/input/vcd/libcdio/Makefile.am +++ b/src/input/vcd/libcdio/Makefile.am @@ -1,11 +1,11 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) +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 \ diff --git a/src/input/vcd/libvcd/Makefile.am b/src/input/vcd/libvcd/Makefile.am index 65ffc6255..c922685e3 100644 --- a/src/input/vcd/libvcd/Makefile.am +++ b/src/input/vcd/libvcd/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib SUBDIRS = libvcd @@ -47,7 +47,6 @@ libvcd_la_SOURCES = \ stream.c \ stream_stdio.c \ util.c -libvcd_la_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS) libvcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS) libvcdinfo_la_SOURCES = \ @@ -55,3 +54,4 @@ libvcdinfo_la_SOURCES = \ inf.c \ info_private.c \ vcd_read.c +libvcdinfo_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS) -- cgit v1.2.3 From d1b1501547f9415ac6ee38bc99f528d9dcfdf21d Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Mon, 14 May 2007 23:24:01 -0400 Subject: Final pass over decoders.m4 --- m4/Makefile.am | 1 - m4/decoders.m4 | 380 ++++++++++++++++++++++++++------------------ m4/summary.m4 | 144 +++++++---------- src/demuxers/Makefile.am | 2 +- src/liba52/Makefile.am | 25 +-- src/libfaad/Makefile.am | 2 +- src/libmpeg2/Makefile.am | 2 +- src/libmpeg2new/Makefile.am | 2 +- 8 files changed, 293 insertions(+), 265 deletions(-) diff --git a/m4/Makefile.am b/m4/Makefile.am index 71e4b9d51..068661ebd 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -17,7 +17,6 @@ EXTRA_DIST = \ directx.m4 \ gas.m4 \ input.m4 \ - libFLAC.m4 \ macosx.m4 \ objc.m4 \ pkg.m4 \ diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 5e3ec7b48..9f9ae9aeb 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -2,19 +2,17 @@ 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([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)])], - [], [enable_a52dec=yes]) + [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)])], - [external_a52dec="$withval"], [external_a52dec="no"]) + [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 - dnl REVISIT: --with-external-a52dec=PREFIX - if test x"$external_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_a52=yes], [have_a52=no], + [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], [have_external_a52dec=yes], [have_external_a52dec=no], [#ifdef HAVE_SYS_TYPES_H # include #endif @@ -24,155 +22,211 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ #ifdef HAVE_STDINT_H # include #endif - #include ])], [have_a52=no], [-lm]) - if test x"$have_a52" = x"no"; then + #include ])], [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([A52], [test x"$enable_a52dec" != x"no"]) - AM_CONDITIONAL([EXTERNAL_A52DEC], [test x"$have_a52" = x"yes"]) + 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([--disable-asf], [do not build ASF demuxer])], - [], [enable_asf=yes]) - AM_CONDITIONAL([BUILD_ASF], [test x"$enable_asf" != x"no"]) + [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([--disable-faad], [do not build FAAD decoder])], - [], [enable_faad=yes]) - AM_CONDITIONAL([BUILD_FAAD], [test x"$enable_faad" != x"no"]) + [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]) + [], [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"yes") - PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0]) - ;; + x"no") with_external_ffmpeg=no ;; x"soft") - PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], - [with_external_ffmpeg=yes], [with_external_ffmpeg=no]) + 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" = "xyes"; then + 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 is configured with external ffmpeg. +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]) - AC_ARG_ENABLE([ffmpeg_uncommon_codecs], - [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs])], - [], [enable_ffmpeg_uncommon_codecs=yes]) - AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"]) - AC_ARG_ENABLE([ffmpeg_popular_codecs], - [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs])], - [], [enable_ffmpeg_popular_codecs=yes]) - AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) + AC_MSG_RESULT([Using included ffmpeg]) fi - AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) + 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([--disable-gdkpixbuf], [do not build gdk-pixbuf support])], - [], [enable_gdkpixbuf=yes]) + [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], [no_gdkpixbuf=no], [no_gdkpixbuf=yes]) - if test x"$no_gdkpixbuf" != x"yes"; then - AC_DEFINE([HAVE_GDK_PIXBUF], 1, [Define this if you have gdk-pixbuf installed]) + 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 - else - no_gdkpixbuf=yes fi - AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$have_gdkpixbuf" = x"yes"]) dnl ImageMagick (optional; enabled by default) AC_ARG_WITH([imagemagick], - [AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder])], - [], [with_imagemagic=yes]) + [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 Wand not found]) - elif test x"$have_imagemagick" = x"yes"; then - AC_DEFINE([HAVE_WAND], 1, [Define this if you have ImageMagick installed]) + AC_MSG_ERROR([ImageMagick support requested, but ImageMagick not found]) fi fi - AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" != x"no"]) + 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([--disable-dts], [Disable support for DTS decoding library (default: enabled)])], - [], [enable_dts=yes]) + [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)])], - [], [with_external_libdts=no]) + [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_dts=yes], [have_dts=no]) - if test x"$have_dts" = 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_CFLAGS) AC_SUBST(LIBDTS_DEPS) - AC_SUBST(LIBDTS_LIBS) fi fi AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"]) - AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) + 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])], - [], [enable_libflac=no]) + [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 - AM_PATH_LIBFLAC([have_libflac=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_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([--disable-mad], [Disable support for MAD decoding library (default: enabled)])], - [], [enable_mad=yes]) + [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)])], - [], [with_external_libmad=no]) + [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], [], [with_external_libmad=no])], [with_external_libmad=no]) - if test x"$with_external_libmad" = x"no"; then + [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 - fi - if test x"$with_external_libmad" = x"no"; then + 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]) @@ -205,40 +259,48 @@ use internal ffmpeg. esac fi fi - AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" = x"yes"]) - AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_mad" = x"yes"]) + 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])], - [], [enable_modplug=yes]) + [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], - [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])], - [enable_modplug=no]) + 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([--disable-musepack], [Disable support for MusePack decoding (default: enabled)])], - [], [enable_musepack=yes]) + [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])], - [], [with_external_libmpcdec=no]) + [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_mpcdec=yes])]) - if test x"$have_mpcdec" != x"yes"; then - AC_MSG_ERROR([Unable to find mpcdec]) + [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 - MPCDEC_LIBS="-lmpcdec" - MPCDEC_CFLAGS="" else - AC_MSG_RESULT([Use included libmusepack]) + 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' @@ -248,48 +310,18 @@ use internal ffmpeg. AC_SUBST(MPCDEC_LIBS) fi AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"]) - AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_mpcdec" = x"yes"]) - - - dnl libw32dll (optional; x86 only; enabled if using GNU as; GNU as required) - AC_ARG_ENABLE([w32dll], - [AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support])], - [], [enable_w32dll="$with_gnu_as"]) - if test x"$enable_w32dll" != x"no"; then - case "$host_or_hostalias" in - *-mingw* | *-cygwin) - enable_w32dll=no - ;; - i?86-* | k?-* | athlon-* | pentium*-) - test x"$with_gnu_as" = x"no" && enable_w32dll=no - ;; - *) - enable_w32dll=no - ;; - esac - fi - if test x"$enable_w32dll" != x"no"; then - if test x"with_gnu_as" = x"no"; then - AC_MSG_ERROR([You need GNU as to enable Win32 codecs support]) - fi - AC_ARG_WITH([w32-path], - [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])], - [], [w32_path="/usr/lib/codecs"]) - AC_SUBST(w32_path) - fi - AM_CONDITIONAL([ENABLE_W32DLL], [test x"$enable_w32dll" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_external_libmpcdec" = x"yes"]) dnl mlib AC_ARG_ENABLE([mlib], - [AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support])], - [], [enable_mlib=yes]) + [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])], - [], [enable_mlib_lazyload=no]) + [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" + 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], @@ -304,36 +336,42 @@ use internal ffmpeg. MLIB_LIBS="-L$mlibhome/lib -lmlib" fi MLIB_CFLAGS="-I$mlibhome/include" - LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS $MLIB_CFLAGS" - AC_SUBST(LIBMPEG2_CFLAGS) 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]) - ac_have_mlib=yes]) + have_mlib=yes]) CPPFLAGS="$saved_CPPFLAGS"], [], ["-L$mlibhome/lib"]) fi - AM_CONDITIONAL([HAVE_MLIB], [test x"$ac_have_mlib" = x"yes"]) + AM_CONDITIONAL([HAVE_MLIB], [test x"$have_mlib" = x"yes"]) dnl mng (optional; enabled by default) AC_ARG_ENABLE([mng], - [AS_HELP_STRING([--disable-mng], [do not build mng support])], - [], [enable_mng=yes]) + [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], [MNG_LIBS="-lmng"], [enable_mng=yes])], [enable_mng=no]) - AC_SUBST(MNG_LIBS) + [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"$enable_mng" != x"no"]) + 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([--without-speex], [Build without Speex audio decoder])]) + [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"no"; then + 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]) @@ -344,7 +382,8 @@ use internal ffmpeg. dnl Ogg/Theora (optional; enabled by default; external) AC_ARG_WITH([theora], - [AS_HELP_STRING([--without-theora], [Build without Theora video decoder])]) + [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 @@ -358,54 +397,91 @@ use internal ffmpeg. dnl Ogg/Vorbis (optional; enabled by default; external) AC_ARG_WITH([vorbis], - [AS_HELP_STRING([--without-vorbis], [Build without Vorbis audio decoder])]) + [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; default depends on platform) + 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([--disable-real-codecs], [Disable Real binary codecs support])], - [], [case $host_os in - darwin*) enable_real_codecs=no ;; - *) enable_real_codes=yes ;; - esac]) + [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 - AC_ARG_WITH([real-codecs-path], - [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])], - [AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$withval"], [Specified path for Real binary codecs])]) + 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 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 For these there are no replacements - AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) - 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])]) + 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 - AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) + 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)])], - [], [with_wavpack=no]) + [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]) + 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"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$have_gdkpixbuf" = x"yes"]) ]) diff --git a/m4/summary.m4 b/m4/summary.m4 index b695b212a..161400d50 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -19,7 +19,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - vcdo - vcd (internal libs)" fi fi - if test x"$with_external_dvdnav" = x"yes"; then + if test x"$with_external_dvdnav" != x"no"; then echo " - dvd (external libs)" else echo " - dvd (internal libs)" @@ -52,73 +52,51 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - FLAC - aac" echo " - iff - matroska" echo " - vmd - flv" - if test x"$enable_asf" != x"no"; then - echo " - asf" - fi - if test x"$have_vorbis" = x"yes"; then - echo " - ogg" - fi - if test x"$enable_mng" != x"no"; then - echo " - mng" - fi - if test x"$enable_modplug" != x"no"; then - echo " - mod" - fi - if test x"$have_libflac" = x"yes"; then - echo " - FLAC (with libFLAC)" - fi - if test x"$have_wavpack" = x"yes"; then - echo " - WavPack" - fi if test x"$enable_a52dec" != x"no"; then - if test x"$have_a52" = x"yes"; 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" - if test x"$with_external_ffmpeg" = x"yes"; then - echo " - ffmpeg (external library):" + 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):" - 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" = x"yes"; then - echo " - dxr3_video" - fi - if test x"$enable_w32dll" != x"no"; then - echo " - w32dll" - fi - if test x"$have_imagemagick" = x"yes"; then - echo " - image" - fi - if test x"no_gdkpixbuf" != x"yes"; then - echo " - gdk-pixbuf" - fi - if test x"$have_theora" = x"yes"; then - echo " - theora" + 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 "" @@ -126,63 +104,51 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " * audio decoder plugins:" echo " - GSM 06.10" echo " - linear PCM - Nosefart (NSF)" - if test x"$with_external_ffmpeg" = x"yes"; 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" = x"yes"; then - echo " - FLAC (with libFLAC)" - fi - if test x"$have_vorbis" = x"yes"; then - echo " - vorbis" - fi - if test x"$have_speex" = x"yes"; then - echo " - speex" - fi - if test x"$enable_w32dll" != x"no"; then - echo " - w32dll" - fi - if test x"$enable_faad" != x"no"; then - echo " - faad" - fi + 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"$with_external_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_dts" = x"yes"; 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_a52" = x"yes"; 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_mpcdec" = x"yes"; then - echo " - MusePack (external library)" + if test x"$have_external_libmpcdec" = x"yes"; then + echo " - Musepack (external library)" else - echo " - MusePack (internal library)" + echo " - Musepack (internal library)" fi fi - if test x"$have_wavpack" = x"yes"; then - echo " - WavPack" + 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 "" diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 0cfec1e89..b1e747bcc 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -16,7 +16,7 @@ if ENABLE_VORBIS ogg_module = xineplug_dmx_ogg.la endif -if BUILD_ASF +if ENABLE_ASF asf_module = xineplug_dmx_asf.la endif diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 9eec4f6d2..1025b373d 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -3,32 +3,19 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) -noinst_HEADERS = \ - a52.h \ - a52_internal.h \ - bitstream.h \ - tables.h \ - crc.c +noinst_HEADERS = a52.h a52_internal.h bitstream.h tables.h crc.c -if A52 +if ENABLE_A52DEC xineplug_LTLIBRARIES = xineplug_decode_a52.la endif -if EXTERNAL_A52DEC -internal_sources = +if WITH_EXTERNAL_A52DEC external_libs = -la52 +internal_sources = else -internal_sources = \ - bitstream.c \ - bit_allocate.c \ - downmix.c \ - imdct.c \ - parse.c external_libs = +internal_sources = bitstream.c bit_allocate.c downmix.c imdct.c parse.c endif -xineplug_decode_a52_la_SOURCES = \ - xine_a52_decoder.c \ - $(internal_sources) - +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 5f4be9cd4..379033b15 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -57,7 +57,7 @@ noinst_HEADERS = \ syntax.h \ tns.h -if BUILD_FAAD +if ENABLE_FAAD xineplug_LTLIBRARIES = xineplug_decode_faad.la endif diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index a970c6d24..d772f0e09 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -29,4 +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 = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 4e9e6305b..8c248fdcb 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -9,4 +9,4 @@ xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = xine_mpeg2_decoder.c xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) -- cgit v1.2.3 From 8aeaff301f34f29fb53e01d5de49535409cb3077 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Mon, 14 May 2007 23:46:35 -0400 Subject: Clean up xine.m4 to match with package.m4 for 3rd-party use. Since xine.m4 is also derived from the same code that's all been replaced with the more generic package.m4 code, use that same code for xine.m4 as well, though it doesn't actually depend on package.m4, but is instead a specific, customized version of it intended to be used where package.m4 is not available. --- m4/xine.m4 | 257 ++++++++++++++++++------------------------------------------- 1 file changed, 77 insertions(+), 180 deletions(-) diff --git a/m4/xine.m4 b/m4/xine.m4 index cb64bad1a..a78c678a4 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -23,193 +23,90 @@ 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[$#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 -ge $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 -#include -#include -#include - -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 -#include -]], [[ 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" - 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 + 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 + 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 ]) -- cgit v1.2.3 From d90df04ae2c5283649101cb08e041e277a335274 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 03:03:10 -0400 Subject: Cleanups and fixes for building ffmpeg --- configure.ac | 1 + contrib/Makefile.am | 77 +++++++++++++++++++++++---------------------- contrib/ffmpeg-universal.sh | 77 ++++++++++++++++++++++++++++++++++++--------- 3 files changed, 103 insertions(+), 52 deletions(-) diff --git a/configure.ac b/configure.ac index f721454b7..2511e5dda 100644 --- a/configure.ac +++ b/configure.ac @@ -767,6 +767,7 @@ 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 O1_CFLAGS="$O0_CLFAGS" O2_CFLAGS="$O0_CFLAGS" diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 8ad34d968..1ebb7d5d1 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 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,22 @@ 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 + +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 +78,28 @@ 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) -fPIC -DPIC" \ cd .. 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 +107,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 +115,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 +139,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 -- cgit v1.2.3 From 64d0bdba1149a78a1fab7efaac26a45ea719230e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 03:42:15 -0400 Subject: Mac OS X universal build fixes -- Set -isysroot in CFLAGS and -syslibroot in LDFLAGS early -- Patch libtool's sys_lib_search_path_spec to not search /usr/lib, et al., and instead search /Developer/SDKs/MacOSX10.4u.sdk/usr/lib so that it'll find universal versions of stuff, libiconv.dylib in particular. There's a libiconv.la file hanging around in /usr/lib that breaks everything otherwise. --- configure.ac | 6 +++++- m4/macosx.m4 | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 2511e5dda..24dbaf2e9 100644 --- a/configure.ac +++ b/configure.ac @@ -1202,7 +1202,11 @@ 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 +if test x"$enable_macosx_universal" = x"no"; then + cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool.tmp +else + 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 diff --git a/m4/macosx.m4 b/m4/macosx.m4 index 8a66c49b9..0151b41e9 100644 --- a/m4/macosx.m4 +++ b/m4/macosx.m4 @@ -18,9 +18,11 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ 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" - 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. @@ -38,7 +40,4 @@ AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [ 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) ])dnl MACOSX_UNIVERSAL_BINARIES -- cgit v1.2.3 From bc5a1e1c45310514350a542d58bf6015beddfdfa Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 04:39:58 -0400 Subject: Stupid typo fix when not building universal binaries. Also some tweaks for Darwin. --- contrib/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 1ebb7d5d1..6e019ba62 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -67,6 +67,10 @@ 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 \ @@ -92,8 +96,12 @@ else mkdir -p ffmpeg cd ffmpeg; \ $(srcdir)/ffmpeg/configure $(all_configure_options) \ - --extra-cflags="$(VISIBILITY_FLAG) -fPIC -DPIC" \ + --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 -- cgit v1.2.3 From 691a9895c2601c575901ac1707f333d2e82d1ae7 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 14:02:51 -0400 Subject: Enable dvb input plugin support by default on Linux --- m4/input.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/input.m4 b/m4/input.m4 index b12992170..b9b2e82d7 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -30,6 +30,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ default_enable_vcd=enable ;; linux*) + default_enable_dvb=enable default_enable_v4l=enable default_enable_vcd=enable ;; -- cgit v1.2.3 From ae322a1285602b350bd32390244b1c1ef6a2187e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 14:23:29 -0400 Subject: Fix the GNU assembler configuration check --- m4/gas.m4 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/m4/gas.m4 b/m4/gas.m4 index 248057abd..a3c600793 100644 --- a/m4/gas.m4 +++ b/m4/gas.m4 @@ -37,11 +37,12 @@ AC_DEFUN([CC_PROG_AS], [ fi dnl Try to figure out the assembler command. Fallback to as. - if test -z "$AS"; then + 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 + if test x"$ccas_is_gnu" = x"yes"; then # Check if gcc -print-prog-name=as gives a path. - case $host in + 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'` @@ -60,8 +61,8 @@ AC_DEFUN([CC_PROG_AS], [ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done - AC_MSG_RESULT([$ac_prog]) ;; + *) ac_prog="" ;; esac fi fi @@ -71,8 +72,8 @@ AC_DEFUN([CC_PROG_AS], [ 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 - ac_prog="$ac_dir/$ac_prog" + if test -f "$ac_dir/as" || test -f "$ac_dir/as$ac_exeext"; then + ac_prog="$ac_dir/as" break fi done -- cgit v1.2.3 From 513f15441a64b2c324ffe4f5a0b4e4fe91119c01 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 14:48:11 -0400 Subject: Tweak large file CPPFLAGS --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 24dbaf2e9..684a2a830 100644 --- a/configure.ac +++ b/configure.ac @@ -948,9 +948,9 @@ 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"yes" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS" -test x"$ac_cv_sys_largefile_source" = x"yes" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS" -test x"$ac_cv_sys_large_files" = x"yes" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS" +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 ------- -- cgit v1.2.3 From 379cc3bc5b9230d503b90c6bba58a89c8c515e06 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 14:48:19 -0400 Subject: Remove a stray trailing backslash --- src/libw32dll/dmo/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am index 56bfc8f34..531a4559a 100644 --- a/src/libw32dll/dmo/Makefile.am +++ b/src/libw32dll/dmo/Makefile.am @@ -1,8 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer \ -AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS \ - -I$(srcdir)/.. -I$(srcdir)/../wine +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 \ -- cgit v1.2.3 From 34c058509eb1c04fc68082c56ff945fd1b320698 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 May 2007 13:56:12 +0100 Subject: Fix some m4 quoting mistakes which were breaking a Perl script. --- m4/package.m4 | 4 ++-- m4/xine.m4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/m4/package.m4 b/m4/package.m4 index 764f70d45..765b286eb 100644 --- a/m4/package.m4 +++ b/m4/package.m4 @@ -1,7 +1,7 @@ dnl _ACX_VERSION_PARSE(version) AC_DEFUN([_ACX_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v; -my @v = split(" ", $v); $v = $v[$#v]; $v =~ s/[^0-9.].*$//; @v = split (/\./, $v); -push @v, 0 while $#v < 2; print $v[0] * 10000 + $v[1] * 100 + $v[2], "\n"'`]) +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], [ diff --git a/m4/xine.m4 b/m4/xine.m4 index a78c678a4..cf64ec022 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -25,8 +25,8 @@ dnl dnl _XINE_VERSION_PARSE(version) AC_DEFUN([_XINE_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v; -my @v = split(" ", $v); $v = $v[$#v]; $v =~ s/[^0-9.].*$//; @v = split (/\./, $v); -push @v, 0 while $#v < 2; print $v[0] * 10000 + $v[1] * 100 + $v[2], "\n"'`]) +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 _XINE_VERSION_CHECK(required, actual) -- cgit v1.2.3 From 06dd80cd327f1b264b033be4817a9cf3c2b68561 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 May 2007 14:38:54 +0100 Subject: Update gettext files. Fixes an install target failure. po/Makefile.in.in was depending on mkinstalldirs, which is no longer installed. --- config.rpath | 133 ++++++++++++++-------- m4/gettext/gettext.m4 | 280 +++++++++++++---------------------------------- m4/gettext/lib-link.m4 | 115 +++++++++++++++++-- m4/gettext/lib-prefix.m4 | 40 ++++++- m4/gettext/nls.m4 | 24 +--- m4/gettext/po.m4 | 83 +++++++------- po/Makefile.in.in | 55 ++++++---- 7 files changed, 380 insertions(+), 350 deletions(-) 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 , 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/m4/gettext/gettext.m4 b/m4/gettext/gettext.m4 index 624a80785..91c345e99 100644 --- a/m4/gettext/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 , 1995-2000. -dnl Bruno Haible , 2000-2003. +dnl Bruno Haible , 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 -]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 +$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 -]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 -]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 ]) - gt_CHECK_DECL(_snwprintf, [#include ]) - - 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 ]) - gt_CHECK_DECL(fgets_unlocked, [#include ]) - gt_CHECK_DECL(getc_unlocked, [#include ]) - - 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 ], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [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 ], [CFLocaleCopyCurrent();], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [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/gettext/lib-link.m4 b/m4/gettext/lib-link.m4 index ea0b0c4ea..f95b7ba88 100644 --- a/m4/gettext/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/gettext/lib-prefix.m4 b/m4/gettext/lib-prefix.m4 index 0d895ca63..a8684e17e 100644 --- a/m4/gettext/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, @@ -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/gettext/nls.m4 b/m4/gettext/nls.m4 index 2082c3b24..7967cc2f9 100644 --- a/m4/gettext/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/gettext/po.m4 b/m4/gettext/po.m4 index f2795eea0..00133ef36 100644 --- a/m4/gettext/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/po/Makefile.in.in b/po/Makefile.in.in index 582cfc0a5..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 +# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper # # 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,8 +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 + && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: -- cgit v1.2.3 From 8eaa99a6b4fe6cee141b06430f48747e4f435e1b Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 May 2007 14:39:08 +0100 Subject: Add a diff showing the changes from gettext default Makefile.in.in. --- po/Makefile.in.in.diff | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 po/Makefile.in.in.diff 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)' \ -- cgit v1.2.3 From 5da77351d0e7edf28d5f6118207df609f52abd06 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 17 May 2007 17:21:18 -0400 Subject: Add missing LIBCDIO_LIBS to the list of linked libraries --- src/input/vcd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 1f03720cb..873f1d54a 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -13,5 +13,5 @@ noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h xineplug_LTLIBRARIES = xineplug_inp_vcd.la xineplug_inp_vcd_la_SOURCES = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c -xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm +xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBCDIO_LIBS) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm xineplug_inp_vcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) -- cgit v1.2.3 From 171e2f880e22241465808dd758e64415c1972aaf Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 17 May 2007 17:21:39 -0400 Subject: Mac OS X universal binary build cleanups --- configure.ac | 2 +- lib/os_internal.h | 89 +++++++++++++++++++++++-------------------------------- m4/decoders.m4 | 2 ++ 3 files changed, 40 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index 684a2a830..8eaa270ce 100644 --- a/configure.ac +++ b/configure.ac @@ -803,7 +803,7 @@ AC_SUBST(PASS2_CFLAGS) test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)' AC_SUBST(DEFAULT_OCFLAGS) -if test x"$arch_x86" = x"yes"; then +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 diff --git a/lib/os_internal.h b/lib/os_internal.h index e461b5581..49b9330e5 100644 --- a/lib/os_internal.h +++ b/lib/os_internal.h @@ -8,72 +8,57 @@ */ #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 */ +#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 #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__ */ diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 9f9ae9aeb..58d1c56e5 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -253,6 +253,8 @@ use internal ffmpeg. 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]) ;; -- cgit v1.2.3 From ac2214417e3fb82f7763c6c0b4ae1a8cf524ba65 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 17 May 2007 18:16:54 -0400 Subject: Fix samba configuration test --- m4/input.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/input.m4 b/m4/input.m4 index b9b2e82d7..2d77f9521 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -77,7 +77,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ [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_libsmbclient=yes LIBSMBCLIENT_LIBS="-lsmbclient"])]) + [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]) -- cgit v1.2.3 From eed24f925552d30861d132fa26278b2fa2d0c4dd Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 May 2007 23:50:10 +0100 Subject: Fix OSS audio configuration test. --- m4/audio_out.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 53b719991..cdfe8b65d 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -198,7 +198,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_MSG_ERROR([OSS support requested, but OSS not found]) fi fi - AM_CONDITIONAL([ENABLE_OSS], [test x"$have_ossaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_OSS], [test x"$have_oss" = x"yes"]) dnl PulseAudio -- cgit v1.2.3 From 67e50b140e5cebdb516d65b15e5ea0fc2faefc5a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 18 May 2007 00:28:21 +0100 Subject: Cope with library paths for XvMC and XxMC (and Xv, just in case) being null. I was seeing '-L -lxvmc', which was resulting in linkage failures (unresolved symbols) at configure time. --- m4/video_out.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/video_out.m4 b/m4/video_out.m4 index a0ab163fa..4a0a37787 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -406,7 +406,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ 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="-L$xv_try_path -lXv" ;; + *.$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], []) @@ -454,7 +454,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ ac_save_LIBS="$LIBS" dnl Check for xxmc - XXMC_LIBS="-L$with_xxmc_path -l$with_xxmc_lib" + 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([]) @@ -479,7 +479,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ fi dnl Check for xvmc - XVMC_LIBS="-L$with_xvmc_path -l$with_xvmc_lib" + 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([]) -- cgit v1.2.3 From 9967f3de4643ff3d65decbe813a93fc6e482235e Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 18 May 2007 00:59:29 +0100 Subject: Add summary info for vdr; build plugins if DVB is enabled (no point otherwise). Valid so long as remote vdr support is not present (a patch exists for this). --- m4/summary.m4 | 3 ++- src/vdr/Makefile.am | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/m4/summary.m4 b/m4/summary.m4 index 161400d50..f1d1b8457 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -24,7 +24,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ else echo " - dvd (internal libs)" fi - test x"$have_dvb" = x"yes" && echo " - dvb" + 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" @@ -167,6 +167,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ 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" 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) -- cgit v1.2.3 From 5ecd214cddf18cc0542f4318f5ae85820e422237 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 18 May 2007 02:17:25 +0100 Subject: Re-enable syncfb in .debs, but only when building for Linux. --- debian/rules | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/rules b/debian/rules index 92b42b66c..8247e8ff7 100755 --- a/debian/rules +++ b/debian/rules @@ -58,6 +58,11 @@ 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 \ --mandir=\$${prefix}/share/man \ -- cgit v1.2.3 From b9cedf245ca748915c739f9c9d14457cdf956a56 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 18 May 2007 12:39:25 -0400 Subject: Work around missing pthread_mutex_timedlock() as necessary --- configure.ac | 7 +++++++ lib/os_internal.h | 9 ++++++++- lib/timedlock.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 lib/timedlock.c diff --git a/configure.ac b/configure.ac index a810796de..10fd9116b 100644 --- a/configure.ac +++ b/configure.ac @@ -889,6 +889,13 @@ AC_CHECK_FUNC([opendir], 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 ])], + [AC_LIBOBJ([timedlock])]) +LIBS="$ac_save_LIBS" + dnl -------------------------- dnl checks for system services diff --git a/lib/os_internal.h b/lib/os_internal.h index 49b9330e5..b618b3952 100644 --- a/lib/os_internal.h +++ b/lib/os_internal.h @@ -79,7 +79,7 @@ #endif #include - +#include #if defined(WIN32) || defined(__CYGWIN__) # define XINE_PATH_SEPARATOR_STRING ";" @@ -193,6 +193,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 + +#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; +} -- cgit v1.2.3 From 7bc7d9e476466774ad06c1bcf0f4fb54cb73a931 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 18 May 2007 13:49:03 -0400 Subject: Add README.macosx for information on Mac OS X support --- doc/Makefile.am | 2 +- doc/README | 3 ++ doc/README.macosx | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 doc/README.macosx 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. -- cgit v1.2.3 From b5b003ebba912f0047ed41696a6efcad6d4eedb9 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Fri, 18 May 2007 18:58:47 -0400 Subject: Add back accidentally removed #undef of HOST_ARCH for universal builds --- lib/os_internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/os_internal.h b/lib/os_internal.h index b618b3952..1e536b9fa 100644 --- a/lib/os_internal.h +++ b/lib/os_internal.h @@ -9,6 +9,7 @@ #if defined(__APPLE__) && defined(XINE_MACOSX_UNIVERSAL_BINARY) /* __ppc__, __ppc64__, __i386__, __x86_64__ are interesting arch macros */ +#undef HOST_ARCH #if defined(__ppc__) || defined(__ppc64__) #define ARCH_PPC #if defined(__ppc64__) -- cgit v1.2.3 From e734650e1161e7cc30141f3d665ea15c015d3e87 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 19 May 2007 05:07:26 -0400 Subject: Input plugins: Enable vcd, but disable vcdo by default except on FreeBSD, Linux, and Solaris. There's no explicit option to enable or disable vcdo, and it's built if the platform supports it and vcd is enabled. --- m4/input.m4 | 13 +++++++++---- m4/summary.m4 | 14 +++++++++++--- src/input/Makefile.am | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/m4/input.m4 b/m4/input.m4 index 2d77f9521..76ad12ad9 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -13,7 +13,8 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ default_enable_gnomevfs=enable default_enable_samba=enable default_enable_v4l=disable - default_enable_vcd=disable + default_enable_vcd=enable + default_enable_vcdo=disable default_with_internal_vcdlibs=without @@ -27,15 +28,15 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ default_enable_samba=disable ;; freebsd*) - default_enable_vcd=enable + default_enable_vcdo=enable ;; linux*) default_enable_dvb=enable default_enable_v4l=enable - default_enable_vcd=enable + default_enable_vcdo=enable ;; solaris*) - default_enable_vcd=enable + default_enable_vcdo=enable ;; esac @@ -262,6 +263,9 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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) @@ -272,4 +276,5 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ 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/summary.m4 b/m4/summary.m4 index f1d1b8457..792c5d319 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -13,10 +13,18 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - http - mms" echo " - pnm - rtsp" if test x"$enable_vcd" != x"no"; then - if test x"$with_internal_vcdlibs" = x"no"; then - echo " - vcdo - vcd (external libs)" + 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 - echo " - vcdo - vcd (internal libs)" + 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 diff --git a/src/input/Makefile.am b/src/input/Makefile.am index b1cd89bb5..f9f9a9fb8 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -30,7 +30,7 @@ if ENABLE_DVB in_dvb = xineplug_inp_dvb.la endif -if ENABLE_VCD +if ENABLE_VCDO in_vcd = xineplug_inp_vcdo.la endif -- cgit v1.2.3 From 8c8cafbee898ae4fb2ad7bd048a721b5994ad16c Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 19 May 2007 15:39:55 -0400 Subject: Optimization flag fixes for building with --enable-debug --- configure.ac | 12 ++++----- src/post/deinterlace/plugins/Makefile.am | 40 +++++++++++++++--------------- src/post/goom/Makefile.am | 42 ++++++++++++++++---------------- src/post/planar/Makefile.am | 22 ++++++++--------- 4 files changed, 56 insertions(+), 60 deletions(-) diff --git a/configure.ac b/configure.ac index 10fd9116b..4b012a868 100644 --- a/configure.ac +++ b/configure.ac @@ -761,6 +761,10 @@ if test "x$has_vis" = "xyes"; then 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 @@ -769,14 +773,8 @@ AC_ARG_ENABLE([optimizations], [], [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 - O1_CFLAGS="$O0_CLFAGS" - O2_CFLAGS="$O0_CFLAGS" - O3_CFLAGS="$O0_CFLAGS" + DEFAULT_OCFLAGS='$(O0_CFLAGS)' else - O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags" - O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags" - O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags" - dnl For multi-pass compilation: never when cross-compiling if test x"$cross_compiling" != x"yes"; then if test x"$GCC" = x"yes"; then diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index c04c3b7b2..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 \ @@ -30,29 +35,24 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ noinst_HEADERS = plugins.h greedyhmacros.h -# 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 +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 -libdeinterlacepluginsO1_la_CFLAGS = $(AM_CFLAGS) $(O1_CFLAGS) - -libdeinterlaceplugins_la_SOURCES = \ - double.c \ - greedy.c \ - linear.c \ - linearblend.c \ - vfir.c \ - weave.c \ - greedy2frame.c \ - scalerbob.c \ - kdetv_tomsmocomp.c -libdeinterlaceplugins_la_LIBADD = libdeinterlacepluginsO1.la $(XINE_LIB) -libdeinterlaceplugins_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_OCFLAGS) +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 eeed54697..40636736c 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -1,20 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -AM_LDFLAGS = $(xineplug_ldflags) - -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 ARCH_PPC @@ -22,12 +8,8 @@ xinepost_LTLIBRARIES = xineplug_post_goom.la #AM_CPPFLAGS = -DCPU_POWERPC #endif -xineplug_post_goom_la_SOURCES = mmx.c xmmx.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 +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 \ @@ -35,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/planar/Makefile.am b/src/post/planar/Makefile.am index a4e8cb825..5d6da97cd 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -1,14 +1,12 @@ include $(top_srcdir)/misc/Makefile.common -# -fomit-frame-pointer is always needed. it might cause debug to not -# work, but at least it compiles. -AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer +AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags) AM_CPPFLAGS = -AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) +AM_LDFLAGS = if WITH_EXTERNAL_FFMPEG postproc_lib = $(FFMPEG_POSTPROC_LIBS) -ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) +ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) else AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \ @@ -20,13 +18,13 @@ $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a: $(MAKE) -C $(top_builddir)/contrib ffmpeg/libavutil/libavutil.a endif -# 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) + 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) -- cgit v1.2.3 From 36e8f54380b6f5736ed6052655b546e5804b99f3 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 20 May 2007 16:04:56 +0100 Subject: Fix missing trailing "\"s. --- m4/gettext/Makefile.am | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/m4/gettext/Makefile.am b/m4/gettext/Makefile.am index 1ea9db48c..d5f2fe6f0 100644 --- a/m4/gettext/Makefile.am +++ b/m4/gettext/Makefile.am @@ -1,32 +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 + 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 -- cgit v1.2.3 From 9c5950b73129a2a4d3e0ae2e81737845277971cb Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 23 May 2007 17:52:03 +0100 Subject: Missing "fi". --- m4/xine.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/xine.m4 b/m4/xine.m4 index cf64ec022..9aac9da6a 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -99,6 +99,7 @@ AC_DEFUN([AM_PATH_XINE], [ *** 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 AC_SUBST(XINE_CFLAGS) AC_SUBST(XINE_LIBS) -- cgit v1.2.3 From f949be5176b4092f1a65daa2d486b87af4e8b2c8 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 23 May 2007 17:52:23 +0100 Subject: Fix reversed version comparison. --- m4/xine.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/xine.m4 b/m4/xine.m4 index 9aac9da6a..336a2d7d2 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -35,7 +35,7 @@ AC_DEFUN([_XINE_VERSION_CHECK], [ 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 -ge $actual_version_parsed; then + if test $required_version_parsed -le $actual_version_parsed; then ifelse([$3], , [:], [$3]) else ifelse([$4], , [:], [$4]) -- cgit v1.2.3 From 9c065e76536c058a2d6c083879f7c9d2898f7780 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Thu, 24 May 2007 10:58:51 -0400 Subject: Fix reversed version comparison. --- m4/package.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/package.m4 b/m4/package.m4 index 765b286eb..69f721440 100644 --- a/m4/package.m4 +++ b/m4/package.m4 @@ -9,7 +9,7 @@ AC_DEFUN([ACX_VERSION_CHECK], [ 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 -ge $actual_version_parsed; then + if test $required_version_parsed -le $actual_version_parsed; then ifelse([$3], , [:], [$3]) else ifelse([$4], , [:], [$4]) -- cgit v1.2.3 From adebccc0fc011b6d1abe2f682bbfc866dffee73e Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 31 May 2007 02:28:46 +0100 Subject: Link libiso9660 into the vcd plugin. Fixes a run-time symbol lookup failure. --- src/input/vcd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 873f1d54a..3de899f7e 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -13,5 +13,5 @@ noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h xineplug_LTLIBRARIES = xineplug_inp_vcd.la 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) -lm +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) -- cgit v1.2.3