Hi,
Here's a patch against htdig-3.1.0b4. It adds a the possibility to fake
the install into another directory.
Nice for building rpm packages and the likes.
Furthermore a patch to the configure.in for solaris 2.6 (i386) where
GETPEERNAME_LENGTH_T is of type int.
Don't know if it's the right way how I solved it. (I practically don't
know anything about autoconf).
I'm working on some more patches, but I first want to verify them before
sending them in... Is 3.1.0b4 known to work, when compiled with one of
the latest egcs releases (egcs-2.92.29)? (I know got rid of most core
dumps but htig still refuses to make a good db)
3.1.0b1 and 2 worked without any problems on this configuration.
Regards,
Ric
--- htdig-3.1.0b4/htdig/Makefile.in.rkorig Thu Jan 28 16:14:22 1999
+++ htdig-3.1.0b4/htdig/Makefile.in Thu Jan 28 16:14:48 1999
@@ -13,7 +13,7 @@
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
install: $(TARGET)
- $(INSTALL) $(TARGET) $(BIN_DIR)
+ $(INSTALL) $(TARGET) $(INSTALL_ROOT)$(BIN_DIR)
clean:
rm -f $(TARGET) $(OBJS) *~ *.bak *% a.out *.orig core
--- htdig-3.1.0b4/htfuzzy/Makefile.in.rkorig Thu Jan 28 16:14:22 1999
+++ htdig-3.1.0b4/htfuzzy/Makefile.in Thu Jan 28 16:15:14 1999
@@ -22,7 +22,7 @@
$(RANLIB) $(LIBTARGET)
install: $(TARGET)
- $(INSTALL) $(TARGET) $(BIN_DIR)
+ $(INSTALL) $(TARGET) $(INSTALL_ROOT)$(BIN_DIR)
clean:
rm -f $(TARGET) $(LIBTARGET) $(OBJS) *~ *.bak *% a.out *.orig core
--- htdig-3.1.0b4/htmerge/Makefile.in.rkorig Thu Jan 28 16:14:22 1999
+++ htdig-3.1.0b4/htmerge/Makefile.in Thu Jan 28 16:15:53 1999
@@ -11,7 +11,7 @@
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
install: $(TARGET)
- $(INSTALL) $(TARGET) $(BIN_DIR)
+ $(INSTALL) $(TARGET) $(INSTALL_ROOT)$(BIN_DIR)
clean:
rm -f $(OBJS) $(TARGET) *~ *% *.bak core a.out *.orig
--- htdig-3.1.0b4/htnotify/Makefile.in.rkorig Thu Jan 28 16:14:22 1999
+++ htdig-3.1.0b4/htnotify/Makefile.in Thu Jan 28 16:17:29 1999
@@ -12,7 +12,7 @@
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
install: $(TARGET)
- $(INSTALL) $(TARGET) $(BIN_DIR)
+ $(INSTALL) $(TARGET) $(INSTALL_ROOT)$(BIN_DIR)
clean:
rm -f $(TARGET) $(OBJS) *~ *.bak *% a.out *.orig core
--- htdig-3.1.0b4/htsearch/Makefile.in.rkorig Thu Jan 28 16:14:22 1999
+++ htdig-3.1.0b4/htsearch/Makefile.in Thu Jan 28 16:17:09 1999
@@ -14,7 +14,7 @@
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS) $(FOBJS) $(LIBS)
install: all
- $(INSTALL) $(TARGET) $(CGIBIN_DIR)/$(TARGET)
+ $(INSTALL) $(TARGET) $(INSTALL_ROOT)$(CGIBIN_DIR)/$(TARGET)
clean:
rm -f $(OBJS) $(TARGET) *~ *.bak *% core *.orig a.out
--- htdig-3.1.0b4/configure.in.rkorig Thu Jan 28 14:30:09 1999
+++ htdig-3.1.0b4/configure.in Thu Jan 28 14:39:25 1999
@@ -113,6 +113,19 @@
[AC_MSG_RESULT(no);AC_DEFINE(GETPEERNAME_LENGTH_T, unsigned int)])
AC_LANG_C
+AC_LANG_CPLUSPLUS
+AC_MSG_CHECKING(whether the third argument of getpeername can be a unsigned int?)
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>],
+[ int socket;
+ struct sockaddr server;
+ unsigned int length;
+ getpeername(socket, &server, &length);],
+ [AC_MSG_RESULT(yes);AC_DEFINE(GETPEERNAME_LENGTH_T, unsigned int)],
+ [AC_MSG_RESULT(no);AC_DEFINE(GETPEERNAME_LENGTH_T, )])
+AC_LANG_C
+
+
AC_PATH_PROG(TSORT, tsort)
if test -z "$TSORT"; then
AC_MSG_ERROR([GNU rx configuration needs tsort in path!])
--- htdig-3.1.0b4/Makefile.in.rkorig Thu Jan 28 16:14:21 1999
+++ htdig-3.1.0b4/Makefile.in Thu Jan 28 16:54:03 1999
@@ -92,10 +92,10 @@
@if [ ! -f $(COMMON_DIR)/synonyms ]; then $(INSTALL) installdir/synonyms
$(INSTALL_ROOT)$(COMMON_DIR); echo $(COMMON_DIR)/synonyms;fi
@echo "Installing images..."
@for i in $(IMAGES); do \
- if [ ! -f $(IMAGE_DIR)/$$i ]; then $(INSTALL) -m 0664 installdir/$$i
$(INSTALL_ROOT)$(IMAGE_DIR)/$$i; echo $(IMAGE_DIR)/$$i;fi; \
+ if [ ! -f $(INSTALL_ROOT)$(IMAGE_DIR)/$$i ]; then $(INSTALL) -m 0664
+installdir/$$i $(INSTALL_ROOT)$(IMAGE_DIR)/$$i; echo $(IMAGE_DIR)/$$i;fi; \
done && test -z "$$fail"
@echo "Creating rundig script..."
- @if [ ! -f $(BIN_DIR)/rundig ]; then \
+ @if [ ! -f $(INSTALL_ROOT)$(BIN_DIR)/rundig ]; then \
sed -e s%@BIN_DIR@%$(BIN_DIR)% -e s%@COMMON_DIR@%$(COMMON_DIR)% -e
s%@DATABASE_DIR@%$(DATABASE_DIR)% installdir/rundig >$(INSTALL_ROOT)$(BIN_DIR)/rundig;
\
chmod 755 $(INSTALL_ROOT)$(BIN_DIR)/rundig; \
fi