source: auto/options @ 9a36761

Last change on this file since 9a36761 was 9a36761, checked in by Mateusz Hromada <ruanda@…>, 15 years ago

Migration to new build system.

  • documentation moved and checked
  • Property mode set to 100755
File size: 8.0 KB
Line 
1#!/bin/sh
2
3help=no
4quiet=no
5
6if [ -z "$PROJECT_NAME" ];      then PROJECT_NAME=$DEFAULT_PROJECT_NAME;            fi
7if [ -z "$PROJECT_FULLNAME" ]then PROJECT_FULLNAME=$DEFAULT_PROJECT_FULLNAME;    fi
8if [ -z "$PROJECT_COPYRIGHT" ]; then PROJECT_COPYRIGHT=$DEFAULT_PROJECT_COPYRIGHTfi
9if [ -z "$PROJECT_VERSION" ];   then PROJECT_VERSION=$DEFAULT_PROJECT_VERSION;      fi
10if [ -z "$PROJECT_PAGE" ];      then PROJECT_PAGE=$DEFAULT_PROJECT_PAGE;            fi
11if [ -z "$PROJECT_MAIL" ];      then PROJECT_MAIL=$DEFAULT_PROJECT_MAIL;            fi
12
13if [ -z "$SHELL" ];             then SHELL=$DEFAULT_SHELL;                          fi
14if [ -z "$CC" ];                then CC=$DEFAULT_CC;                                fi
15if [ -z "$BISON" ];             then BISON=$DEFAULT_BISON;                          fi
16if [ -z "$FLEX" ];              then FLEX=$DEFAULT_FLEX;                            fi
17if [ -z "$RM" ];                then RM=$DEFAULT_RM;                                fi
18if [ -z "$RMDIR" ];             then RMDIR=$DEFAULT_RMDIR;                          fi
19if [ -z "$TEST" ];              then TEST=$DEFAULT_TEST;                            fi
20if [ -z "$MAKE" ];              then MAKE=$DEFAULT_MAKE;                            fi
21if [ -z "$GREP" ];              then GREP=$DEFAULT_GREP;                            fi
22if [ -z "$CUT" ];               then CUT=$DEFAULT_CUT;                              fi
23if [ -z "$SORT" ];              then SORT=$DEFAULT_SORT;                            fi
24if [ -z "$PR" ];                then PR=$DEFAULT_PR;                                fi
25if [ -z "$CP" ];                then CP=$DEFAULT_CP;                                fi
26if [ -z "$CHMOD" ];             then CHMOD=$DEFAULT_CHMOD;                          fi
27if [ -z "$MAKEINFO" ];          then MAKEINFO=$DEFAULT_MAKEINFO;                    fi
28if [ -z "$TEXI2DVI" ];          then TEXI2DVI=$DEFAULT_TEXI2DVI;                    fi
29if [ -z "$TEXI2PDF" ];          then TEXI2PDF=$DEFAULT_TEXI2PDF;                    fi
30if [ -z "$DVIPS" ];             then DVIPS=$DEFAULT_DVIPS;                          fi
31
32if [ -z "$CFLAGS" ];            then CFLAGS=$DEFAULT_CFLAGS;                        fi
33if [ -z "$LDFLAGS" ];           then LDFLAGS=$DEFAULT_LDFLAGS;                      fi
34if [ -z "$LDLIBS" ];            then LDLIBS=$DEFAULT_LDLIBS;                        fi
35if [ -z "$BFLAGS" ];            then BFLAGS=$DEFAULT_BFLAGS;                        fi
36if [ -z "$FFLAGS" ];            then FFLAGS=$DEFAULT_FFLAGS;                        fi
37
38if [ -z "$DESTDIR" ];           then DESTDIR=$DEFAULT_DESTDIR;                      fi
39
40if [ -z "$prefix" ];            then prefix=$DEFAULT_prefix;                        fi
41if [ -z "$exec_prefix" ];       then exec_prefix=$DEFAULT_exec_prefix;              fi
42if [ -z "$bindir" ];            then bindir=$DEFAULT_bindir;                        fi
43if [ -z "$sbindir" ];           then sbindir=$DEFAULT_sbindir;                      fi
44if [ -z "$datarootdir" ];       then datarootdir=$DEFAULT_datarootdir;              fi
45if [ -z "$datadir" ];           then datadir=$DEFAULT_datadir;                      fi
46if [ -z "$sysconfdir" ];        then sysconfdir=$DEFAULT_sysconfdir;                fi
47if [ -z "$sharedstatedir" ];    then sharedstatedir=$DEFAULT_sharedstatedir;        fi
48if [ -z "$localstatedir" ];     then localstatedir=$DEFAULT_localstatedir;          fi
49
50for option
51do
52  case "$option" in
53    -*=*) value=$(echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//')  ;;
54    *=*)  value=$(echo "$option" | sed -e 's/[_A-Z0-9]*=//')      ;;
55    *)    value=""                                                ;;
56  esac
57
58  case "$option" in
59    --help)             help=yes                                  ;;
60    --quiet)            quiet=yes                                 ;;
61
62    --prefix=*)         prefix="$value"                           ;;
63    --exec-prefix=*)    exec_prefix="$value"                      ;;
64    --bindir=*)         bindir="$value"                           ;;
65    --sbindir=*)        sbindir="$value"                          ;;
66    --datarootdir=*)    datarootdir="$value"                      ;;
67    --datadir=*)        datadir="$value"                          ;;
68    --sysconfdir=*)     sysconfdir="$value"                       ;;
69    --sharedstatedir=*) sharedstatedir="$value"                   ;;
70    --localstatedir=*)  localstatedir="$value"                    ;;
71
72    SHELL=*)            SHELL="$value"                            ;;
73    CC=*)               CC="$value"                               ;;
74    BISON=*)            BISON="$value"                            ;;
75    FLEX=*)             FLEX="$value"                             ;;
76    RM=*)               RM="$value"                               ;;
77    RMDIR=*)            RMDIR="$value"                            ;;
78    TEST=*)             TEST="$value"                             ;;
79    MAKE=*)             MAKE="$value"                             ;;
80    GREP=*)             GREP="$value"                             ;;
81    CUT=*)              CUT="$value"                              ;;
82    SORT=*)             SORT="$value"                             ;;
83    PR=*)               PR="$value"                               ;;
84    CP=*)               CP="$value"                               ;;
85    CHMOD=*)            CHMOD="$value"                            ;;
86    MAKEINFO=*)         MAKEINFO="$value"                         ;;
87    TEXI2DVI=*)         TEXI2DVI="$value"                         ;;
88    TEXI2PDF=*)         TEXI2PDF="$value"                         ;;
89    DVIPS=*)            DVIPS="$value"                            ;;
90
91
92    CFLAGS=*)           CFLAGS="$value"                           ;;
93    LDFLAGS=*)          LDFLAGS="$value"                          ;;
94    LDLIBS=*)           LDLIBS="$value"                           ;;
95    BFLAGS=*)           BFLAGS="$value"                           ;;
96    FFLAGS=*)           FFLAGS="$value"                           ;;
97  esac
98done
99
100if [ "$help" = "yes" ]; then
101
102cat << HELP_END
103
104Configure script for $PROJECT_NAME $PROJECT_VERSION to adapt to many kinds of systems.
105
106Usage:
107
108  ./configure [OPTION]... [VAR=VALUE]...
109
110To assign environment variables (e.g., CC, CFLAGS...), specify them as
111VAR=VALUE.  See below for descriptions of some of the useful variables.
112
113Options:
114
115  --help                display this help and exit
116
117Installation directories:
118
119  --prefix=PATH         install architecture-independent files in PATH
120  --exec-prefix=PATH    install architecture-dependent files in PATH
121
122Fine tuning of the installation directories:
123
124  --bindir=PATH         user executables
125  --sbindir=PATH        system admin executables
126  --datarootdir=PATH    read-only arch.-independent data root
127  --datadir=PATH        read-only architecture-independent data
128  --sysconfdir=PATH     read-only single-machine data
129  --sharedstatedir=PATH modifiable architecture-independent data
130  --localstatedir=PATH  modifiable single-machine data
131
132Some influential environment variables:
133
134  SHELL                 shell command
135  CC                    C compiler command
136  BISON                 Bison compiler command
137  RM                    rm command
138  RMDIR                 rmdir command
139  TEST                  test command
140  MAKE                  make command
141  GREP                  grep command
142  CUT                   cut command
143  SORT                  sort command
144  PR                    pr command
145  CP                    cp command
146  CHMOD                 chmod command
147  MAKEINFO              makeinfo command
148  TEXI2DVI              texi2dvi command
149  TEXI2PDF              texi2pdf command
150  DVIPS                 dvips command
151
152
153  CFLAGS                C compiler flags
154  LDFLAGS               linker flags, e.g. -L<lib dir> if you have
155                        libraries in a nonstandard directory <lib dir>
156  LDLIBS                libraries to pass to the linker, e.g. -l<library>
157  BFLAGS                Bison compiler flags
158  FFLAGS                Flex compiler flags
159
160Use these variables to override default values.
161
162Report bugs to <$PROJECT_MAIL>.
163More details at $PROJECT_PAGE.
164
165HELP_END
166
167  exit 1
168fi
169
Note: See TracBrowser for help on using the repository browser.