tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

js-config.in (2087B)


      1 #!/bin/sh
      2 # This Source Code Form is subject to the terms of the Mozilla Public
      3 # License, v. 2.0. If a copy of the MPL was not distributed with this
      4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      5 
      6 prefix='@prefix@'
      7 mozilla_version='@MOZILLA_VERSION@'
      8 JS_LIBRARY_NAME='@JS_LIBRARY_NAME@'
      9 NSPR_CFLAGS='@NSPR_CFLAGS@'
     10 JS_CONFIG_LIBS='@JS_CONFIG_LIBS@'
     11 MOZ_JS_LIBS='@JS_CONFIG_MOZ_JS_LIBS@'
     12 
     13 FILENAME=`basename "$0"`
     14 
     15 usage()
     16 {
     17 	cat <<EOF
     18 Usage: $FILENAME [OPTIONS]
     19 Options:
     20 	[--prefix[=DIR]]
     21 	[--exec-prefix[=DIR]]
     22 	[--includedir[=DIR]]
     23 	[--libdir[=DIR]]
     24 	[--version]
     25 	[--libs]
     26 	[--cflags]
     27 	[--lib-filenames]
     28 EOF
     29 	exit $1
     30 }
     31 
     32 if test $# -eq 0; then
     33 	usage 1 1>&2
     34 fi
     35 
     36 while test $# -gt 0; do
     37   case "$1" in
     38   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
     39   *) optarg= ;;
     40   esac
     41 
     42   case $1 in
     43     --prefix=*)
     44       prefix=$optarg
     45       ;;
     46     --prefix)
     47       echo_prefix=yes
     48       ;;
     49     --exec-prefix=*)
     50       exec_prefix=$optarg
     51       ;;
     52     --exec-prefix)
     53       echo_exec_prefix=yes
     54       ;;
     55     --includedir=*)
     56       includedir=$optarg
     57       ;;
     58     --includedir)
     59       echo_includedir=yes
     60       ;;
     61     --libdir=*)
     62       libdir=$optarg
     63       ;;
     64     --libdir)
     65       echo_libdir=yes
     66       ;;
     67     --version)
     68       echo "$mozilla_version"
     69       ;;
     70     --cflags)
     71       echo_cflags=yes
     72       ;;
     73     --libs)
     74       echo_libs=yes
     75       ;;
     76     *)
     77       usage 1 1>&2
     78       ;;
     79   esac
     80   shift
     81 done
     82 
     83 # Set variables that may be dependent upon other variables
     84 if test -z "$exec_prefix"; then
     85     exec_prefix=@exec_prefix@
     86 fi
     87 if test -z "$includedir"; then
     88     includedir=@includedir@
     89 fi
     90 if test -z "$libdir"; then
     91     libdir=@libdir@
     92 fi
     93 
     94 if test "$echo_prefix" = "yes"; then
     95     echo $prefix
     96 fi
     97 
     98 if test "$echo_exec_prefix" = "yes"; then
     99     echo $exec_prefix
    100 fi
    101 
    102 if test "$echo_includedir" = "yes"; then
    103     echo $includedir
    104 fi
    105 
    106 if test "$echo_libdir" = "yes"; then
    107     echo $libdir
    108 fi
    109 
    110 if test "$echo_cflags" = "yes"; then
    111     echo "-std=gnu++20 -isystem $includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS"
    112 fi
    113 
    114 if test "$echo_libs" = "yes"; then
    115     echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
    116 fi