summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-27 14:26:57 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-27 14:26:57 +0000
commite565f780446be3b7fabe639778ad7085438e7a01 (patch)
treeff2aa435129e44403ef1076c4cd74baafdfb1dff /configure
parenta2fdc1955ce2711cd04e6583fc21bc039bdc6d08 (diff)
downloadmpv-e565f780446be3b7fabe639778ad7085438e7a01.tar.bz2
mpv-e565f780446be3b7fabe639778ad7085438e7a01.tar.xz
Document how configure works and how to write basic checks.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18318 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure49
1 files changed, 38 insertions, 11 deletions
diff --git a/configure b/configure
index db56ae3f6e..904f373c3f 100755
--- a/configure
+++ b/configure
@@ -8,19 +8,46 @@
# Cleanups all over the place (c) 2001 pl
#
#
-# Guidelines:
-# If the option is named 'opt':
-# _opt : should have a value in yes/no/auto
-# _def_opt : '#define ... 1' or '#undef ...' that is: some C code
-# _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option
-# _inc_opt : ' -I/path/dir/include '
+# This configure script is *not* autoconf-based and has different semantics.
+# It attempts to autodetect all settings and options where possible. It is
+# possible to override autodetection with the --enable-option/--disable-option
+# command line parameters. --enable-option forces the option on skipping
+# autodetection. Yes, this means that compilation may fail and yes, this is not
+# how autoconf-based configure scripts behave.
#
-# In this file, a tab is 8 chars and indentation shift is 2 characters
+# configure generates a series of configuration files:
+# - config.h contains #defines that are used in the C code.
+# - config.mak libvo/config.mak libao2/config.mak Gui/config.mak
+# and libaf/config.mak are included from the Makefiles.
#
-# GOTCHAS:
-# - config files are currently:
-# config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak
-# libaf/config.mak
+# If you want to add a new check for $feature, here is a simple skeleton:
+#
+# echocheck "$feature"
+# if "$_feature" = auto; then
+# cat > $TMPC << EOF
+# #include <feature.h>
+# int main(void) { return 0; }
+# EOF
+# _feature=no
+# cc_check && _feature=yes
+# if test "$_feature" = yes ; then
+# _def_feature='#define HAVE_FEATURE 1'
+# else
+# _def_feature='#undef HAVE_FEATURE'
+# fi
+# echores "$_feature"
+#
+# Furthermore you need to add the variable _feature to the list of default
+# settings and set it to one of yes/no/auto. Also add appropriate
+# --enable-feature/--disable-feature command line options.
+# The results of the check should be written to config.h and config.mak
+# at the end of this script. The variable names used for this should be
+# uniform, i.e. if the option is named 'feature':
+#
+# _feature : should have a value of yes/no/auto
+# _def_feature : '#define ... 1' or '#undef ...' for conditional compilation
+# _ld_feature : '-L/path/dir -lfeature' GCC options
+# _inc_feature : '-I/path/dir/include' extra include paths
#
#############################################################################