3 # Simple "configure" script for Qi.
5 # Copyright (c) 2016-2018, 2020-2022, 2024 Matias Fonzo, <selk@dragora.org>.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
23 "Usage: configure [options]
25 Defaults for the options are specified in brackets.
28 --prefix=DIR install files in DIR [${prefix}]
29 --exec-prefix=DIR base DIR for arch-dependent files [${exec_prefix}]
30 --bindir=DIR user executables [${bindir}]
31 --sbindir=DIR system admin executables [${sbindir}]
32 --libexecdir=DIR program executables [${libexecdir}]
33 --sysconfdir=DIR read-only single-machine data [${sysconfdir}]
34 --localstatedir=DIR modifiable single-machine data [${localstatedir}]
35 --datarootdir=DIR read-only arch-independent data root [${datarootdir}]
36 --infodir=DIR info documentation [${infodir}]
37 --mandir=DIR man documentation [${mandir}]
38 --docdir=DIR documentation root [${docdir}]
39 --arch=NAME architecture name to build packages [${arch}]
40 --packagedir=DIR directory for package installations [${packagedir}]
41 --targetdir=DIR target directory for symbolic links [${targetdir}]
42 --outdir=DIR output directory for binary packages [${outdir}]
43 --qi-cflags=CFLAGS default Qi C flags for compiler [${qi_cflags}]
44 --qi-cxxflags=CXXFLAGS default Qi C++ flags for compiler [${qi_cxxflags}]
45 --qi-ldflags=LDFLAGS default Qi flags for linker [${qi_ldflags}]
46 --qi-cppflags=CPPFLAGS default Qi C/C++ preprocessor flags [${qi_cppflags}]
52 exec_prefix
='$(prefix)'
53 bindir
='$(exec_prefix)/bin'
54 sbindir
='$(exec_prefix)/sbin'
55 libexecdir
='$(exec_prefix)/libexec'
56 sysconfdir
='$(prefix)/etc'
57 localstatedir
='$(prefix)/var'
58 datarootdir
='$(prefix)/share'
59 infodir
='$(datarootdir)/info'
60 mandir
='$(datarootdir)/man'
61 docdir
='$(datarootdir)/doc'
63 packagedir
='$(prefix)/pkgs'
65 outdir
='$(localstatedir)/cache/qi/packages'
75 "exec_prefix = $exec_prefix" \
77 "sbindir = $sbindir" \
78 "libexecdir = $libexecdir" \
79 "sysconfdir = $sysconfdir" \
80 "localstatedir = $localstatedir" \
81 "datarootdir = $datarootdir" \
82 "infodir = $infodir" \
86 "packagedir = $packagedir" \
87 "targetdir = $targetdir" \
89 "qi_cflags = $qi_cflags" \
90 "qi_cxxflags = $qi_cxxflags" \
91 "qi_ldflags = $qi_ldflags" \
92 "qi_cppflags = $qi_cppflags" \
112 exec_prefix
="${1#*=}"
147 localstatedir
="${1#*=}"
154 datarootdir
="${1#*=}"
217 qi_cxxflags
="${1#*=}"
231 qi_cppflags
="${1#*=}"
233 --help |
--hel |
--he |
--h |
'--?' |
-help |
-hel |
-he |
-h |
'-?' )
239 break; # End of options.
242 echo "configure: WARNING: unrecognized option '${1}'" 1>&2
251 echo "Creating config.mak ..."
253 return_variables
; # Show configured variables.
254 : > config.mak
; # Clean up config.mak, first.
256 if return_variables
> config.mak
258 touch src
/qi.
in && echo "OK, now you can run \`make'"