COIN-OR::LEMON - Graph Library

source: lemon-tutorial/configure @ 49:c8c5a2a4ec71

Last change on this file since 49:c8c5a2a4ec71 was 35:f7a4e8024952, checked in by Akos Ladanyi <ladanyi@…>, 15 years ago

Put all version numbers in config.sh for easier changing

  • Property exe set to *
File size: 1.4 KB
RevLine 
[17]1#!/bin/bash
2
[35]3source config.sh
4
[17]5quiet=0
6function quiet { [[ $quiet == 1 ]]; }
7
8if [[ "$1" == "-q" ]]; then
9  quiet=1
10  shift
11fi
12
13prev=
14for option
15do
16  if test -n "$prev"
17  then
18    eval "$prev=\$option"
19    prev=
20    continue
21  fi
22
23  optarg=`expr "x$option" : 'x[^=]*=\(.*\)'`
24
25  case $option in
26      --lemon-doc-prefix)
27          prev=lemon_doc_prefix ;;
28      --lemon-doc-prefix=*)
29      lemon_doc_prefix=$optarg ;;
30      --help | -h)
31          cat << EOF
32Usage: $0 [OPTION]
33
34Options:
35  -h, --help                  display this help and exit
36      --lemon-doc-prefix=loc  The location of the lemon doc. By default it is
[35]37                              http://lemon.cs.elte.hu/pub/doc/$LEMON_VERSION
[17]38
39Expamle:
40  $0 --lemon-doc-prefix=file://usr/local/share/doc/lemon/docs/
41EOF
42    exit 0
43    ;;
44
45  *)
46    cat << EOF >&2
47$0: unrecognized option: $option
48Try \`$0 --help' for more information.
49EOF
50    exit 1
51    ;;
52
53  esac
54done
55
56
57if test -z "$lemon_doc_prefix"
58then
[35]59    lemon_doc_prefix="http://lemon.cs.elte.hu/pub/doc/$LEMON_VERSION"
[17]60fi
61lemon_doc_prefix=$(echo $lemon_doc_prefix|sed 's/\//\\\\\\\//g')
62
63lemon_cflags=$(pkg-config --cflags lemon|sed 's/\//\\\//g')
64lemon_libs=$(pkg-config --libs lemon|sed 's/\//\\\//g')
65
66
67sed -e "s/@lemon_cflags@/${lemon_cflags}/g" \
68    -e "s/@lemon_libs@/${lemon_libs}/g" \
[35]69    -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \
70    -e "s/@LIBSTDCXX_VERSION@/${LIBSTDCXX_VERSION}/g" \
[17]71    < Makefile.in > Makefile
Note: See TracBrowser for help on using the repository browser.