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

@@ -34,20 +34,10 @@
 
 prefix=/usr
 exec_prefix=${prefix}
 includedir=${prefix}/include/kerberosv5
 libdir=${exec_prefix}/lib
-CC_LINK='$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
-#KRB4_LIB=-lkrb4
-#DES425_LIB=-ldes425
-KDB5_DB_LIB=
-LDFLAGS=''
-RPATH_FLAG='-R'
-PTHREAD_CFLAGS='-D_REENTRANT '
-
-#LIBS='-lresolv -lsocket -lnsl '
-GEN_LIB=
 
 # Defaults for program
 library=krb5
 
 # Some constants

@@ -85,10 +75,22 @@
             do_version=1
             ;;
         krb5)
             library=krb5
             ;;
+        gssapi)
+            library=gssapi
+            ;;
+        kadm-client)
+            library=kadm_client
+            ;;
+        kadm-server)
+            library=kadm_server
+            ;;
+        kdb)
+            library=kdb
+            ;;
         *)
             echo "$0: Unknown option \`$1' -- use \`--help' for usage"
             exit 1
     esac
     shift

@@ -110,11 +112,15 @@
     echo "        [--prefix]        Kerberos installed prefix"
     echo "        [--exec-prefix]   Kerberos installed exec_prefix"
     echo "        [--cflags]        Compile time CFLAGS"
     echo "        [--libs]          List libraries required to link [LIBRARIES]"
     echo "Libraries:"
-    echo "        krb5              Kerberos 5 application"
+    echo "        krb5              Kerberos 5 application (default)"
+    echo "        gssapi            GSSAPI applications with Kerberos 5 bindings"
+    echo "        kadm-client       Kadmin client"
+    echo "        kadm-server       Kadmin server"
+    echo "        kdb               Applications that access the Kerberos database"
  
     exit 0
 fi
 
 if test -n "$do_all"; then

@@ -153,55 +159,34 @@
 
 if test -n "$do_cflags"; then
     echo "-I${includedir}"
 fi
 
-
 if test -n "$do_libs"; then
-    # Ugly gross hack for our build tree
-    lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
-            -e 's/\$(PURE)//' \
-            -e 's#\$(PROG_RPATH)#'$libdir'#' \
-            -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \
-            -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
-            -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
-            -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
-            -e 's#\$(CFLAGS)#'"$CFLAGS"'#'`
+    lib_flags="-L$libdir"
 
     if test $library = 'kdb'; then
-        lib_flags="$lib_flags -lkdb5 $KDB5_DB_LIB"
+       lib_flags="$lib_flags -lkdb"
         library=krb5
     fi
 
     if test $library = 'kadm_server'; then
-        lib_flags="$lib_flags -lkadm5srv -lkdb5 $KDB5_DB_LIB"
-        library=kadm_common
+       lib_flags="$lib_flags -lkadm5srv -lkdb"
     fi
 
     if test $library = 'kadm_client'; then
         lib_flags="$lib_flags -lkadm5clnt"
-        library=kadm_common
-    fi
-
-    if test $library = 'kadm_common'; then
-        lib_flags="$lib_flags -lgssrpc"
-        library=gssapi
     fi
 
     if test $library = 'gssapi'; then
-        lib_flags="$lib_flags -lgssapi_krb5"
-        library=krb5
-    fi
-
-    if test $library = 'krb4'; then
-        lib_flags="$lib_flags $KRB4_LIB $DES425_LIB"
+       lib_flags="$lib_flags -lgss"
         library=krb5
     fi
 
     if test $library = 'krb5'; then
-        lib_flags="$lib_flags -lkrb5  $LIBS $GEN_LIB"
+       lib_flags="$lib_flags -lkrb5"
     fi
 
-    echo $lib_flags
+    echo "$lib_flags"
 fi
 
 exit 0