Source: eggdrop
Version: 1.6.21-4
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

eggdrop fails to cross build from source for two reasons:

 * It uses AC_RUN_IFELSE with a wrong cross guess to check whether
   socklen_t exists.

   A better solution is using AC_CHECK_TYPE here.

 * It insists on running eggdrop -v during build.

   It simply should not do that as it does not contribute to the build
   in any way.

The attached patch fixes both. Please consider applying it.

Helmut
--- eggdrop-1.6.21.orig/aclocal.m4
+++ eggdrop-1.6.21/aclocal.m4
@@ -240,33 +240,16 @@
 dnl
 AC_DEFUN([EGG_CHECK_SOCKLEN_T],
 [
-  AC_CACHE_CHECK([for socklen_t], egg_cv_socklen_t, [
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+  AC_CHECK_TYPE([socklen_t],[
+    AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define to 1 if you have the `socklen_t' type.])
+  ],,[[
       #include <unistd.h>
       #include <sys/param.h>
       #include <sys/types.h>
       #include <sys/socket.h>
       #include <netinet/in.h>
       #include <arpa/inet.h>
-    ]],[[
-        socklen_t test = 55;
-
-        if (test != 55)
-          return(1);
-
-        return(0);
-    ]])], [
-      egg_cv_socklen_t="yes"
-    ], [
-      egg_cv_socklen_t="no"
-    ], [
-      egg_cv_socklen_t="cross"
-    ])
-  ])
-
-  if test "$egg_cv_socklen_t" = yes; then
-    AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define to 1 if you have the `socklen_t' type.])
-  fi
+  ]])
 ])
 
 
--- eggdrop-1.6.21.orig/Makefile.in
+++ eggdrop-1.6.21/Makefile.in
@@ -205,9 +205,6 @@
 modules: modtest
 	@cd src/mod && $(MAKE_MODULES) modules
 	@echo ""
-	@echo "Test run of ./eggdrop -v:"
-	@$(egg_test_run)
-	@echo ""
 	@echo "Eggdrop successfully compiled:"
 	@ls -l $(EGGEXEC)
 	@echo ""
@@ -323,8 +320,6 @@
 		exit 1; \
 	fi
 	@echo ""
-	@$(egg_test_run)
-	@echo ""
 	@echo "Installing in directory: '$(DEST)'."
 	@echo ""
 	@if test ! -d $(DEST); then \

Reply via email to