summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/zctl/Makefile.in3
-rw-r--r--configure.ac17
2 files changed, 12 insertions, 8 deletions
diff --git a/clients/zctl/Makefile.in b/clients/zctl/Makefile.in
index bf3c91e..105fe10 100644
--- a/clients/zctl/Makefile.in
+++ b/clients/zctl/Makefile.in
@@ -29,7 +29,8 @@ ALL_CFLAGS=${CFLAGS} -I${top_srcdir}/h -I${BUILDTOP}/h @X_CFLAGS@ ${CPPFLAGS}
LDFLAGS=@LDFLAGS@
LIBS=${LIBZEPHYR} @SS_LIBS@ @LIBS@ -lcom_err
-OBJS= zctl.o zctl_cmds.o
+SS_OBJS=zctl_cmds.o
+OBJS= zctl.o @SS_OBJS@
all: zctl
diff --git a/configure.ac b/configure.ac
index 0442eb7..50f7f4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,18 +214,21 @@ fi
AC_ARG_WITH(ss,
[ --with-ss=PREFIX Specify location of ss (requires com_err)],
- [ss="$withval"], [ss=yes])
+ [ss="$withval"], [ss=maybe])
if test "$ss" != no; then
- if test "$ss" != yes; then
+ if test "$ss" != yes -a "$ss" != maybe; then
CPPFLAGS="$CPPFLAGS -I$ss/include"
LDFLAGS="$LDFLAGS -L$ss/lib"
fi
- AC_CHECK_LIB(ss, ss_perror, SS_LIBS="-lss -lreadline -lcurses",
- [AC_MSG_ERROR(ss library not found)], -lcom_err -lreadline -lcurses)
- AC_SUBST(SS_LIBS)
-else
- AC_MSG_ERROR(This package requires ss.)
+ AC_CHECK_LIB(ss, ss_perror,
+ [SS_LIBS="-lss -lreadline -lcurses"
+ AC_DEFINE(HAVE_SS, 1, [Define if we are building with the ss library])],
+ AS_IF([test "x$with_ss" != "xmaybe"], AC_MSG_ERROR(ss library not found)),
+ -lcom_err -lreadline -lcurses)
+ SS_OBJS='${SS_OBJS}'
fi
+AC_SUBST(SS_LIBS)
+AC_SUBST(SS_OBJS)
LIBS="$KRB5_LIBS $KRB4_LIBS $LIBS"