Print this page
9015 krb5-config emits unnecessary -R flags
1295 krb5-config only understands krb5


  19 # notice appear in all copies and that both that copyright notice and
  20 # this permission notice appear in supporting documentation, and that
  21 # the name of M.I.T. not be used in advertising or publicity pertaining
  22 # to distribution of the software without specific, written prior
  23 # permission.  Furthermore if you modify this software you must label
  24 # your software as modified software and not distribute it in such a
  25 # fashion that it might be confused with the original M.I.T. software.
  26 # M.I.T. makes no representations about the suitability of
  27 # this software for any purpose.  It is provided "as is" without express
  28 # or implied warranty.
  29 # 
  30 #
  31 
  32 # Configurable parameters set by autoconf
  33 version_string="Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)"
  34 
  35 prefix=/usr
  36 exec_prefix=${prefix}
  37 includedir=${prefix}/include/kerberosv5
  38 libdir=${exec_prefix}/lib
  39 CC_LINK='$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
  40 #KRB4_LIB=-lkrb4
  41 #DES425_LIB=-ldes425
  42 KDB5_DB_LIB=
  43 LDFLAGS=''
  44 RPATH_FLAG='-R'
  45 PTHREAD_CFLAGS='-D_REENTRANT '
  46 
  47 #LIBS='-lresolv -lsocket -lnsl '
  48 GEN_LIB=
  49 
  50 # Defaults for program
  51 library=krb5
  52 
  53 # Some constants
  54 vendor_string="Sun Microsystems, Inc."
  55 
  56 # Process arguments
  57 # Yes, we are sloppy, library specifications can come before options
  58 while test $# != 0; do
  59     case $1 in
  60         --all)
  61             do_all=1
  62             ;;
  63         --cflags)
  64             do_cflags=1
  65             ;;
  66         --deps)
  67             do_deps=1
  68             ;;


  70             do_exec_prefix=1
  71             ;;
  72         --help)
  73             do_help=1
  74             ;;
  75         --libs)
  76             do_libs=1
  77             ;;
  78         --prefix)
  79             do_prefix=1
  80             ;;
  81         --vendor)
  82             do_vendor=1
  83             ;;
  84         --version)
  85             do_version=1
  86             ;;
  87         krb5)
  88             library=krb5
  89             ;;












  90         *)
  91             echo "$0: Unknown option \`$1' -- use \`--help' for usage"
  92             exit 1
  93     esac
  94     shift
  95 done
  96 
  97 # If required options - provide help
  98 if test -z "$do_all" -a -z "$do_version" -a -z "$do_vendor" -a -z "$do_prefix" -a -z "$do_vendor" -a -z "$do_exec_prefix" -a -z "$do_cflags" -a -z "$do_libs"; then
  99     do_help=1
 100 fi
 101 
 102 
 103 if test -n "$do_help"; then
 104     echo "Usage: $0 [OPTIONS] [LIBRARIES]"
 105     echo "Options:"
 106     echo "        [--help]          Help"
 107     echo "        [--all]           Display version, vendor, and various values"
 108     echo "        [--version]       Version information"
 109     echo "        [--vendor]        Vendor information"
 110     echo "        [--prefix]        Kerberos installed prefix"
 111     echo "        [--exec-prefix]   Kerberos installed exec_prefix"
 112     echo "        [--cflags]        Compile time CFLAGS"
 113     echo "        [--libs]          List libraries required to link [LIBRARIES]"
 114     echo "Libraries:"
 115     echo "        krb5              Kerberos 5 application"




 116  
 117     exit 0
 118 fi
 119 
 120 if test -n "$do_all"; then
 121     all_exit=
 122     do_version=1
 123     do_prefix=1
 124     do_exec_prefix=1
 125     do_vendor=1
 126     title_version="Version:     "
 127     title_prefix="Prefix:      "
 128     title_exec_prefix="Exec_prefix: "
 129     title_vendor="Vendor:      "
 130 else
 131     all_exit="exit 0"
 132 fi
 133 
 134 if test -n "$do_version"; then
 135     echo "$title_version$version_string"


 138 
 139 if test -n "$do_vendor"; then
 140     echo "$title_vendor$vendor_string"
 141     $all_exit
 142 fi
 143 
 144 if test -n "$do_prefix"; then
 145     echo "$title_prefix$prefix"
 146     $all_exit
 147 fi
 148 
 149 if test -n "$do_exec_prefix"; then
 150     echo "$title_exec_prefix$exec_prefix"
 151     $all_exit
 152 fi
 153 
 154 if test -n "$do_cflags"; then
 155     echo "-I${includedir}"
 156 fi
 157 
 158 
 159 if test -n "$do_libs"; then
 160     # Ugly gross hack for our build tree
 161     lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
 162             -e 's/\$(PURE)//' \
 163             -e 's#\$(PROG_RPATH)#'$libdir'#' \
 164             -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \
 165             -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
 166             -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
 167             -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
 168             -e 's#\$(CFLAGS)#'"$CFLAGS"'#'`
 169 
 170     if test $library = 'kdb'; then
 171         lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
 172         library=krb5
 173     fi
 174 
 175     if test $library = 'kadm_server'; then
 176         lib_flags="$lib_flags -lkadm5srv -lkdb5 $KDB5_DB_LIB"
 177         library=kadm_common
 178     fi
 179 
 180     if test $library = 'kadm_client'; then
 181         lib_flags="$lib_flags -lkadm5clnt"
 182         library=kadm_common
 183     fi
 184 
 185     if test $library = 'kadm_common'; then
 186         lib_flags="$lib_flags -lgssrpc"
 187         library=gssapi
 188     fi
 189 
 190     if test $library = 'gssapi'; then
 191         lib_flags="$lib_flags -lgssapi_krb5"
 192         library=krb5
 193     fi
 194 
 195     if test $library = 'krb4'; then
 196         lib_flags="$lib_flags $KRB4_LIB $DES425_LIB"
 197         library=krb5
 198     fi
 199 
 200     if test $library = 'krb5'; then
 201         lib_flags="$lib_flags -lkrb5  $LIBS $GEN_LIB"
 202     fi
 203 
 204     echo $lib_flags
 205 fi
 206 
 207 exit 0


  19 # notice appear in all copies and that both that copyright notice and
  20 # this permission notice appear in supporting documentation, and that
  21 # the name of M.I.T. not be used in advertising or publicity pertaining
  22 # to distribution of the software without specific, written prior
  23 # permission.  Furthermore if you modify this software you must label
  24 # your software as modified software and not distribute it in such a
  25 # fashion that it might be confused with the original M.I.T. software.
  26 # M.I.T. makes no representations about the suitability of
  27 # this software for any purpose.  It is provided "as is" without express
  28 # or implied warranty.
  29 # 
  30 #
  31 
  32 # Configurable parameters set by autoconf
  33 version_string="Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)"
  34 
  35 prefix=/usr
  36 exec_prefix=${prefix}
  37 includedir=${prefix}/include/kerberosv5
  38 libdir=${exec_prefix}/lib










  39 
  40 # Defaults for program
  41 library=krb5
  42 
  43 # Some constants
  44 vendor_string="Sun Microsystems, Inc."
  45 
  46 # Process arguments
  47 # Yes, we are sloppy, library specifications can come before options
  48 while test $# != 0; do
  49     case $1 in
  50         --all)
  51             do_all=1
  52             ;;
  53         --cflags)
  54             do_cflags=1
  55             ;;
  56         --deps)
  57             do_deps=1
  58             ;;


  60             do_exec_prefix=1
  61             ;;
  62         --help)
  63             do_help=1
  64             ;;
  65         --libs)
  66             do_libs=1
  67             ;;
  68         --prefix)
  69             do_prefix=1
  70             ;;
  71         --vendor)
  72             do_vendor=1
  73             ;;
  74         --version)
  75             do_version=1
  76             ;;
  77         krb5)
  78             library=krb5
  79             ;;
  80         gssapi)
  81             library=gssapi
  82             ;;
  83         kadm-client)
  84             library=kadm_client
  85             ;;
  86         kadm-server)
  87             library=kadm_server
  88             ;;
  89         kdb)
  90             library=kdb
  91             ;;
  92         *)
  93             echo "$0: Unknown option \`$1' -- use \`--help' for usage"
  94             exit 1
  95     esac
  96     shift
  97 done
  98 
  99 # If required options - provide help
 100 if test -z "$do_all" -a -z "$do_version" -a -z "$do_vendor" -a -z "$do_prefix" -a -z "$do_vendor" -a -z "$do_exec_prefix" -a -z "$do_cflags" -a -z "$do_libs"; then
 101     do_help=1
 102 fi
 103 
 104 
 105 if test -n "$do_help"; then
 106     echo "Usage: $0 [OPTIONS] [LIBRARIES]"
 107     echo "Options:"
 108     echo "        [--help]          Help"
 109     echo "        [--all]           Display version, vendor, and various values"
 110     echo "        [--version]       Version information"
 111     echo "        [--vendor]        Vendor information"
 112     echo "        [--prefix]        Kerberos installed prefix"
 113     echo "        [--exec-prefix]   Kerberos installed exec_prefix"
 114     echo "        [--cflags]        Compile time CFLAGS"
 115     echo "        [--libs]          List libraries required to link [LIBRARIES]"
 116     echo "Libraries:"
 117     echo "        krb5              Kerberos 5 application (default)"
 118     echo "        gssapi            GSSAPI applications with Kerberos 5 bindings"
 119     echo "        kadm-client       Kadmin client"
 120     echo "        kadm-server       Kadmin server"
 121     echo "        kdb               Applications that access the Kerberos database"
 122  
 123     exit 0
 124 fi
 125 
 126 if test -n "$do_all"; then
 127     all_exit=
 128     do_version=1
 129     do_prefix=1
 130     do_exec_prefix=1
 131     do_vendor=1
 132     title_version="Version:     "
 133     title_prefix="Prefix:      "
 134     title_exec_prefix="Exec_prefix: "
 135     title_vendor="Vendor:      "
 136 else
 137     all_exit="exit 0"
 138 fi
 139 
 140 if test -n "$do_version"; then
 141     echo "$title_version$version_string"


 144 
 145 if test -n "$do_vendor"; then
 146     echo "$title_vendor$vendor_string"
 147     $all_exit
 148 fi
 149 
 150 if test -n "$do_prefix"; then
 151     echo "$title_prefix$prefix"
 152     $all_exit
 153 fi
 154 
 155 if test -n "$do_exec_prefix"; then
 156     echo "$title_exec_prefix$exec_prefix"
 157     $all_exit
 158 fi
 159 
 160 if test -n "$do_cflags"; then
 161     echo "-I${includedir}"
 162 fi
 163 

 164 if test -n "$do_libs"; then
 165     lib_flags="-L$libdir"








 166 
 167     if test $library = 'kdb'; then
 168        lib_flags="$lib_flags -lkdb"
 169        library=krb5
 170     fi
 171 
 172     if test $library = 'kadm_server'; then
 173        lib_flags="$lib_flags -lkadm5srv -lkdb"

 174     fi
 175 
 176     if test $library = 'kadm_client'; then
 177        lib_flags="$lib_flags -lkadm5clnt"






 178     fi
 179 
 180     if test $library = 'gssapi'; then
 181        lib_flags="$lib_flags -lgss"





 182        library=krb5
 183     fi
 184 
 185     if test $library = 'krb5'; then
 186        lib_flags="$lib_flags -lkrb5"
 187     fi
 188 
 189     echo "$lib_flags"
 190 fi
 191 
 192 exit 0