aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-01-28 14:52:34 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-01-28 14:52:34 +0000
commita8721c0930361f66f79fd35eb673fc45ae5b1b07 (patch)
tree491f1ea1a774c18338d8288bcd5f0a2b0e9d96eb /configure
parentea937d01410f07badd6e39b9079205c5ea40a9e4 (diff)
downloadffmpeg-a8721c0930361f66f79fd35eb673fc45ae5b1b07.tar.gz
make consistent decisions for dlopen/dlfcn and vhook
Originally committed as revision 1520 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure97
1 files changed, 49 insertions, 48 deletions
diff --git a/configure b/configure
index 11e2fb4f05..78048edd8b 100755
--- a/configure
+++ b/configure
@@ -68,7 +68,7 @@ lshared="no"
extralibs="-lm"
simpleidct="yes"
bigendian="no"
-vhook="no"
+vhook="default"
dlfcn="no"
dlopen="no"
mpegaudio_hp="yes"
@@ -238,53 +238,6 @@ if test -z "$source_path" -o "$source_path" = "." ; then
source_path_used="no"
fi
-cat > $TMPC << EOF
-#include <dlfcn.h>
-int main( void ) { return (int) dlopen("foo", 0); }
-EOF
-
-ldl=-ldl
-
-if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
-vhook=yes
-dlfcn=yes
-dlopen=yes
-fi
-
-if $cc -o $TMPE $TMPC 2> /dev/null ; then
-vhook=yes
-dlfcn=yes
-dlopen=yes
-ldl=""
-fi
-
-cat > $TMPC << EOF
-int main( void ) { return (int) dlopen("foo", 0); }
-EOF
-
-if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
-vhook=yes
-dlopen=yes
-fi
-
-if $cc -o $TMPE $TMPC 2> /dev/null ; then
-vhook=yes
-dlopen=yes
-ldl=""
-fi
-
-
-cat > $TMPC << EOF
-#include <X11/Xlib.h>
-#include <Imlib2.h>
-int main( void ) { return (int) imlib_load_font("foo"); }
-EOF
-
-imlib2=no
-if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
-imlib2=yes
-fi
-
for opt do
case "$opt" in
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
@@ -545,6 +498,54 @@ if $cc -o $TMPO $TMPC 2> /dev/null ; then
builtin_vector=yes
fi
+# dlopen/dlfcn.h probing
+
+cat > $TMPC << EOF
+#include <dlfcn.h>
+int main( void ) { return (int) dlopen("foo", 0); }
+EOF
+
+ldl=-ldl
+
+if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
+dlfcn=yes
+dlopen=yes
+fi
+
+if $cc -o $TMPE $TMPC 2> /dev/null ; then
+dlfcn=yes
+dlopen=yes
+ldl=""
+fi
+
+cat > $TMPC << EOF
+int main( void ) { return (int) dlopen("foo", 0); }
+EOF
+
+if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
+dlopen=yes
+fi
+
+if $cc -o $TMPE $TMPC 2> /dev/null ; then
+dlopen=yes
+ldl=""
+fi
+
+if test "$vhook" = "default" ; then
+ vhook="$dlopen"
+fi
+
+cat > $TMPC << EOF
+#include <X11/Xlib.h>
+#include <Imlib2.h>
+int main( void ) { return (int) imlib_load_font("foo"); }
+EOF
+
+imlib2=no
+if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
+imlib2=yes
+fi
+
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF