summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-22 22:31:48 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-22 22:31:48 +0000
commit37d08eb442b9bc48459b089a8abccba6f3e28ea3 (patch)
tree702804c3b63d738c4a95a3ce0ab3564dc162cb1c /configure.ac
parent62b1bb0c213c37b58e5a7bb8359f41168c34f817 (diff)
downloadxine-lib-37d08eb442b9bc48459b089a8abccba6f3e28ea3.tar.gz
xine-lib-37d08eb442b9bc48459b089a8abccba6f3e28ea3.tar.bz2
Move handling of Win32 codecs all in a single point of configure.ac rather than split in two. Check for GNU as (macro adapted from libtool's check for GNU ld), as for instance Apple's assembler is not going to compile the Win32 wrappers. When GNU as is not found and user hasn't requested win32 codecs support explicitely, skip over it; if user requested win32 codecs and GNU as is not found, bail out.
CVS patchset: 8740 CVS date: 2007/03/22 22:31:48
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac58
1 files changed, 30 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index 0d02bf8e4..45ebdf457 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,6 +109,7 @@ dnl ---------------------------------------------
AC_PROG_CC
AM_PROG_AS
+
case "$host_os" in
*darwin*)
AC_PROG_OBJC
@@ -1978,32 +1979,6 @@ fi
AM_CONDITIONAL([HAVE_WAVPACK], [test "x$have_wavpack" = "xyes"])
-dnl ---------------------------------------------
-dnl Win32 DLL codecs
-dnl ---------------------------------------------
-AC_ARG_ENABLE([w32dll],
- AC_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support]),
- enable_w32dll=$enableval, [
- AC_MSG_CHECKING([whether to enable Win32 DLL support])
- case "$host_or_hostalias" in
- *-mingw* | *-cygwin)
- enable_w32dll="no"
- ;;
- i?86-* | k?-* | athlon-* | pentium*-)
- enable_w32dll="yes"
- ;;
- *)
- enable_w32dll="no"
- esac
- AC_MSG_RESULT([$enable_w32dll])])
-AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" = "xyes")
-if test "x$enable_w32dll" = "xyes"; then
- W32DLL_DEP=""
-else
- W32DLL_DEP="#"
-fi
-AC_SUBST(W32DLL_DEP)
-
dnl --------------------------------------------
dnl Real binary codecs support
dnl --------------------------------------------
@@ -2450,10 +2425,37 @@ dnl ---------------------------------------------
dnl For win32 libraries location, needed by libw32dll.
dnl ---------------------------------------------
-AC_ARG_WITH(w32-path, AC_HELP_STRING([--with-w32-path=path], [location of WIN32 libraries]),
- w32_path="$withval", w32_path="/usr/lib/codecs")
+AC_ARG_WITH([w32-path],
+ AS_HELP_STRING([--with-w32-path=path], [location of Win32 binary codecs]),
+ [w32_path="$withval"], [w32_path="/usr/lib/codecs"])
AC_SUBST(w32_path)
+AC_ARG_ENABLE([w32dll],
+ AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support]),
+ , [enable_w32dll=$with_gnu_as])
+
+case $host in
+ *-mingw* | *-cygwin)
+ enable_w32dll="no" ;;
+ i?86-* | k?-* | athlon-* | pentium*-)
+ if test "x$enable_w32dll" != "xno"; then
+ CC_PROG_AS
+ fi
+ test "x$enable_w32dll" = "x" && \
+ enable_w32dll="$with_gnu_as"
+ ;;
+ *)
+ enable_w32dll="no" ;;
+esac
+
+if test "x$enable_w32dll" = "xyes" && \
+ test "x$with_gnu_as" = "xno"; then
+
+ AC_MSG_ERROR([You need GNU as to enable Win32 codecs support])
+fi
+
+AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" != "xno")
+
dnl ---------------------------------------------
dnl some include paths ( !!! DO NOT REMOVE !!! )