/[jscoverage]/trunk/js/js-config.in
ViewVC logotype

Annotation of /trunk/js/js-config.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 399 - (hide annotations)
Tue Dec 9 03:37:47 2008 UTC (11 years ago) by siliconforks
File size: 1818 byte(s)
Use SpiderMonkey from Firefox 3.1b2.

1 siliconforks 399 #!/bin/sh
2    
3     prefix='@prefix@'
4     mozilla_version='@MOZILLA_VERSION@'
5     LIBRARY_NAME='@LIBRARY_NAME@'
6     NSPR_CFLAGS='@NSPR_CFLAGS@'
7     JS_CONFIG_LIBS='@JS_CONFIG_LIBS@'
8     MOZ_JS_LIBS='@MOZ_JS_LIBS@'
9    
10     usage()
11     {
12     cat <<EOF
13     Usage: js-config [OPTIONS]
14     Options:
15     [--prefix[=DIR]]
16     [--exec-prefix[=DIR]]
17     [--includedir[=DIR]]
18     [--libdir[=DIR]]
19     [--version]
20     [--libs]
21     [--cflags]
22     [--lib-filenames]
23     EOF
24     exit $1
25     }
26    
27     if test $# -eq 0; then
28     usage 1 1>&2
29     fi
30    
31     while test $# -gt 0; do
32     case "$1" in
33     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
34     *) optarg= ;;
35     esac
36    
37     case $1 in
38     --prefix=*)
39     prefix=$optarg
40     ;;
41     --prefix)
42     echo_prefix=yes
43     ;;
44     --exec-prefix=*)
45     exec_prefix=$optarg
46     ;;
47     --exec-prefix)
48     echo_exec_prefix=yes
49     ;;
50     --includedir=*)
51     includedir=$optarg
52     ;;
53     --includedir)
54     echo_includedir=yes
55     ;;
56     --libdir=*)
57     libdir=$optarg
58     ;;
59     --libdir)
60     echo_libdir=yes
61     ;;
62     --version)
63     echo "$mozilla_version"
64     ;;
65     --cflags)
66     echo_cflags=yes
67     ;;
68     --libs)
69     echo_libs=yes
70     ;;
71     *)
72     usage 1 1>&2
73     ;;
74     esac
75     shift
76     done
77    
78     # Set variables that may be dependent upon other variables
79     if test -z "$exec_prefix"; then
80     exec_prefix=@exec_prefix@
81     fi
82     if test -z "$includedir"; then
83     includedir=@includedir@
84     fi
85     if test -z "$libdir"; then
86     libdir=@libdir@
87     fi
88    
89     if test "$echo_prefix" = "yes"; then
90     echo $prefix
91     fi
92    
93     if test "$echo_exec_prefix" = "yes"; then
94     echo $exec_prefix
95     fi
96    
97     if test "$echo_includedir" = "yes"; then
98     echo $includedir
99     fi
100    
101     if test "$echo_libdir" = "yes"; then
102     echo $libdir
103     fi
104    
105     if test "$echo_cflags" = "yes"; then
106     echo "-I$includedir/js $NSPR_CFLAGS"
107     fi
108    
109     if test "$echo_libs" = "yes"; then
110     echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
111     fi

  ViewVC Help
Powered by ViewVC 1.1.24