From 9ed720ef4a8106fe83abb8f4da80fb7d649f9010 Mon Sep 17 00:00:00 2001 From: danw Date: Thu, 10 Sep 1998 19:19:17 +0000 Subject: [PATCH] Don't try to build afssync or incremental if we don't find AFS, and don't try to build afssync if that directory is missing (as it will be in the public release) --- Makefile.in | 3 +-- configure | 63 ++++++++++++++++++++++++++++++---------------------- configure.in | 13 +++++++++-- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7e303717..6fa181a4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -13,8 +13,7 @@ mandir=@mandir@ mrbindir=@mrbindir@ CLIENTDIRS=@GDSS_SUBDIR@ include lib clients update man -SVRDIRS=db server backup dbck dcm gen incremental regtape \ - afssync @RSAREF_SUBDIRS@ +SVRDIRS=db server backup dbck dcm gen regtape @AFS_SUBDIRS@ @RSAREF_SUBDIRS@ DEPDIRS=@COM_ERR_SUBDIR@ SUBDIRS=$(CLIENTDIRS) @SVRSUBDIRS@ diff --git a/configure b/configure index 7c6a2a27..9b41f341 100755 --- a/configure +++ b/configure @@ -1853,7 +1853,7 @@ echo "configure:1845: checking Pro*C version" >&5 ;; esac SVRSUBDIRS='$(SVRDIRS)' - SERVER_OUTPUT_FILES="db/Makefile server/Makefile afssync/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile" + SERVER_OUTPUT_FILES="db/Makefile server/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile reg_svr/Makefile regtape/Makefile" PRO_C=$oracle/bin/proc PRO_C_OPTS=CODE=ANSI_C PRO_C_DEFS="DEFINE=_PROC_ $PRO_C_DEFS" @@ -2115,6 +2115,13 @@ EOF esac + + AFS_SUBDIRS="incremental" + AFS_OUTPUT_FILES="incremental/Makefile" + if test -d $srcdir/afssync; then + AFS_SUBDIRS="$AFS_SUBDIRS afssync" + AFS_OUTPUT_FILES="$AFS_OUTPUT_FILES afssync/Makefile" + fi fi @@ -2122,16 +2129,17 @@ fi + # GNU readline echo "checking for GNU readline..." 1>&6 -echo "configure:2128: checking for GNU readline..." >&5 +echo "configure:2136: checking for GNU readline..." >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" readline="$withval" else echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:2135: checking for readline in -lreadline" >&5 +echo "configure:2143: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2139,7 +2147,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline -ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2185,9 +2193,9 @@ fi # Curses curses=curses echo "checking for curses" 1>&6 -echo "configure:2189: checking for curses" >&5 +echo "configure:2197: checking for curses" >&5 echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 -echo "configure:2191: checking for main in -lcurses" >&5 +echo "configure:2199: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2195,14 +2203,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2221,7 +2229,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6 -echo "configure:2225: checking for main in -lncurses" >&5 +echo "configure:2233: checking for main in -lncurses" >&5 ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2229,14 +2237,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2262,12 +2270,12 @@ if test -n "$curses"; then OLDLIBS=$LIBS LIBS=-l$curses echo "checking if curses needs termcap" 1>&6 -echo "configure:2266: checking if curses needs termcap" >&5 +echo "configure:2274: checking if curses needs termcap" >&5 if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < main(int argc, char **argv) @@ -2277,7 +2285,7 @@ else return 0; } EOF -if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then CURSES_LIBS="-l$curses" else @@ -2289,7 +2297,7 @@ else : else cat > conftest.$ac_ext < main(int argc, char **argv) @@ -2299,7 +2307,7 @@ else return 0; } EOF -if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then CURSES_LIBS="-l$curses -ltermcap" else @@ -2321,14 +2329,14 @@ if test -n "$CURSES_LIBS"; then OLDLIBS=$LIBS LIBS=$CURSES_LIBS cat > conftest.$ac_ext < int main() { WINDOW *w; getmaxx(w); ; return 0; } EOF -if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* : else @@ -2336,14 +2344,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { WINDOW *w; w->_maxx; ; return 0; } EOF -if { (eval echo configure:2347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'" else @@ -2369,12 +2377,12 @@ fi for ac_func in getusershell do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2373: checking for $ac_func" >&5 +echo "configure:2381: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2624,7 +2632,8 @@ trap 'rm -fr `echo "Makefile lib/Makefile include/Makefile clients/Makefile \ clients/mailmaint/Makefile clients/moira/Makefile \ clients/mrcheck/Makefile clients/mrtest/Makefile \ clients/passwd/Makefile update/Makefile man/Makefile \ - $SERVER_OUTPUT_FILES $GDSS_OUTPUT_FILES $RSAREF_OUTPUT_FILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + $SERVER_OUTPUT_FILES $AFS_OUTPUT_FILES \ + $GDSS_OUTPUT_FILES $RSAREF_OUTPUT_FILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index cf3406bc..6b518f18 100755 --- a/configure.in +++ b/configure.in @@ -265,7 +265,7 @@ if test "$oracle" != no; then ;; esac SVRSUBDIRS='$(SVRDIRS)' - SERVER_OUTPUT_FILES="db/Makefile server/Makefile afssync/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile" + SERVER_OUTPUT_FILES="db/Makefile server/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile reg_svr/Makefile regtape/Makefile" PRO_C=$oracle/bin/proc PRO_C_OPTS=CODE=ANSI_C PRO_C_DEFS="DEFINE=_PROC_ $PRO_C_DEFS" @@ -300,12 +300,20 @@ if test "$afs" != no -a "$oracle" != no; then [AC_MSG_ERROR(AFS libraries not found)], $AFS_LIBS -lrx -llwp -lsys $AFS_EXTRA_LIBS) MR_DEFINE(HAVE_AFS) + + AFS_SUBDIRS="incremental" + AFS_OUTPUT_FILES="incremental/Makefile" + if test -d $srcdir/afssync; then + AFS_SUBDIRS="$AFS_SUBDIRS afssync" + AFS_OUTPUT_FILES="$AFS_OUTPUT_FILES afssync/Makefile" + fi fi AC_SUBST(AFS_CPPFLAGS) AC_SUBST(AFS_PRO_C_INCLUDES) AC_SUBST(AFS_LIBS) AC_SUBST(AFS_EXTRA_LIBS) AC_SUBST(AFS_DIR) +AC_SUBST(AFS_SUBDIRS) # GNU readline AC_CHECKING(for GNU readline...) @@ -392,4 +400,5 @@ AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \ clients/mailmaint/Makefile clients/moira/Makefile \ clients/mrcheck/Makefile clients/mrtest/Makefile \ clients/passwd/Makefile update/Makefile man/Makefile \ - $SERVER_OUTPUT_FILES $GDSS_OUTPUT_FILES $RSAREF_OUTPUT_FILES) + $SERVER_OUTPUT_FILES $AFS_OUTPUT_FILES \ + $GDSS_OUTPUT_FILES $RSAREF_OUTPUT_FILES) -- 2.45.1