source: auto/options @ 9e0afb5

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

Add flex support in configure scripts.

  • Property mode set to 100755
File size: 6.7 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
25
26if [ -z "$CFLAGS" ];            then CFLAGS=$DEFAULT_CFLAGS;                        fi
27if [ -z "$LDFLAGS" ];           then LDFLAGS=$DEFAULT_LDFLAGS;                      fi
28if [ -z "$LDLIBS" ];            then LDLIBS=$DEFAULT_LDLIBS;                        fi
29if [ -z "$BFLAGS" ];            then BFLAGS=$DEFAULT_BFLAGS;                        fi
30
31if [ -z "$DESTDIR" ];           then DESTDIR=$DEFAULT_DESTDIR;                      fi
32
33if [ -z "$prefix" ];            then prefix=$DEFAULT_prefix;                        fi
34if [ -z "$exec_prefix" ];       then exec_prefix=$DEFAULT_exec_prefix;              fi
35if [ -z "$bindir" ];            then bindir=$DEFAULT_bindir;                        fi
36if [ -z "$sbindir" ];           then sbindir=$DEFAULT_sbindir;                      fi
37if [ -z "$datarootdir" ];       then datarootdir=$DEFAULT_datarootdir;              fi
38if [ -z "$datadir" ];           then datadir=$DEFAULT_datadir;                      fi
39if [ -z "$sysconfdir" ];        then sysconfdir=$DEFAULT_sysconfdir;                fi
40if [ -z "$sharedstatedir" ];    then sharedstatedir=$DEFAULT_sharedstatedir;        fi
41if [ -z "$localstatedir" ];     then localstatedir=$DEFAULT_localstatedir;          fi
42
43for option
44do
45  case "$option" in
46    -*=*) value=$(echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//')  ;;
47    *=*)  value=$(echo "$option" | sed -e 's/[_A-Z0-9]*=//')      ;;
48    *)    value=""                                                ;;
49  esac
50
51  case "$option" in
52    --help)             help=yes                                  ;;
53    --quiet)            quiet=yes                                 ;;
54
55    --prefix=*)         prefix="$value"                           ;;
56    --exec-prefix=*)    exec_prefix="$value"                      ;;
57    --bindir=*)         bindir="$value"                           ;;
58    --sbindir=*)        sbindir="$value"                          ;;
59    --datarootdir=*)    datarootdir="$value"                      ;;
60    --datadir=*)        datadir="$value"                          ;;
61    --sysconfdir=*)     sysconfdir="$value"                       ;;
62    --sharedstatedir=*) sharedstatedir="$value"                   ;;
63    --localstatedir=*)  localstatedir="$value"                    ;;
64
65    SHELL=*)            SHELL="$value"                            ;;
66    CC=*)               CC="$value"                               ;;
67    BISON=*)            BISON="$value"                            ;;
68    FLEX=*)             FLEX="$value"                             ;;
69    RM=*)               RM="$value"                               ;;
70    RMDIR=*)            RMDIR="$value"                            ;;
71    TEST=*)             TEST="$value"                             ;;
72    MAKE=*)             MAKE="$value"                             ;;
73    GREP=*)             GREP="$value"                             ;;
74    CUT=*)              CUT="$value"                              ;;
75    SORT=*)             SORT="$value"                             ;;
76    PR=*)               PR="$value"                               ;;
77
78    CFLAGS=*)           CFLAGS="$value"                           ;;
79    LDFLAGS=*)          LDFLAGS="$value"                          ;;
80    LDLIBS=*)           LDLIBS="$value"                           ;;
81    BFLAGS=*)           BFLAGS="$value"                           ;;
82  esac
83done
84
85if [ "$help" = "yes" ]; then
86
87cat << HELP_END
88
89Configure script for $PROJECT_NAME $PROJECT_VERSION to adapt to many kinds of systems.
90
91Usage:
92
93  ./configure [OPTION]... [VAR=VALUE]...
94
95To assign environment variables (e.g., CC, CFLAGS...), specify them as
96VAR=VALUE.  See below for descriptions of some of the useful variables.
97
98Options:
99
100  --help                display this help and exit
101
102Installation directories:
103
104  --prefix=PATH         install architecture-independent files in PATH
105  --exec-prefix=PATH    install architecture-dependent files in PATH
106
107Fine tuning of the installation directories:
108
109  --bindir=PATH         user executables
110  --sbindir=PATH        system admin executables
111  --datarootdir=PATH    read-only arch.-independent data root
112  --datadir=PATH        read-only architecture-independent data
113  --sysconfdir=PATH     read-only single-machine data
114  --sharedstatedir=PATH modifiable architecture-independent data
115  --localstatedir=PATH  modifiable single-machine data
116
117Some influential environment variables:
118
119  SHELL                 shell command
120  CC                    C compiler command
121  BISON                 Bison compiler command
122  RM                    rm command
123  RMDIR                 rmdir command
124  TEST                  test command
125  MAKE                  make command
126  GREP                  grep command
127  CUT                   cut command
128  SORT                  sort command
129  PR                    pr command
130
131  CFLAGS                C compiler flags
132  LDFLAGS               linker flags, e.g. -L<lib dir> if you have
133                        libraries in a nonstandard directory <lib dir>
134  LDLIBS                libraries to pass to the linker, e.g. -l<library>
135  BFLAGS                Bison compiler flags
136
137Use these variables to override default values.
138
139Report bugs to <$PROJECT_MAIL>.
140More details at $PROJECT_PAGE.
141
142HELP_END
143
144  exit 1
145fi
146
Note: See TracBrowser for help on using the repository browser.