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 | |
---|
26 | if [ -z "$CFLAGS" ]; then CFLAGS=$DEFAULT_CFLAGS; fi |
---|
27 | if [ -z "$LDFLAGS" ]; then LDFLAGS=$DEFAULT_LDFLAGS; fi |
---|
28 | if [ -z "$LDLIBS" ]; then LDLIBS=$DEFAULT_LDLIBS; fi |
---|
29 | if [ -z "$BFLAGS" ]; then BFLAGS=$DEFAULT_BFLAGS; fi |
---|
30 | |
---|
31 | if [ -z "$DESTDIR" ]; then DESTDIR=$DEFAULT_DESTDIR; fi |
---|
32 | |
---|
33 | if [ -z "$prefix" ]; then prefix=$DEFAULT_prefix; fi |
---|
34 | if [ -z "$exec_prefix" ]; then exec_prefix=$DEFAULT_exec_prefix; fi |
---|
35 | if [ -z "$bindir" ]; then bindir=$DEFAULT_bindir; fi |
---|
36 | if [ -z "$sbindir" ]; then sbindir=$DEFAULT_sbindir; fi |
---|
37 | if [ -z "$datarootdir" ]; then datarootdir=$DEFAULT_datarootdir; fi |
---|
38 | if [ -z "$datadir" ]; then datadir=$DEFAULT_datadir; fi |
---|
39 | if [ -z "$sysconfdir" ]; then sysconfdir=$DEFAULT_sysconfdir; fi |
---|
40 | if [ -z "$sharedstatedir" ]; then sharedstatedir=$DEFAULT_sharedstatedir; fi |
---|
41 | if [ -z "$localstatedir" ]; then localstatedir=$DEFAULT_localstatedir; fi |
---|
42 | |
---|
43 | for option |
---|
44 | do |
---|
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 |
---|
83 | done |
---|
84 | |
---|
85 | if [ "$help" = "yes" ]; then |
---|
86 | |
---|
87 | cat << HELP_END |
---|
88 | |
---|
89 | Configure script for $PROJECT_NAME $PROJECT_VERSION to adapt to many kinds of systems. |
---|
90 | |
---|
91 | Usage: |
---|
92 | |
---|
93 | ./configure [OPTION]... [VAR=VALUE]... |
---|
94 | |
---|
95 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
---|
96 | VAR=VALUE. See below for descriptions of some of the useful variables. |
---|
97 | |
---|
98 | Options: |
---|
99 | |
---|
100 | --help display this help and exit |
---|
101 | |
---|
102 | Installation directories: |
---|
103 | |
---|
104 | --prefix=PATH install architecture-independent files in PATH |
---|
105 | --exec-prefix=PATH install architecture-dependent files in PATH |
---|
106 | |
---|
107 | Fine 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 | |
---|
117 | Some 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 | |
---|
137 | Use these variables to override default values. |
---|
138 | |
---|
139 | Report bugs to <$PROJECT_MAIL>. |
---|
140 | More details at $PROJECT_PAGE. |
---|
141 | |
---|
142 | HELP_END |
---|
143 | |
---|
144 | exit 1 |
---|
145 | fi |
---|
146 | |
---|