Mercurial > mplayer.hg
comparison configure @ 18317:2b78ad4401e1
Document how configure works and how to write basic checks.
author | diego |
---|---|
date | Thu, 27 Apr 2006 14:26:57 +0000 |
parents | 39f1bc23b65e |
children | 0ebc285b31a2 |
comparison
equal
deleted
inserted
replaced
18316:b3be7df634b0 | 18317:2b78ad4401e1 |
---|---|
6 # History / Contributors: check the cvs log ! | 6 # History / Contributors: check the cvs log ! |
7 # | 7 # |
8 # Cleanups all over the place (c) 2001 pl | 8 # Cleanups all over the place (c) 2001 pl |
9 # | 9 # |
10 # | 10 # |
11 # Guidelines: | 11 # This configure script is *not* autoconf-based and has different semantics. |
12 # If the option is named 'opt': | 12 # It attempts to autodetect all settings and options where possible. It is |
13 # _opt : should have a value in yes/no/auto | 13 # possible to override autodetection with the --enable-option/--disable-option |
14 # _def_opt : '#define ... 1' or '#undef ...' that is: some C code | 14 # command line parameters. --enable-option forces the option on skipping |
15 # _ld_opt : ' -L/path/dir -lopt ' that is: some GCC option | 15 # autodetection. Yes, this means that compilation may fail and yes, this is not |
16 # _inc_opt : ' -I/path/dir/include ' | 16 # how autoconf-based configure scripts behave. |
17 # | 17 # |
18 # In this file, a tab is 8 chars and indentation shift is 2 characters | 18 # configure generates a series of configuration files: |
19 # - config.h contains #defines that are used in the C code. | |
20 # - config.mak libvo/config.mak libao2/config.mak Gui/config.mak | |
21 # and libaf/config.mak are included from the Makefiles. | |
19 # | 22 # |
20 # GOTCHAS: | 23 # If you want to add a new check for $feature, here is a simple skeleton: |
21 # - config files are currently: | 24 # |
22 # config.h config.mak libvo/config.mak libao2/config.mak Gui/config.mak | 25 # echocheck "$feature" |
23 # libaf/config.mak | 26 # if "$_feature" = auto; then |
27 # cat > $TMPC << EOF | |
28 # #include <feature.h> | |
29 # int main(void) { return 0; } | |
30 # EOF | |
31 # _feature=no | |
32 # cc_check && _feature=yes | |
33 # if test "$_feature" = yes ; then | |
34 # _def_feature='#define HAVE_FEATURE 1' | |
35 # else | |
36 # _def_feature='#undef HAVE_FEATURE' | |
37 # fi | |
38 # echores "$_feature" | |
39 # | |
40 # Furthermore you need to add the variable _feature to the list of default | |
41 # settings and set it to one of yes/no/auto. Also add appropriate | |
42 # --enable-feature/--disable-feature command line options. | |
43 # The results of the check should be written to config.h and config.mak | |
44 # at the end of this script. The variable names used for this should be | |
45 # uniform, i.e. if the option is named 'feature': | |
46 # | |
47 # _feature : should have a value of yes/no/auto | |
48 # _def_feature : '#define ... 1' or '#undef ...' for conditional compilation | |
49 # _ld_feature : '-L/path/dir -lfeature' GCC options | |
50 # _inc_feature : '-I/path/dir/include' extra include paths | |
24 # | 51 # |
25 ############################################################################# | 52 ############################################################################# |
26 | 53 |
27 # Prevent locale nonsense from breaking basic text processing utils | 54 # Prevent locale nonsense from breaking basic text processing utils |
28 LC_ALL=C | 55 LC_ALL=C |