wok-6.x diff nss/stuff/nss-config.in @ rev 11334

Up: testdisk (6.13)
author Alexander Medvedev <devl547@gmail.com>
date Fri Nov 25 08:15:11 2011 +0000 (2011-11-25)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nss/stuff/nss-config.in	Fri Nov 25 08:15:11 2011 +0000
     1.3 @@ -0,0 +1,145 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +prefix=@prefix@
     1.7 +
     1.8 +major_version=@MOD_MAJOR_VERSION@
     1.9 +minor_version=@MOD_MINOR_VERSION@
    1.10 +patch_version=@MOD_PATCH_VERSION@
    1.11 +
    1.12 +usage()
    1.13 +{
    1.14 +	cat <<EOF
    1.15 +Usage: nss-config [OPTIONS] [LIBRARIES]
    1.16 +Options:
    1.17 +	[--prefix[=DIR]]
    1.18 +	[--exec-prefix[=DIR]]
    1.19 +	[--includedir[=DIR]]
    1.20 +	[--libdir[=DIR]]
    1.21 +	[--version]
    1.22 +	[--libs]
    1.23 +	[--cflags]
    1.24 +Dynamic Libraries:
    1.25 +	nss
    1.26 +	nssutil
    1.27 +	ssl
    1.28 +	smime
    1.29 +EOF
    1.30 +	exit $1
    1.31 +}
    1.32 +
    1.33 +if test $# -eq 0; then
    1.34 +	usage 1 1>&2
    1.35 +fi
    1.36 +
    1.37 +lib_ssl=yes
    1.38 +lib_smime=yes
    1.39 +lib_nss=yes
    1.40 +lib_nssutil=yes
    1.41 +
    1.42 +while test $# -gt 0; do
    1.43 +  case "$1" in
    1.44 +  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    1.45 +  *) optarg= ;;
    1.46 +  esac
    1.47 +
    1.48 +  case $1 in
    1.49 +    --prefix=*)
    1.50 +      prefix=$optarg
    1.51 +      ;;
    1.52 +    --prefix)
    1.53 +      echo_prefix=yes
    1.54 +      ;;
    1.55 +    --exec-prefix=*)
    1.56 +      exec_prefix=$optarg
    1.57 +      ;;
    1.58 +    --exec-prefix)
    1.59 +      echo_exec_prefix=yes
    1.60 +      ;;
    1.61 +    --includedir=*)
    1.62 +      includedir=$optarg
    1.63 +      ;;
    1.64 +    --includedir)
    1.65 +      echo_includedir=yes
    1.66 +      ;;
    1.67 +    --libdir=*)
    1.68 +      libdir=$optarg
    1.69 +      ;;
    1.70 +    --libdir)
    1.71 +      echo_libdir=yes
    1.72 +      ;;
    1.73 +    --version)
    1.74 +      echo ${major_version}.${minor_version}.${patch_version}
    1.75 +      ;;
    1.76 +    --cflags)
    1.77 +      echo_cflags=yes
    1.78 +      ;;
    1.79 +    --libs)
    1.80 +      echo_libs=yes
    1.81 +      ;;
    1.82 +    ssl)
    1.83 +      lib_ssl=yes
    1.84 +      ;;
    1.85 +    smime)
    1.86 +      lib_smime=yes
    1.87 +      ;;
    1.88 +    nss)
    1.89 +      lib_nss=yes
    1.90 +      ;;
    1.91 +    nssutil)
    1.92 +      lib_nssutil=yes
    1.93 +      ;;
    1.94 +    *)
    1.95 +      usage 1 1>&2
    1.96 +      ;;
    1.97 +  esac
    1.98 +  shift
    1.99 +done
   1.100 +
   1.101 +# Set variables that may be dependent upon other variables
   1.102 +if test -z "$exec_prefix"; then
   1.103 +    exec_prefix=`pkg-config --variable=exec_prefix nss`
   1.104 +fi
   1.105 +if test -z "$includedir"; then
   1.106 +    includedir=`pkg-config --variable=includedir nss`
   1.107 +fi
   1.108 +if test -z "$libdir"; then
   1.109 +    libdir=`pkg-config --variable=libdir nss`
   1.110 +fi
   1.111 +
   1.112 +if test "$echo_prefix" = "yes"; then
   1.113 +    echo $prefix
   1.114 +fi
   1.115 +
   1.116 +if test "$echo_exec_prefix" = "yes"; then
   1.117 +    echo $exec_prefix
   1.118 +fi
   1.119 +
   1.120 +if test "$echo_includedir" = "yes"; then
   1.121 +    echo $includedir
   1.122 +fi
   1.123 +
   1.124 +if test "$echo_libdir" = "yes"; then
   1.125 +    echo $libdir
   1.126 +fi
   1.127 +
   1.128 +if test "$echo_cflags" = "yes"; then
   1.129 +    echo -I$includedir
   1.130 +fi
   1.131 +
   1.132 +if test "$echo_libs" = "yes"; then
   1.133 +      libdirs="-Wl,-rpath-link,$libdir -L$libdir"
   1.134 +      if test -n "$lib_ssl"; then
   1.135 +	libdirs="$libdirs -lssl${major_version}"
   1.136 +      fi
   1.137 +      if test -n "$lib_smime"; then
   1.138 +	libdirs="$libdirs -lsmime${major_version}"
   1.139 +      fi
   1.140 +      if test -n "$lib_nss"; then
   1.141 +	libdirs="$libdirs -lnss${major_version}"
   1.142 +      fi
   1.143 +      if test -n "$lib_nssutil"; then
   1.144 +	libdirs="$libdirs -lnssutil${major_version}"
   1.145 +      fi
   1.146 +      echo $libdirs
   1.147 +fi      
   1.148 +