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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/krb5/krb5-config/krb5-config.sh
          +++ new/usr/src/cmd/krb5/krb5-config/krb5-config.sh
↓ open down ↓ 28 lines elided ↑ open up ↑
  29   29  # 
  30   30  #
  31   31  
  32   32  # Configurable parameters set by autoconf
  33   33  version_string="Solaris Kerberos (based on MIT Kerberos 5 release 1.6.3)"
  34   34  
  35   35  prefix=/usr
  36   36  exec_prefix=${prefix}
  37   37  includedir=${prefix}/include/kerberosv5
  38   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   39  
  50   40  # Defaults for program
  51   41  library=krb5
  52   42  
  53   43  # Some constants
  54   44  vendor_string="Sun Microsystems, Inc."
  55   45  
  56   46  # Process arguments
  57   47  # Yes, we are sloppy, library specifications can come before options
  58   48  while test $# != 0; do
↓ open down ↓ 21 lines elided ↑ open up ↑
  80   70              ;;
  81   71          --vendor)
  82   72              do_vendor=1
  83   73              ;;
  84   74          --version)
  85   75              do_version=1
  86   76              ;;
  87   77          krb5)
  88   78              library=krb5
  89   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 +            ;;
  90   92          *)
  91   93              echo "$0: Unknown option \`$1' -- use \`--help' for usage"
  92   94              exit 1
  93   95      esac
  94   96      shift
  95   97  done
  96   98  
  97   99  # If required options - provide help
  98  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
  99  101      do_help=1
↓ open down ↓ 5 lines elided ↑ open up ↑
 105  107      echo "Options:"
 106  108      echo "        [--help]          Help"
 107  109      echo "        [--all]           Display version, vendor, and various values"
 108  110      echo "        [--version]       Version information"
 109  111      echo "        [--vendor]        Vendor information"
 110  112      echo "        [--prefix]        Kerberos installed prefix"
 111  113      echo "        [--exec-prefix]   Kerberos installed exec_prefix"
 112  114      echo "        [--cflags]        Compile time CFLAGS"
 113  115      echo "        [--libs]          List libraries required to link [LIBRARIES]"
 114  116      echo "Libraries:"
 115      -    echo "        krb5              Kerberos 5 application"
      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"
 116  122   
 117  123      exit 0
 118  124  fi
 119  125  
 120  126  if test -n "$do_all"; then
 121  127      all_exit=
 122  128      do_version=1
 123  129      do_prefix=1
 124  130      do_exec_prefix=1
 125  131      do_vendor=1
↓ open down ↓ 22 lines elided ↑ open up ↑
 148  154  
 149  155  if test -n "$do_exec_prefix"; then
 150  156      echo "$title_exec_prefix$exec_prefix"
 151  157      $all_exit
 152  158  fi
 153  159  
 154  160  if test -n "$do_cflags"; then
 155  161      echo "-I${includedir}"
 156  162  fi
 157  163  
 158      -
 159  164  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"'#'`
      165 +    lib_flags="-L$libdir"
 169  166  
 170  167      if test $library = 'kdb'; then
 171      -        lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
 172      -        library=krb5
      168 +       lib_flags="$lib_flags -lkdb"
      169 +       library=krb5
 173  170      fi
 174  171  
 175  172      if test $library = 'kadm_server'; then
 176      -        lib_flags="$lib_flags -lkadm5srv -lkdb5 $KDB5_DB_LIB"
 177      -        library=kadm_common
      173 +       lib_flags="$lib_flags -lkadm5srv -lkdb"
 178  174      fi
 179  175  
 180  176      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
      177 +       lib_flags="$lib_flags -lkadm5clnt"
 188  178      fi
 189  179  
 190  180      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
      181 +       lib_flags="$lib_flags -lgss"
      182 +       library=krb5
 198  183      fi
 199  184  
 200  185      if test $library = 'krb5'; then
 201      -        lib_flags="$lib_flags -lkrb5  $LIBS $GEN_LIB"
      186 +       lib_flags="$lib_flags -lkrb5"
 202  187      fi
 203  188  
 204      -    echo $lib_flags
      189 +    echo "$lib_flags"
 205  190  fi
 206  191  
 207  192  exit 0
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX