[xiph-commits] SF.net SVN: libspiff:[512] trunk/autogen.sh

hartwork at users.sourceforge.net hartwork at users.sourceforge.net
Fri Feb 13 05:10:07 PST 2009


Revision: 512
          http://libspiff.svn.sourceforge.net/libspiff/?rev=512&view=rev
Author:   hartwork
Date:     2009-02-13 13:10:07 +0000 (Fri, 13 Feb 2009)

Log Message:
-----------
Update autogen.sh to r33575 of BRL-CAD

Modified Paths:
--------------
    trunk/autogen.sh

Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh	2008-12-25 02:45:53 UTC (rev 511)
+++ trunk/autogen.sh	2009-02-13 13:10:07 UTC (rev 512)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #                        a u t o g e n . s h
 #
-# Copyright (c) 2005-2008 United States Government as represented by
+# Copyright (c) 2005-2009 United States Government as represented by
 # the U.S. Army Research Laboratory.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -985,16 +985,51 @@
 	fi
     done
 
-    ##########################################
-    # make sure certain required files exist #
-    ##########################################
-    for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
-	if test ! -f $file ; then
-	    $VERBOSE_ECHO "Touching ${file} since it does not exist"
-	    touch $file
+    ###########################################################
+    # make sure certain required files exist for GNU projects #
+    ###########################################################
+    _marker_found=""
+    _marker_found_message_intro='Detected non-GNU marker "'
+    _marker_found_message_mid='" in '
+    for marker in foreign cygnus ; do
+	_marker_found_message=${_marker_found_message_intro}${marker}${_marker_found_message_mid}
+	_marker_found="`grep 'AM_INIT_AUTOMAKE.*'${marker} $CONFIGURE`"
+	if [ ! "x$_marker_found" = "x" ] ; then
+	    $VERBOSE_ECHO "${_marker_found_message}`basename \"$CONFIGURE\"`"
+	    break
 	fi
+	if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+	    _marker_found="`grep 'AUTOMAKE_OPTIONS.*'${marker} Makefile.am`"
+	    if [ ! "x$_marker_found" = "x" ] ; then
+		$VERBOSE_ECHO "${_marker_found_message}Makefile.am"
+		break
+	    fi
+	fi
     done
+    if [ "x${_marker_found}" = "x" ] ; then
+	_suggest_foreign=no
+	for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
+	    if [ ! -f $file ] ; then
+		$VERBOSE_ECHO "Touching ${file} since it does not exist"
+		_suggest_foreign=yes
+		touch $file
+	    fi
+	done
 
+	if [ "x${_suggest_foreign}" = "xyes" ] ; then
+	    $ECHO
+	    $ECHO "Warning: Several files expected of projects that conform to the GNU"
+	    $ECHO "coding standards were not found.  The files were automatically added"
+	    $ECHO "for you since you do not have a 'foreign' declaration specified."
+	    $ECHO
+	    $ECHO "Considered adding 'foreign' to AM_INIT_AUTOMAKE in `basename \"$CONFIGURE\"`"
+	    if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then
+		$ECHO "or to AUTOMAKE_OPTIONS in your top-level Makefile.am file."
+	    fi
+	    $ECHO
+	fi
+    fi
+
     ##################################################
     # make sure certain generated files do not exist #
     ##################################################
@@ -1067,7 +1102,7 @@
     ret=1
     for __cmd in wget curl fetch ; do
 	$VERBOSE_ECHO "Checking for command ${__cmd}"
-	${__cmd} --version &>/dev/null
+	${__cmd} --version > /dev/null 2>&1
 	ret=$?
 	if [ ! $ret = 0 ] ; then
 	    continue
@@ -1345,7 +1380,7 @@
 	    $ECHO
 	    $ECHO "Warning:  Unsupported macros were found in $CONFIGURE"
 	    $ECHO
-	    $ECHO "The `echo $CONFIGURE | basename` file was scanned in order to determine if any"
+	    $ECHO "The `basename \"$CONFIGURE\"` file was scanned in order to determine if any"
 	    $ECHO "unsupported macros are used that exceed the minimum version"
 	    $ECHO "settings specified within this file.  As such, the following macros"
 	    $ECHO "should be removed from configure.ac or the version numbers in this"
@@ -1389,7 +1424,7 @@
 		$ECHO "	$AUTOGEN_SH --verbose"
 	    else
 		$ECHO "reviewing the minimum GNU Autotools version settings contained in"
-		$ECHO "this script along with the macros being used in your `echo $CONFIGURE | basename` file."
+		$ECHO "this script along with the macros being used in your `basename \"$CONFIGURE\"` file."
 	    fi
 	    $ECHO
 	    $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the commits mailing list