js/src/js-config.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/js-config.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,116 @@
     1.4 +#!/bin/sh
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +prefix='@prefix@'
    1.10 +mozilla_version='@MOZILLA_VERSION@'
    1.11 +JS_LIBRARY_NAME='@JS_LIBRARY_NAME@'
    1.12 +NSPR_CFLAGS='@NSPR_CFLAGS@'
    1.13 +JS_CONFIG_LIBS='@JS_CONFIG_LIBS@'
    1.14 +MOZ_JS_LIBS='@JS_CONFIG_MOZ_JS_LIBS@'
    1.15 +
    1.16 +FILENAME=`basename "$0"`
    1.17 +
    1.18 +usage()
    1.19 +{
    1.20 +	cat <<EOF
    1.21 +Usage: $FILENAME [OPTIONS]
    1.22 +Options:
    1.23 +	[--prefix[=DIR]]
    1.24 +	[--exec-prefix[=DIR]]
    1.25 +	[--includedir[=DIR]]
    1.26 +	[--libdir[=DIR]]
    1.27 +	[--version]
    1.28 +	[--libs]
    1.29 +	[--cflags]
    1.30 +	[--lib-filenames]
    1.31 +EOF
    1.32 +	exit $1
    1.33 +}
    1.34 +
    1.35 +if test $# -eq 0; then
    1.36 +	usage 1 1>&2
    1.37 +fi
    1.38 +
    1.39 +while test $# -gt 0; do
    1.40 +  case "$1" in
    1.41 +  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    1.42 +  *) optarg= ;;
    1.43 +  esac
    1.44 +
    1.45 +  case $1 in
    1.46 +    --prefix=*)
    1.47 +      prefix=$optarg
    1.48 +      ;;
    1.49 +    --prefix)
    1.50 +      echo_prefix=yes
    1.51 +      ;;
    1.52 +    --exec-prefix=*)
    1.53 +      exec_prefix=$optarg
    1.54 +      ;;
    1.55 +    --exec-prefix)
    1.56 +      echo_exec_prefix=yes
    1.57 +      ;;
    1.58 +    --includedir=*)
    1.59 +      includedir=$optarg
    1.60 +      ;;
    1.61 +    --includedir)
    1.62 +      echo_includedir=yes
    1.63 +      ;;
    1.64 +    --libdir=*)
    1.65 +      libdir=$optarg
    1.66 +      ;;
    1.67 +    --libdir)
    1.68 +      echo_libdir=yes
    1.69 +      ;;
    1.70 +    --version)
    1.71 +      echo "$mozilla_version"
    1.72 +      ;;
    1.73 +    --cflags)
    1.74 +      echo_cflags=yes
    1.75 +      ;;
    1.76 +    --libs)
    1.77 +      echo_libs=yes
    1.78 +      ;;
    1.79 +    *)
    1.80 +      usage 1 1>&2
    1.81 +      ;;
    1.82 +  esac
    1.83 +  shift
    1.84 +done
    1.85 +
    1.86 +# Set variables that may be dependent upon other variables
    1.87 +if test -z "$exec_prefix"; then
    1.88 +    exec_prefix=@exec_prefix@
    1.89 +fi
    1.90 +if test -z "$includedir"; then
    1.91 +    includedir=@includedir@
    1.92 +fi
    1.93 +if test -z "$libdir"; then
    1.94 +    libdir=@libdir@
    1.95 +fi
    1.96 +
    1.97 +if test "$echo_prefix" = "yes"; then
    1.98 +    echo $prefix
    1.99 +fi
   1.100 +
   1.101 +if test "$echo_exec_prefix" = "yes"; then
   1.102 +    echo $exec_prefix
   1.103 +fi
   1.104 +
   1.105 +if test "$echo_includedir" = "yes"; then
   1.106 +    echo $includedir
   1.107 +fi
   1.108 +
   1.109 +if test "$echo_libdir" = "yes"; then
   1.110 +    echo $libdir
   1.111 +fi
   1.112 +
   1.113 +if test "$echo_cflags" = "yes"; then
   1.114 +    echo "-std=gnu++0x -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS"
   1.115 +fi
   1.116 +
   1.117 +if test "$echo_libs" = "yes"; then
   1.118 +    echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
   1.119 +fi

mercurial