configure
changeset 35 f7a4e8024952
parent 34 eda742a0b1b4
equal deleted inserted replaced
1:82cd6f0fa03f 2:6be7be8f17f4
     1 #!/bin/bash
     1 #!/bin/bash
       
     2 
       
     3 source config.sh
     2 
     4 
     3 quiet=0
     5 quiet=0
     4 function quiet { [[ $quiet == 1 ]]; }
     6 function quiet { [[ $quiet == 1 ]]; }
     5 
     7 
     6 if [[ "$1" == "-q" ]]; then
     8 if [[ "$1" == "-q" ]]; then
    30 Usage: $0 [OPTION]
    32 Usage: $0 [OPTION]
    31 
    33 
    32 Options:
    34 Options:
    33   -h, --help                  display this help and exit
    35   -h, --help                  display this help and exit
    34       --lemon-doc-prefix=loc  The location of the lemon doc. By default it is
    36       --lemon-doc-prefix=loc  The location of the lemon doc. By default it is
    35                               http://lemon.cs.elte.hu/pub/doc/1.1.1
    37                               http://lemon.cs.elte.hu/pub/doc/$LEMON_VERSION
    36 
    38 
    37 Expamle:
    39 Expamle:
    38   $0 --lemon-doc-prefix=file://usr/local/share/doc/lemon/docs/
    40   $0 --lemon-doc-prefix=file://usr/local/share/doc/lemon/docs/
    39 EOF
    41 EOF
    40     exit 0
    42     exit 0
    52 done
    54 done
    53 
    55 
    54 
    56 
    55 if test -z "$lemon_doc_prefix"
    57 if test -z "$lemon_doc_prefix"
    56 then
    58 then
    57     lemon_doc_prefix='http://lemon.cs.elte.hu/pub/doc/1.1.1'
    59     lemon_doc_prefix="http://lemon.cs.elte.hu/pub/doc/$LEMON_VERSION"
    58 fi
    60 fi
    59 lemon_doc_prefix=$(echo $lemon_doc_prefix|sed 's/\//\\\\\\\//g')
    61 lemon_doc_prefix=$(echo $lemon_doc_prefix|sed 's/\//\\\\\\\//g')
    60 
    62 
    61 lemon_cflags=$(pkg-config --cflags lemon|sed 's/\//\\\//g')
    63 lemon_cflags=$(pkg-config --cflags lemon|sed 's/\//\\\//g')
    62 lemon_libs=$(pkg-config --libs lemon|sed 's/\//\\\//g')
    64 lemon_libs=$(pkg-config --libs lemon|sed 's/\//\\\//g')
    63 
    65 
    64 
    66 
    65 sed -e "s/@lemon_cflags@/${lemon_cflags}/g" \
    67 sed -e "s/@lemon_cflags@/${lemon_cflags}/g" \
    66     -e "s/@lemon_libs@/${lemon_libs}/g" \
    68     -e "s/@lemon_libs@/${lemon_libs}/g" \
    67    -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \
    69     -e "s/@make_lemon_doc_prefix@/${lemon_doc_prefix}/g" \
       
    70     -e "s/@LIBSTDCXX_VERSION@/${LIBSTDCXX_VERSION}/g" \
    68     < Makefile.in > Makefile
    71     < Makefile.in > Makefile