michael@0: #!/bin/sh michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: michael@0: prefix=@prefix@ michael@0: michael@0: major_version=@MOD_MAJOR_VERSION@ michael@0: minor_version=@MOD_MINOR_VERSION@ michael@0: patch_version=@MOD_PATCH_VERSION@ michael@0: michael@0: usage() michael@0: { michael@0: cat <&2 michael@0: fi michael@0: michael@0: lib_nspr=yes michael@0: lib_plc=yes michael@0: lib_plds=yes michael@0: michael@0: while test $# -gt 0; do michael@0: case "$1" in michael@0: -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; michael@0: *) optarg= ;; michael@0: esac michael@0: michael@0: case $1 in michael@0: --prefix=*) michael@0: prefix=$optarg michael@0: ;; michael@0: --prefix) michael@0: echo_prefix=yes michael@0: ;; michael@0: --exec-prefix=*) michael@0: exec_prefix=$optarg michael@0: ;; michael@0: --exec-prefix) michael@0: echo_exec_prefix=yes michael@0: ;; michael@0: --includedir=*) michael@0: includedir=$optarg michael@0: ;; michael@0: --includedir) michael@0: echo_includedir=yes michael@0: ;; michael@0: --libdir=*) michael@0: libdir=$optarg michael@0: ;; michael@0: --libdir) michael@0: echo_libdir=yes michael@0: ;; michael@0: --version) michael@0: echo ${major_version}.${minor_version}.${patch_version} michael@0: ;; michael@0: --cflags) michael@0: echo_cflags=yes michael@0: ;; michael@0: --libs) michael@0: echo_libs=yes michael@0: ;; michael@0: nspr) michael@0: lib_nspr=yes michael@0: ;; michael@0: plc) michael@0: lib_plc=yes michael@0: ;; michael@0: plds) michael@0: lib_plds=yes michael@0: ;; michael@0: *) michael@0: usage 1 1>&2 michael@0: ;; michael@0: esac michael@0: shift michael@0: done michael@0: michael@0: # Set variables that may be dependent upon other variables michael@0: if test -z "$exec_prefix"; then michael@0: exec_prefix=@exec_prefix@ michael@0: fi michael@0: if test -z "$includedir"; then michael@0: includedir=@includedir@ michael@0: fi michael@0: if test -z "$libdir"; then michael@0: libdir=@libdir@ michael@0: fi michael@0: michael@0: if test "$echo_prefix" = "yes"; then michael@0: echo $prefix michael@0: fi michael@0: michael@0: if test "$echo_exec_prefix" = "yes"; then michael@0: echo $exec_prefix michael@0: fi michael@0: michael@0: if test "$echo_includedir" = "yes"; then michael@0: echo $includedir michael@0: fi michael@0: michael@0: if test "$echo_libdir" = "yes"; then michael@0: echo $libdir michael@0: fi michael@0: michael@0: if test "$echo_cflags" = "yes"; then michael@0: echo -I$includedir michael@0: fi michael@0: michael@0: if test "$echo_libs" = "yes"; then michael@0: libdirs=-L$libdir michael@0: if test -n "$lib_plds"; then michael@0: libdirs="$libdirs -lplds${major_version}" michael@0: fi michael@0: if test -n "$lib_plc"; then michael@0: libdirs="$libdirs -lplc${major_version}" michael@0: fi michael@0: if test -n "$lib_nspr"; then michael@0: libdirs="$libdirs -lnspr${major_version}" michael@0: fi michael@0: os_ldflags="@LDFLAGS@" michael@0: for i in $os_ldflags ; do michael@0: if echo $i | grep \^-L >/dev/null; then michael@0: libdirs="$libdirs $i" michael@0: fi michael@0: done michael@0: echo $libdirs @OS_LIBS@ michael@0: fi michael@0: