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