source: auto/options @ 2f8d6d8

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

Stadard targets added to Makefile. New targets:

  • install
  • install-*
  • uninstall
  • Property mode set to 100755
File size: 14.1 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 "$INSTALL" ];           then INSTALL=$DEFAULT_INSTALL;                      fi
14if [ -z "$SHELL" ];             then SHELL=$DEFAULT_SHELL;                          fi
15if [ -z "$CC" ];                then CC=$DEFAULT_CC;                                fi
16if [ -z "$BISON" ];             then BISON=$DEFAULT_BISON;                          fi
17if [ -z "$FLEX" ];              then FLEX=$DEFAULT_FLEX;                            fi
18if [ -z "$RM" ];                then RM=$DEFAULT_RM;                                fi
19if [ -z "$RMDIR" ];             then RMDIR=$DEFAULT_RMDIR;                          fi
20if [ -z "$TEST" ];              then TEST=$DEFAULT_TEST;                            fi
21if [ -z "$MAKE" ];              then MAKE=$DEFAULT_MAKE;                            fi
22if [ -z "$GREP" ];              then GREP=$DEFAULT_GREP;                            fi
23if [ -z "$CUT" ];               then CUT=$DEFAULT_CUT;                              fi
24if [ -z "$SORT" ];              then SORT=$DEFAULT_SORT;                            fi
25if [ -z "$PR" ];                then PR=$DEFAULT_PR;                                fi
26if [ -z "$CP" ];                then CP=$DEFAULT_CP;                                fi
27if [ -z "$CHMOD" ];             then CHMOD=$DEFAULT_CHMOD;                          fi
28if [ -z "$MAKEINFO" ];          then MAKEINFO=$DEFAULT_MAKEINFO;                    fi
29if [ -z "$TEXI2DVI" ];          then TEXI2DVI=$DEFAULT_TEXI2DVI;                    fi
30if [ -z "$TEXI2PDF" ];          then TEXI2PDF=$DEFAULT_TEXI2PDF;                    fi
31if [ -z "$DVIPS" ];             then DVIPS=$DEFAULT_DVIPS;                          fi
32
33if [ -z "$CFLAGS" ];            then CFLAGS=$DEFAULT_CFLAGS;                        fi
34if [ -z "$LDFLAGS" ];           then LDFLAGS=$DEFAULT_LDFLAGS;                      fi
35if [ -z "$LDLIBS" ];            then LDLIBS=$DEFAULT_LDLIBS;                        fi
36if [ -z "$BFLAGS" ];            then BFLAGS=$DEFAULT_BFLAGS;                        fi
37if [ -z "$FFLAGS" ];            then FFLAGS=$DEFAULT_FFLAGS;                        fi
38
39if [ -z "$DESTDIR" ];           then DESTDIR=$DEFAULT_DESTDIR;                      fi
40
41if [ -z "$prefix" ];            then prefix=$DEFAULT_prefix;                        fi
42if [ -z "$exec_prefix" ];       then exec_prefix=$DEFAULT_exec_prefix;              fi
43if [ -z "$bindir" ];            then bindir=$DEFAULT_bindir;                        fi
44if [ -z "$sbindir" ];           then sbindir=$DEFAULT_sbindir;                      fi
45if [ -z "$libexecdir" ];        then libexecdir=$DEFAULT_libexecdir;                fi
46if [ -z "$datarootdir" ];       then datarootdir=$DEFAULT_datarootdir;              fi
47if [ -z "$datadir" ];           then datadir=$DEFAULT_datadir;                      fi
48if [ -z "$sysconfdir" ];        then sysconfdir=$DEFAULT_sysconfdir;                fi
49if [ -z "$sharedstatedir" ];    then sharedstatedir=$DEFAULT_sharedstatedir;        fi
50if [ -z "$localstatedir" ];     then localstatedir=$DEFAULT_localstatedir;          fi
51if [ -z "$docdir" ];            then docdir=$DEFAULT_docdir;                        fi
52if [ -z "$infodir" ];           then infodir=$DEFAULT_infodir;                      fi
53if [ -z "$htmldir" ];           then htmldir=$DEFAULT_htmldir;                      fi
54if [ -z "$dvidir" ];            then dvidir=$DEFAULT_dvidir;                        fi
55if [ -z "$pdfdir" ];            then pdfdir=$DEFAULT_pdfdir;                        fi
56if [ -z "$psdir" ];             then psdir=$DEFAULT_psdir;                          fi
57if [ -z "$libdir" ];            then libdir=$DEFAULT_libdir;                        fi
58if [ -z "$localedir" ];         then localedir=$DEFAULT_localedir;                  fi
59if [ -z "$mandir" ];            then mandir=$DEFAULT_mandir;                        fi
60if [ -z "$man1dir" ];           then man1dir=$DEFAULT_man1dir;                      fi
61if [ -z "$man2dir" ];           then man2dir=$DEFAULT_man2dir;                      fi
62if [ -z "$man3dir" ];           then man3dir=$DEFAULT_man3dir;                      fi
63if [ -z "$man4dir" ];           then man4dir=$DEFAULT_man4dir;                      fi
64if [ -z "$man5dir" ];           then man5dir=$DEFAULT_man5dir;                      fi
65if [ -z "$man6dir" ];           then man6dir=$DEFAULT_man6dir;                      fi
66if [ -z "$man7dir" ];           then man7dir=$DEFAULT_man7dir;                      fi
67if [ -z "$man8dir" ];           then man8dir=$DEFAULT_man8dir;                      fi
68if [ -z "$man9dir" ];           then man9dir=$DEFAULT_man9dir;                      fi
69if [ -z "$manext" ];            then manext=$DEFAULT_manext;                        fi
70if [ -z "$man1ext" ];           then man1ext=$DEFAULT_man1ext;                      fi
71if [ -z "$man2ext" ];           then man2ext=$DEFAULT_man2ext;                      fi
72if [ -z "$man3ext" ];           then man3ext=$DEFAULT_man3ext;                      fi
73if [ -z "$man4ext" ];           then man4ext=$DEFAULT_man4ext;                      fi
74if [ -z "$man5ext" ];           then man5ext=$DEFAULT_man5ext;                      fi
75if [ -z "$man6ext" ];           then man6ext=$DEFAULT_man6ext;                      fi
76if [ -z "$man7ext" ];           then man7ext=$DEFAULT_man7ext;                      fi
77if [ -z "$man8ext" ];           then man8ext=$DEFAULT_man8ext;                      fi
78if [ -z "$man9ext" ];           then man9ext=$DEFAULT_man9ext;                      fi
79
80
81for option
82do
83  case "$option" in
84    -*=*) value=$(echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//')  ;;
85    *=*)  value=$(echo "$option" | sed -e 's/[_A-Z0-9]*=//')      ;;
86    *)    value=""                                                ;;
87  esac
88
89  case "$option" in
90    --help)             help=yes                                  ;;
91    --quiet)            quiet=yes                                 ;;
92
93    DESTDIR=*)          DESTDIR="$value"                          ;;
94    --prefix=*)         prefix="$value"                           ;;
95    --exec-prefix=*)    exec_prefix="$value"                      ;;
96    --bindir=*)         bindir="$value"                           ;;
97    --sbindir=*)        sbindir="$value"                          ;;
98    --libexecdir=*)     libexecdir="$value"                       ;;
99    --datarootdir=*)    datarootdir="$value"                      ;;
100    --datadir=*)        datadir="$value"                          ;;
101    --sysconfdir=*)     sysconfdir="$value"                       ;;
102    --sharedstatedir=*) sharedstatedir="$value"                   ;;
103    --localstatedir=*)  localstatedir="$value"                    ;;
104    --docdir=*)         docdir="$value"                           ;;
105    --infodir=*)        infodir="$value"                          ;;
106    --htmldir=*)        htmldir="$value"                          ;;
107    --dvidir=*)         dvidir="$value"                           ;;
108    --pdfdir=*)         pdfdir="$value"                           ;;
109    --psdir=*)          psdir="$value"                            ;;
110    --libdir=*)         libdir="$value"                           ;;
111    --localedir=*)      localedir="$value"                        ;;
112    --mandir=*)         mandir="$value"                           ;;
113    --man1dir=*)        man1dir="$value"                          ;;
114    --man2dir=*)        man2dir="$value"                          ;;
115    --man3dir=*)        man3dir="$value"                          ;;
116    --man4dir=*)        man4dir="$value"                          ;;
117    --man5dir=*)        man5dir="$value"                          ;;
118    --man6dir=*)        man6dir="$value"                          ;;
119    --man7dir=*)        man7dir="$value"                          ;;
120    --man8dir=*)        man8dir="$value"                          ;;
121    --man9dir=*)        man9dir="$value"                          ;;
122    --manext=*)         manext="$value"                           ;;
123    --man1ext=*)        man1ext="$value"                          ;;
124    --man2ext=*)        man2ext="$value"                          ;;
125    --man3ext=*)        man3ext="$value"                          ;;
126    --man4ext=*)        man4ext="$value"                          ;;
127    --man5ext=*)        man5ext="$value"                          ;;
128    --man6ext=*)        man6ext="$value"                          ;;
129    --man7ext=*)        man7ext="$value"                          ;;
130    --man8ext=*)        man8ext="$value"                          ;;
131    --man9ext=*)        man9ext="$value"                          ;;
132
133    INSTALL=*)          INSTALL="$value"                          ;;
134    SHELL=*)            SHELL="$value"                            ;;
135    CC=*)               CC="$value"                               ;;
136    BISON=*)            BISON="$value"                            ;;
137    FLEX=*)             FLEX="$value"                             ;;
138    RM=*)               RM="$value"                               ;;
139    RMDIR=*)            RMDIR="$value"                            ;;
140    TEST=*)             TEST="$value"                             ;;
141    MAKE=*)             MAKE="$value"                             ;;
142    GREP=*)             GREP="$value"                             ;;
143    CUT=*)              CUT="$value"                              ;;
144    SORT=*)             SORT="$value"                             ;;
145    PR=*)               PR="$value"                               ;;
146    CP=*)               CP="$value"                               ;;
147    CHMOD=*)            CHMOD="$value"                            ;;
148    MAKEINFO=*)         MAKEINFO="$value"                         ;;
149    TEXI2DVI=*)         TEXI2DVI="$value"                         ;;
150    TEXI2PDF=*)         TEXI2PDF="$value"                         ;;
151    DVIPS=*)            DVIPS="$value"                            ;;
152
153    CFLAGS=*)           CFLAGS="$value"                           ;;
154    LDFLAGS=*)          LDFLAGS="$value"                          ;;
155    LDLIBS=*)           LDLIBS="$value"                           ;;
156    BFLAGS=*)           BFLAGS="$value"                           ;;
157    FFLAGS=*)           FFLAGS="$value"                           ;;
158  esac
159done
160
161if [ "$help" = "yes" ]; then
162
163cat << HELP_END
164
165Configure script for $PROJECT_NAME $PROJECT_VERSION to adapt to many kinds of systems.
166
167Usage:
168
169  ./configure [OPTION]... [VAR=VALUE]...
170
171To assign environment variables (e.g., CC, CFLAGS...), specify them as
172VAR=VALUE.  See below for descriptions of some of the useful variables.
173
174Options:
175
176  --help                display this help and exit
177
178Installation directories:
179
180  --prefix=PATH         install architecture-independent files in PATH
181  --exec-prefix=PATH    install architecture-dependent files in PATH
182
183Fine tuning of the installation directories:
184
185  --bindir=PATH         user executables
186  --sbindir=PATH        system admin executables
187  --libexecdir=PATH     program executables
188  --datarootdir=PATH    read-only arch.-independent data root
189  --datadir=PATH        read-only architecture-independent data
190  --sysconfdir=PATH     read-only single-machine data
191  --sharedstatedir=PATH modifiable architecture-independent data
192  --localstatedir=PATH  modifiable single-machine data
193  --docdir=DIR          documentation root
194  --infodir=DIR         info documentation
195  --htmldir=DIR         html documentation
196  --dvidir=DIR          dvi documentation
197  --pdfdir=DIR          pdf documentation
198  --psdir=DIR           ps documentation
199  --libdir=DIR          object code libraries
200  --localedir=DIR       locale-dependent data
201  --mandir=DIR          man documentation
202  --man1dir=DIR         section 1 man documentation
203  --man2dir=DIR         section 2 man documentation
204  --man3dir=DIR         section 3 man documentation
205  --man4dir=DIR         section 4 man documentation
206  --man5dir=DIR         section 5 man documentation
207  --man6dir=DIR         section 6 man documentation
208  --man7dir=DIR         section 7 man documentation
209  --man8dir=DIR         section 8 man documentation
210  --man9dir=DIR         section 9 man documentation
211  --manext=EXT          man extension
212  --man1ext=EXT         section 1 man extension
213  --man2ext=EXT         section 2 man extension
214  --man3ext=EXT         section 3 man extension
215  --man4ext=EXT         section 4 man extension
216  --man5ext=EXT         section 5 man extension
217  --man6ext=EXT         section 6 man extension
218  --man7ext=EXT         section 7 man extension
219  --man8ext=EXT         section 8 man extension
220  --man9ext=EXT         section 9 man extension
221
222Some influential environment variables:
223
224  INSTALL               install command
225  SHELL                 shell command
226  CC                    C compiler command
227  BISON                 Bison compiler command
228  RM                    rm command
229  RMDIR                 rmdir command
230  TEST                  test command
231  MAKE                  make command
232  GREP                  grep command
233  CUT                   cut command
234  SORT                  sort command
235  PR                    pr command
236  CP                    cp command
237  CHMOD                 chmod command
238  MAKEINFO              makeinfo command
239  TEXI2DVI              texi2dvi command
240  TEXI2PDF              texi2pdf command
241  DVIPS                 dvips command
242
243
244  CFLAGS                C compiler flags
245  LDFLAGS               linker flags, e.g. -L<lib dir> if you have
246                        libraries in a nonstandard directory <lib dir>
247  LDLIBS                libraries to pass to the linker, e.g. -l<library>
248  BFLAGS                Bison compiler flags
249  FFLAGS                Flex compiler flags
250
251Use these variables to override default values.
252
253Report bugs to <$PROJECT_MAIL>.
254More details at $PROJECT_PAGE.
255
256HELP_END
257
258  exit 1
259fi
260
Note: See TracBrowser for help on using the repository browser.