--- expect-5.43/configure.in 2005-02-07 17:45:06.000000000 -0800 +++ expect-5.43/configure.in.new 2008-10-17 16:10:20.000000000 -0700 @@ -1257,6 +1257,7 @@ AC_SUBST(EVENT_TYPE) AC_SUBST(EVENT_ABLE) AC_SUBST(SETUID) +AC_SUBST(TCL_VERSION) AC_SUBST(UNSHARED_RANLIB) AC_SUBST(DEFAULT_STTY_ARGS) AC_SUBST(STTY_BIN) --- expect-5.43/Makefile.in 2004-05-07 11:10:30.000000000 -0700 +++ expect-5.43/Makefile.in.new 2008-10-17 16:11:17.000000000 -0700 @@ -171,10 +171,11 @@ ###################################################################### bindir = $(INSTALL_ROOT)@bindir@ -bindir_arch_indep = $(INSTALL_ROOT)$(prefix)/bin -tcl_libdir = $(INSTALL_ROOT)@libdir@ +bindir_arch_indep = $(INSTALL_ROOT)@bindir@ +system_libdir = $(INSTALL_ROOT)@libdir@ +tcl_libdir = $(INSTALL_ROOT)@libdir@/tcl@TCL_VERSION@/expect$(VERSION) libdir = $(INSTALL_ROOT)@libdir@/expect$(VERSION) -libdir_arch_indep = $(INSTALL_ROOT)$(prefix)/lib/expect$(VERSION) +libdir_arch_indep = $(INSTALL_ROOT)@libdir@/expect$(VERSION) mandir = $(INSTALL_ROOT)@mandir@ man1dir = $(mandir)/man1 @@ -197,7 +198,7 @@ AR = ar ARFLAGS = cr -LOCAL_EXPECT=LD_LIBRARY_PATH=.:@TCL_EXEC_PREFIX@/lib:$(tcl_libdir):$$LD_LIBRARY_PATH ./expect +LOCAL_EXPECT=LD_LIBRARY_PATH=.:@TCL_EXEC_PREFIX@/lib:$(system_libdir):$$LD_LIBRARY_PATH ./expect # These definitions are used by the "subdirs_do" target to pass # the compile flags down recursively. @@ -316,8 +317,8 @@ CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS) -LIB_INSTALL_DIR = $(tcl_libdir) -LIB_RUNTIME_DIR = $(tcl_libdir) +LIB_INSTALL_DIR = $(system_libdir) +LIB_RUNTIME_DIR = $(subst $(INSTALL_ROOT),,$(tcl_libdir)) # I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR # can appear as part of the LD_SEARCH_FLAGS inherited by configure. @@ -353,22 +354,22 @@ # in place before the installed expect is built. Actually, only the shared # lib has to be handled this way, but do both here for consistency. # Can't seem to embed shell comments in backslashed lines, so comments here: -# - To allow bare "load" commands, install shared libs in tcl_libdir rather -# than Expect's lib-specific directory (libdir). +# - To allow direct linking, install shared libs in system_libdir. Tcl stuff +# should package require Expect, pkgIndex.tcl handles locating it. # - install hand-generated pkgIndex.tcl file. # Local copy is pkgIndex rather than pkgIndex.tcl because pkgIndex.tcl.in # is too long for some filesystems, sigh. install_shared_lib: $(EXP_LIB_FILES) - ${srcdir}/mkinstalldirs $(libdir) + ${srcdir}/mkinstalldirs $(system_libdir) $(tcl_libdir) if [ -s $(EXP_UNSHARED_LIB_FILE) ] ; then \ - $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ - $(UNSHARED_RANLIB) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ - $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ - $(UNSHARED_RANLIB) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ + $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(system_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ + $(UNSHARED_RANLIB) $(system_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ + $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(system_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ + $(UNSHARED_RANLIB) $(system_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \ else true; fi if [ -s $(EXP_SHARED_LIB_FILE) ] ; then \ - $(INSTALL_PROGRAM) $(EXP_SHARED_LIB_FILE) $(tcl_libdir)/$(EXP_SHARED_LIB_FILE) ; \ - $(INSTALL_PROGRAM) pkgIndex $(libdir)/pkgIndex.tcl ; \ + $(INSTALL_PROGRAM) $(EXP_SHARED_LIB_FILE) $(system_libdir)/$(EXP_SHARED_LIB_FILE) ; \ + $(INSTALL_DATA) pkgIndex $(tcl_libdir)/pkgIndex.tcl ; \ else true; fi expect_installed: exp_main_exp.o $(EXP_LIB_FILE) install_shared_lib @@ -421,7 +422,7 @@ install: all install-binaries install-libraries install-doc install-binaries: expect expect_installed ${X11_PROGS_INSTALLED} $(SCRIPTS) - ${srcdir}/mkinstalldirs $(man1dir) $(man3dir) $(bindir) $(tcl_libdir) $(includedir) + ${srcdir}/mkinstalldirs $(man1dir) $(man3dir) $(bindir) $(libdir) $(includedir) # install Expect $(INSTALL_PROGRAM) expect_installed $(bindir)/expect # install Expectk (and man page) if present @@ -483,11 +484,9 @@ -rm -f $(bindir)/expectk \ $(man1dir)/expect.1 \ $(man1dir)/expectk.1 \ - $(libdir)/$(EXP_SHARED_LIB_FILE) \ - $(tcl_libdir)/$(EXP_SHARED_LIB_FILE) \ - $(libdir)/$(EXP_UNSHARED_LIB_FILE) \ - $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) \ - $(libdir)/pkgIndex.tcl \ + $(system_libdir)/$(EXP_SHARED_LIB_FILE) \ + $(system_libdir)/$(EXP_UNSHARED_LIB_FILE) \ + $(tcl_libdir)/pkgIndex.tcl \ $(man3dir)/libexpect.3 \ $(includedir)/expect_cf.h \ $(includedir)/expect.h \ --- expect-5.43/pkgIndex.in 2002-02-11 18:00:56.000000000 -0800 +++ expect-5.43/pkgIndex.in.new 2008-10-17 16:11:58.000000000 -0700 @@ -7,4 +7,4 @@ # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir .. @EXP_SHARED_LIB_FILE@]] +package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir .. .. @EXP_SHARED_LIB_FILE@.1]]