owl (2.2.2-1.1) direct (non packaging) changes

Summary

 aclocal.m4   |  171 +++++++++++++++++++++++++++
 configure    |  361 ++++++++++++++---------------------------------------------
 configure.in |   34 +++--
 perlconfig.c |    4 
 zephyr.c     |   35 +++--
 5 files changed, 310 insertions(+), 295 deletions(-)

    
download this patch

Patch contents

--- owl-2.2.2.orig/configure.in
+++ owl-2.2.2/configure.in
@@ -30,13 +30,21 @@
 
 dnl Check for kerberosIV include
 AC_MSG_CHECKING(for /usr/include/kerberosIV)
-if test -d /usr/include/kerberosIV; then
-        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
-        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
-        AC_MSG_RESULT(yes)
+dnl per debbugs#517019
+AC_MSG_RESULT(DEPRECATED)
+dnl if test -d /usr/include/kerberosIV; then
+dnl         CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
+dnl         CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
+dnl         AC_MSG_RESULT(yes)
+dnl el
+if test -d /usr/include/openssl; then
+        CFLAGS=${CFLAGS}\ -I/usr/include/openssl
+        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/openssl
+        AC_MSG_RESULT(OpenSSL DES found instead)
 else
         AC_MSG_RESULT(no)
 fi
+dnl openssl stanza per debbugs#517019
 
 dnl check for stack-protector
 PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
@@ -54,18 +62,24 @@
 AC_CHECK_LIB(com_err, com_err)
 AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_LIB(socket, socket)
-AC_CHECK_LIB(k5crypto, krb5_derive_key)
+dnl per debbugs#517019
+dnl AC_CHECK_LIB(k5crypto, krb5_derive_key)
 dnl AC_CHECK_LIB(des425, req_act_vno)
-AC_CHECK_LIB(des425, des_cbc_encrypt)
+dnl AC_CHECK_LIB(des425, des_cbc_encrypt)
+dnl AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
+AC_CHECK_LIB(crypto,DES_cbc_encrypt)
 dnl AC_CHECK_LIB(des, des_quad_cksum)
 AC_CHECK_LIB(resolv, res_search)
-AC_CHECK_LIB(krb5, krb5_get_credentials)
-AC_CHECK_LIB(krb4, krb_sendauth,,
-   AC_CHECK_LIB(krb, krb_sendauth))
+dnl per debbugs#517019
+dnl AC_CHECK_LIB(krb5, krb5_get_credentials)
+dnl AC_CHECK_LIB(krb4, krb_sendauth,,
+dnl   AC_CHECK_LIB(krb, krb_sendauth))
 dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
 AC_CHECK_LIB(zephyr, ZGetSender)
 AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
 
+dnl per debbugs#517019
+AC_CHECK_FUNCS(DES_string_to_key  DES_ecb_encrypt DES_key_sched)
 AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
 
 AC_MSG_CHECKING(for des_ecb_encrypt prototype)
@@ -107,7 +121,7 @@
 fi
 
 dnl Add LDFLAGS for embeded perl
-FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'`
+FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/-Wl,-E//' | sed 's/-liconv//'`
 echo Adding perl LDFLAGS ${FOO}
 LDFLAGS=${LDFLAGS}\ ${FOO}
 
--- owl-2.2.2.orig/zephyr.c
+++ owl-2.2.2/zephyr.c
@@ -70,9 +70,11 @@
 int owl_zephyr_loadsubs_helper(ZSubscription_t subs[], int count)
 {
   int i, ret = 0;
+  errcode_t code;
   /* sub without defaults */
-  if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) {
-    owl_function_error("Error subscribing to zephyr notifications.");
+  code = ZSubscribeToSansDefaults(subs,count,0);
+  if (code != ZERR_NONE) {
+    owl_function_error("Error %s subscribing to zephyr notifications.", error_message(code));
     ret=-2;
   }
 
@@ -171,9 +173,11 @@
 {
 #ifdef HAVE_LIBZEPHYR
   ZSubscription_t subs[10];
-    
-  if (ZSubscribeTo(subs,0,0) != ZERR_NONE) {
-    owl_function_error("Error subscribing to default zephyr notifications.");
+  errcode_t code;
+
+  code = ZSubscribeTo(subs,0,0);
+  if (code != ZERR_NONE) {
+    owl_function_error("Error %s subscribing to default zephyr notifications.", error_message(code));
     return(-1);
   }
   return(0);
@@ -190,6 +194,7 @@
   char subsfile[MAXPATHLEN], buffer[1024];
   int count, ret, i;
   struct stat statbuff;
+  errcode_t code;
 
   if (filename==NULL) {
     sprintf(subsfile, "%s/%s", owl_global_get_homedir(&g), ".anyone");
@@ -230,8 +235,9 @@
   }
 
   /* sub with defaults */
-  if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) {
-    owl_function_error("Error subscribing to zephyr notifications.");
+  code = ZSubscribeToSansDefaults(subs,count,0);
+  if (code != ZERR_NONE) {
+    owl_function_error("Error %s subscribing to zephyr notifications.", error_message(code));
     ret=-2;
   }
 
@@ -284,14 +290,16 @@
 {
 #ifdef HAVE_LIBZEPHYR
   ZSubscription_t subs[5];
+  errcode_t code;
 
   subs[0].zsub_class=class;
   subs[0].zsub_classinst=inst;
   subs[0].zsub_recipient=recip;
 
   ZResetAuthentication();
-  if (ZUnsubscribeTo(subs,1,0) != ZERR_NONE) {
-    owl_function_error("Error unsubbing from <%s,%s,%s>", class, inst, recip);
+  code = ZUnsubscribeTo(subs,1,0);
+  if (code != ZERR_NONE) {
+    owl_function_error("Error %s unsubbing from <%s,%s,%s>", error_message(code), class, inst, recip);
     return(-2);
   }
   return(0);
@@ -464,7 +472,7 @@
   owl_free(notice.z_message);
   ZFreeNotice(&notice);
   if (ret!=ZERR_NONE) {
-    owl_function_error("Error sending zephyr");
+    owl_function_error("Error %s sending zephyr", error_message(ret));
     return(ret);
   }
   return(0);
@@ -640,7 +648,7 @@
   ZResetAuthentication();
   ret=ZLocateUser(user,&numlocs,auth?ZAUTH:ZNOAUTH);
   if (ret != ZERR_NONE) {
-    return(owl_sprintf("Error locating user %s\n", user));
+    return(owl_sprintf("Error %s locating user %s\n", error_message(ret), user));
   }
 
   if (numlocs==0) {
@@ -652,6 +660,7 @@
 
   out=strdup("");
   for (;numlocs;numlocs--) {
+    /* should check return here, and fix loop */
     ZGetLocations(&locations,&one);
     myuser=short_zuser(user);
     tmp=owl_sprintf("%s%s: %s\t%s\t%s\n",
@@ -769,6 +778,8 @@
   ret=ZSetLocation(eset);
   owl_zephyr_process_events(NULL);
   if (ret != ZERR_NONE) {
+    /* we should check this, but ZSetLocation almost *always* gives Internal Error. Sigh. */
+    /* is this the "SENT" bug? if so, it is fixed... */
     /* owl_function_makemsg("Error setting location: %s", error_message(ret)); */
   }
 #endif
@@ -853,6 +864,7 @@
   if (ret==ZERR_TOOMANYSUBS) {
     return(owl_strdup("Zephyr: too many subscriptions\n"));
   } else if (ret || (num <= 0)) {
+    /* need to attach error_message(ret) here! */
     return(owl_strdup("Zephyr: error retriving subscriptions\n"));
   }
 
@@ -863,6 +875,7 @@
     if ((ret = ZGetSubscriptions(&sub, &one)) != ZERR_NONE) {
       owl_free(out);
       ZFlushSubscriptions();
+      /* need to attach error_message(ret) here! */
       out=owl_strdup("Error while getting subscriptions\n");
       return(out);
     } else {
--- owl-2.2.2.orig/aclocal.m4
+++ owl-2.2.2/aclocal.m4
@@ -0,0 +1,171 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+		
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+			 [pkg_failed=yes])
+    fi
+else
+	pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+		[AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+		[$4])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
--- owl-2.2.2.orig/configure
+++ owl-2.2.2/configure
@@ -2635,11 +2635,13 @@
 
 { echo "$as_me:$LINENO: checking for /usr/include/kerberosIV" >&5
 echo $ECHO_N "checking for /usr/include/kerberosIV... $ECHO_C" >&6; }
-if test -d /usr/include/kerberosIV; then
-        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
-        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ echo "$as_me:$LINENO: result: DEPRECATED" >&5
+echo "${ECHO_T}DEPRECATED" >&6; }
+if test -d /usr/include/openssl; then
+        CFLAGS=${CFLAGS}\ -I/usr/include/openssl
+        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/openssl
+        { echo "$as_me:$LINENO: result: OpenSSL DES found instead" >&5
+echo "${ECHO_T}OpenSSL DES found instead" >&6; }
 else
         { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -3116,13 +3118,13 @@
 fi
 
 
-{ echo "$as_me:$LINENO: checking for krb5_derive_key in -lk5crypto" >&5
-echo $ECHO_N "checking for krb5_derive_key in -lk5crypto... $ECHO_C" >&6; }
-if test "${ac_cv_lib_k5crypto_krb5_derive_key+set}" = set; then
+{ echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
+echo $ECHO_N "checking for DES_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
+if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lk5crypto  $LIBS"
+LIBS="-lcrypto  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3136,11 +3138,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char krb5_derive_key ();
+char DES_cbc_encrypt ();
 int
 main ()
 {
-return krb5_derive_key ();
+return DES_cbc_encrypt ();
   ;
   return 0;
 }
@@ -3163,97 +3165,26 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_k5crypto_krb5_derive_key=yes
+  ac_cv_lib_crypto_DES_cbc_encrypt=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_k5crypto_krb5_derive_key=no
+	ac_cv_lib_crypto_DES_cbc_encrypt=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_krb5_derive_key" >&5
-echo "${ECHO_T}$ac_cv_lib_k5crypto_krb5_derive_key" >&6; }
-if test $ac_cv_lib_k5crypto_krb5_derive_key = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
+if test $ac_cv_lib_crypto_DES_cbc_encrypt = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBK5CRYPTO 1
+#define HAVE_LIBCRYPTO 1
 _ACEOF
 
-  LIBS="-lk5crypto $LIBS"
-
-fi
-
-
-{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
-echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
-if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes425  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char des_cbc_encrypt ();
-int
-main ()
-{
-return des_cbc_encrypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_des425_des_cbc_encrypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_des425_des_cbc_encrypt=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
-echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
-if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDES425 1
-_ACEOF
-
-  LIBS="-ldes425 $LIBS"
+  LIBS="-lcrypto $LIBS"
 
 fi
 
@@ -3329,13 +3260,13 @@
 fi
 
 
-{ echo "$as_me:$LINENO: checking for krb5_get_credentials in -lkrb5" >&5
-echo $ECHO_N "checking for krb5_get_credentials in -lkrb5... $ECHO_C" >&6; }
-if test "${ac_cv_lib_krb5_krb5_get_credentials+set}" = set; then
+{ echo "$as_me:$LINENO: checking for ZGetSender in -lzephyr" >&5
+echo $ECHO_N "checking for ZGetSender in -lzephyr... $ECHO_C" >&6; }
+if test "${ac_cv_lib_zephyr_ZGetSender+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb5  $LIBS"
+LIBS="-lzephyr  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3349,11 +3280,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char krb5_get_credentials ();
+char ZGetSender ();
 int
 main ()
 {
-return krb5_get_credentials ();
+return ZGetSender ();
   ;
   return 0;
 }
@@ -3376,37 +3307,36 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_krb5_krb5_get_credentials=yes
+  ac_cv_lib_zephyr_ZGetSender=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_krb5_krb5_get_credentials=no
+	ac_cv_lib_zephyr_ZGetSender=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_get_credentials" >&5
-echo "${ECHO_T}$ac_cv_lib_krb5_krb5_get_credentials" >&6; }
-if test $ac_cv_lib_krb5_krb5_get_credentials = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZGetSender" >&5
+echo "${ECHO_T}$ac_cv_lib_zephyr_ZGetSender" >&6; }
+if test $ac_cv_lib_zephyr_ZGetSender = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB5 1
+#define HAVE_LIBZEPHYR 1
 _ACEOF
 
-  LIBS="-lkrb5 $LIBS"
+  LIBS="-lzephyr $LIBS"
 
 fi
 
-
-{ echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb4" >&5
-echo $ECHO_N "checking for krb_sendauth in -lkrb4... $ECHO_C" >&6; }
-if test "${ac_cv_lib_krb4_krb_sendauth+set}" = set; then
+{ echo "$as_me:$LINENO: checking for ZInitLocationInfo in -lzephyr" >&5
+echo $ECHO_N "checking for ZInitLocationInfo in -lzephyr... $ECHO_C" >&6; }
+if test "${ac_cv_lib_zephyr_ZInitLocationInfo+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb4  $LIBS"
+LIBS="-lzephyr  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3420,11 +3350,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char krb_sendauth ();
+char ZInitLocationInfo ();
 int
 main ()
 {
-return krb_sendauth ();
+return ZInitLocationInfo ();
   ;
   return 0;
 }
@@ -3447,185 +3377,62 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_krb4_krb_sendauth=yes
+  ac_cv_lib_zephyr_ZInitLocationInfo=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_krb4_krb_sendauth=no
+	ac_cv_lib_zephyr_ZInitLocationInfo=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_sendauth" >&5
-echo "${ECHO_T}$ac_cv_lib_krb4_krb_sendauth" >&6; }
-if test $ac_cv_lib_krb4_krb_sendauth = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB4 1
-_ACEOF
-
-  LIBS="-lkrb4 $LIBS"
-
-else
-
-{ echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
-echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6; }
-if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitLocationInfo" >&5
+echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitLocationInfo" >&6; }
+if test $ac_cv_lib_zephyr_ZInitLocationInfo = yes; then
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char krb_sendauth ();
-int
-main ()
-{
-return krb_sendauth ();
-  ;
-  return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZEPHYR_ZINITLOCATIONINFO
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_krb_krb_sendauth=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_krb_krb_sendauth=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
-echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6; }
-if test $ac_cv_lib_krb_krb_sendauth = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB 1
-_ACEOF
 
-  LIBS="-lkrb $LIBS"
 
-fi
-
-fi
 
 
-{ echo "$as_me:$LINENO: checking for ZGetSender in -lzephyr" >&5
-echo $ECHO_N "checking for ZGetSender in -lzephyr... $ECHO_C" >&6; }
-if test "${ac_cv_lib_zephyr_ZGetSender+set}" = set; then
+for ac_func in DES_string_to_key  DES_ecb_encrypt DES_key_sched
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lzephyr  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ZGetSender ();
-int
-main ()
-{
-return ZGetSender ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_zephyr_ZGetSender=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_zephyr_ZGetSender=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZGetSender" >&5
-echo "${ECHO_T}$ac_cv_lib_zephyr_ZGetSender" >&6; }
-if test $ac_cv_lib_zephyr_ZGetSender = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZEPHYR 1
-_ACEOF
-
-  LIBS="-lzephyr $LIBS"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-fi
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-{ echo "$as_me:$LINENO: checking for ZInitLocationInfo in -lzephyr" >&5
-echo $ECHO_N "checking for ZInitLocationInfo in -lzephyr... $ECHO_C" >&6; }
-if test "${ac_cv_lib_zephyr_ZInitLocationInfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lzephyr  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -3633,11 +3440,18 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char ZInitLocationInfo ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
-return ZInitLocationInfo ();
+return $ac_func ();
   ;
   return 0;
 }
@@ -3660,28 +3474,27 @@
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_zephyr_ZInitLocationInfo=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_zephyr_ZInitLocationInfo=no
+	eval "$as_ac_var=no"
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitLocationInfo" >&5
-echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitLocationInfo" >&6; }
-if test $ac_cv_lib_zephyr_ZInitLocationInfo = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBZEPHYR_ZINITLOCATIONINFO
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
-
+done
 
 
 
@@ -4895,7 +4708,7 @@
 and GLIB_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details." >&5
 echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -4905,7 +4718,7 @@
 and GLIB_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 else
@@ -4937,7 +4750,7 @@
    { (exit 1); exit 1; }; }
 fi
 
-FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'`
+FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/-Wl,-E//' | sed 's/-liconv//'`
 echo Adding perl LDFLAGS ${FOO}
 LDFLAGS=${LDFLAGS}\ ${FOO}
 
--- owl-2.2.2.orig/perlconfig.c
+++ owl-2.2.2/perlconfig.c
@@ -179,6 +179,7 @@
   int ret, fd;
   PerlInterpreter *p;
   char filename[MAXPATHLEN];
+  int embedding_argc;
   char *embedding[5];
   char *err;
   struct stat statbuff;
@@ -191,8 +192,11 @@
   embedding[0]="";
   embedding[1]=filename;
   embedding[2]=0;
+  embedding_argc = 2;
 
   /* create and initialize interpreter */
+  PERL_SYS_INIT3(&embedding_argc, &embedding, &environ);
+  /* we never perl_free so we don't PERL_TERM either */
   p=perl_alloc();
   owl_global_set_perlinterp(&g, (void*)p);
   perl_construct(p);