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