FreeBSD patches and sdl detection, again
jali at chiller.be
jali at chiller.be
Wed Jul 25 19:54:52 CEST 2001
--- configure.orig Wed Jul 25 19:17:54 2001
+++ configure Wed Jul 25 19:27:57 2001
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
@@ -10,6 +10,7 @@
# Defaults:
ac_help=
ac_default_prefix=/usr/local
+
# Any additions from configure.in:
ac_help="$ac_help
--disable-ppro Disable PentiumPro optimizations (default enabled for x86)"
@@ -108,6 +109,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
+#Define OS
+system_name=`uname -s 2>&1` # detects OS: FreeBSD, Linux etc
+
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
@@ -4035,107 +4039,39 @@ fi
# Check whether --with-sdl or --without-sdl was given.
-if test "${with_sdl+set}" = set; then
- withval="$with_sdl"
- if test "x$withval" != "xno";
- then
- PLUGINS="${PLUGINS} sdl";
- if test "x$withval" != "xyes";
- then
- LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
- CFLAGS_SDL="-I"$withval"/include"
- else
- for ac_hdr in SDL/SDL.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4053: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4058 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-echo "Cannot find SDL headers !"; exit
-fi
-done
-
- LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
- fi
- fi
-fi
-
- if test "x$withval" = "x";
- then
- for ac_hdr in SDL/SDL.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4101: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4106 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- PLUGINS="${PLUGINS} sdl"
- LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- fi
+SDL="no"
+withval="$with_sdl"
+if test "x$withval" = "xno"; then
+ echo "checking for sdl-config... no"
+ else
+ if test "$system_name" = "FreeBSD" ; then
+ CONFIG_SDL='sdl11-config'
+ else
+ CONFIG_SDL='sdl-config'
+ fi
+ if test -z "`($CONFIG_SDL --version) 2>/dev/null`" ;then
+ if test "$withval" = "yes"; then
+ echo ""
+ echo "sdl-config could not be found. Please install it"
+ echo "and remove the --with-sdl configure argument."
+ echo "libSDL can be found at http://www.libsdl.org"
+ exit
+ fi
+ fi
+ if test ! -z "`($CONFIG_SDL --version) 2>/dev/null`" ;then
+ LIB_SDL="${LIB_SDL} `${CONFIG_SDL} --libs`"
+ CFLAGS_SDL=`${CONFIG_SDL} --cflags`
+ PLUGINS="${PLUGINS} sdl"
+ echo "checking for SDL... $CONFIG_SDL"
+ SDL="yes"
+ fi
+fi
+if test $SDL = "yes";then
+ if test $system_name = "FreeBSD"; then
+ perl -i -pe 's/SDL\/SDL\.h/SDL11\/SDL\.h/gi' plugins/sdl/vout_sdl.c plugins/sdl/aout_sdl.c
+ fi
+fi
# Check whether --with-directx or --without-directx was given.
if test "${with_directx+set}" = set; then
withval="$with_directx"
More information about the vlc-devel
mailing list