FreeCalypso > hg > themwi-rtp-mgr
comparison configure @ 0:9e7e9ba22e42
starting project with public header files
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Mon, 27 May 2024 09:10:27 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9e7e9ba22e42 |
|---|---|
| 1 #!/bin/sh | |
| 2 # This configure script is custom and hand-coded; | |
| 3 # it is NOT a product of GNU Autoconf or any other such tools! | |
| 4 | |
| 5 set -e | |
| 6 | |
| 7 if [ ! -f configure ] | |
| 8 then | |
| 9 echo "This script needs to be run from the top of the source tree" 1>&2 | |
| 10 exit 1 | |
| 11 fi | |
| 12 | |
| 13 # defaults that can be overridden | |
| 14 CC=gcc | |
| 15 CFLAGS=-O2 | |
| 16 prefix=/usr/local | |
| 17 exec_prefix= | |
| 18 bindir= | |
| 19 includedir= | |
| 20 libdir= | |
| 21 | |
| 22 while [ $# != 0 ] | |
| 23 do | |
| 24 case "$1" in | |
| 25 --prefix=*) | |
| 26 prefix=`echo $1 | cut -c 10-` | |
| 27 ;; | |
| 28 --exec-prefix=*) | |
| 29 exec_prefix=`echo $1 | cut -c 15-` | |
| 30 ;; | |
| 31 --bindir=*) | |
| 32 bindir=`echo $1 | cut -c 10-` | |
| 33 ;; | |
| 34 --includedir=*) | |
| 35 includedir=`echo $1 | cut -c 14-` | |
| 36 ;; | |
| 37 --libdir=*) | |
| 38 libdir=`echo $1 | cut -c 10-` | |
| 39 ;; | |
| 40 CC=*) | |
| 41 CC=`echo $1 | cut -c 4-` | |
| 42 ;; | |
| 43 CFLAGS=*) | |
| 44 CFLAGS=`echo $1 | cut -c 8-` | |
| 45 ;; | |
| 46 *) | |
| 47 echo "error: non-understood option $1" 1>&2 | |
| 48 exit 1; | |
| 49 ;; | |
| 50 esac | |
| 51 shift | |
| 52 done | |
| 53 | |
| 54 # inheritance rules for install directories | |
| 55 | |
| 56 if [ -z "$exec_prefix" ] | |
| 57 then | |
| 58 exec_prefix="$prefix" | |
| 59 fi | |
| 60 if [ -z "$bindir" ] | |
| 61 then | |
| 62 bindir="$exec_prefix/bin" | |
| 63 fi | |
| 64 if [ -z "$includedir" ] | |
| 65 then | |
| 66 includedir="$prefix/include" | |
| 67 fi | |
| 68 if [ -z "$libdir" ] | |
| 69 then | |
| 70 libdir="$exec_prefix/lib" | |
| 71 fi | |
| 72 | |
| 73 # report the final configuration | |
| 74 | |
| 75 echo "C code will be compiled with:" | |
| 76 echo " CC=$CC" | |
| 77 echo " CFLAGS=$CFLAGS" | |
| 78 echo "Installation directories:" | |
| 79 echo " bindir=$bindir" | |
| 80 echo " includedir=$includedir" | |
| 81 echo " libdir=$libdir" | |
| 82 | |
| 83 # emit the Makefile include fragment | |
| 84 echo "CC=$CC" > config.defs | |
| 85 echo "CFLAGS=$CFLAGS" >> config.defs | |
| 86 echo "bindir=$bindir" >> config.defs | |
| 87 echo "includedir=$includedir" >> config.defs | |
| 88 echo "libdir=$libdir" >> config.defs |
