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