Fix for configure.in

Pavel Roskin proski at gnu.org
Wed Aug 2 19:52:48 GMT 2000


Hello!

The top-level configure.in in the CVS version of Samba uses "echo" instead
of the standard AC_MSG_* macros provided by Autoconf.

I could not find any reasons for not using AC_MSG_*. "cvs log
configure.in" doesn't list any reasons.

"cvs annotate configure.in" doesn't work for read-only CVS because the CVS
server for Samba is too old!

The attached patch replaces "echo" with the appropricate AC_MSG_* macros.
Also some messages have been trimmed because AC_MSG_* already provide
standard beginnings (i.e. "configure:", "warning:")

Regards,
Pavel Roskin

=========================
diff -u -r1.130 configure.in
--- configure.in	2000/06/29 08:23:56	1.130
+++ configure.in	2000/08/02 19:45:14
@@ -1128,7 +1128,7 @@
 # Conditions under which smbwrapper should not be built.
 
 	if test x$PICFLAG = x; then
-	   echo No support for PIC code - disabling smbwrapper and smbsh
+	   AC_MSG_WARN([No support for PIC code - disabling smbwrapper and smbsh])
 	   WRAP=""
 	   WRAP32=""
 	elif test x$ac_cv_func_syscall = xno; then
@@ -1343,7 +1343,7 @@
 	withval="$with_sslinc"
 	case "$withval" in
 	yes|no)
-	  echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
+	  AC_MSG_WARN([--with-sslinc called without argument - will use default])
 	  CFLAGS="-I/usr/local/ssl/include $CFLAGS"
 	  LIBS="-lssl -lcrypto $LIBS"
 	  LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
@@ -1364,8 +1364,7 @@
     fi
 
     if test ! -d ${withval}; then
-      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
-      exit 1
+      AC_MSG_ERROR([called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config])
     fi 
 
     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
@@ -1747,7 +1746,7 @@
 # If we don't have all of these then disable large
 # file support.
 #
-echo "checking if large file support can be enabled"
+AC_MSG_CHECKING([if large file support can be enabled])
 AC_TRY_COMPILE([
 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
 #include <sys/types.h>
@@ -1758,16 +1757,17 @@
 [int i],
 samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes,samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no)
 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
-    echo "yes"
+    AC_MSG_RESULT(yes)
     AC_DEFINE(HAVE_EXPLICIT_LARGEFILE_SUPPORT)
 else
-    echo "no"
+    AC_MSG_RESULT(no)
 fi
 
-echo "checking configure summary"
+AC_MSG_CHECKING([configure summary])
 AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
-           echo "configure OK";,
-	   AC_MSG_ERROR([summary failure. Aborting config]),:)
+           AC_MSG_RESULT(OK);,
+	   AC_MSG_RESULT(failure)
+	   AC_MSG_ERROR([Aborting config]),:)
 
 builddir=`pwd`
 AC_SUBST(builddir)
=========================



More information about the samba mailing list