3 ### Cheesy configuration script.
5 ### (c) 2018 Straylight/Edgeware
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the preload-hacks package.
12 ### Preload-hacks are free software; you can redistribute it and/or modify
13 ### them under the terms of the GNU General Public License as published by
14 ### the Free Software Foundation; either version 2 of the License, or (at
15 ### your option) any later version.
17 ### Preload-hacks are distributed in the hope that it will be useful, but
18 ### WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
20 ### Public License for more details.
22 ### You should have received a copy of the GNU General Public License along
23 ### with preload-hacks; if not, write to the Free Software Foundation, Inc.,
24 ### 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 ## Check for a `help' option.
30 echo "usage: $0 [--VAR=VAL ...] -- [VAR=VAL ...]"
35 ## Find a relative path to the source directory.
36 case $0 in */*) ;; *) echo >&2 "$0: invoke as PATH/configure"; exit 2 ;; esac
39 ## Build the actual makefile.
41 cat >Makefile.new
<<EOF
44 include \$(srcdir)/Make.rules
47 ## Build a configuration fragment.
53 ## Settings from \`configure'.
61 --*=*) o
=${1#--}; k
=${o%%=*} v
=${o#*=}; echo >&3 "$k = $v" ;;
62 --*,*) k
=${1#--}; echo >&3 "$k = t" ;;
68 ## Parse any remaining assignments.
72 *=*) k
=${1%%=*} v
=${1#*=}; echo >&3 "$k = $v" ;;
73 *) echo >&2 "$0: unexpected argument $1"; exit 2 ;;
80 mv config.mk.new config.mk
81 mv Makefile.new Makefile