Changeset 3


Ignore:
Timestamp:
May 9, 2006 11:21:44 PM (13 years ago)
Author:
andreasw
Message:

added recent changes that we not automatically submitted

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makemain.inc

    r1 r3  
    1313if MAINTAINER_MODE
    1414
    15 BUILDTOOLSDIR=$(srcdir)/BuildTools
    16 
    1715# Make sure acinclude is using most recent coin.m4
    1816$(srcdir)/acinclude.m4: $(BUILDTOOLSDIR)/coin.m4
     
    2018
    2119# Make sure the autotools scripts are up to date
    22 $(srcdir)/install-sh: $(BUILDTOOLSDIR)/install-sh
     20$(AUX_DIR)/install-sh: $(BUILDTOOLSDIR)/install-sh
    2321        cp $< $@
    2422
    25 $(srcdir)/missing: $(BUILDTOOLSDIR)/missing
     23$(AUX_DIR)/missing: $(BUILDTOOLSDIR)/missing
    2624        cp $< $@
    2725
    28 $(srcdir)/config.guess: $(BUILDTOOLSDIR)/config.guess
     26if MAINTAINER_SMALL
     27else
     28$(AUX_DIR)/config.guess: $(BUILDTOOLSDIR)/config.guess
    2929        cp $< $@
    3030
    31 $(srcdir)/config.sub: $(BUILDTOOLSDIR)/config.sub
     31$(AUX_DIR)/config.sub: $(BUILDTOOLSDIR)/config.sub
    3232        cp $< $@
    3333
    34 $(srcdir)/depcomp: $(BUILDTOOLSDIR)/depcomp
     34$(AUX_DIR)/depcomp: $(BUILDTOOLSDIR)/depcomp
    3535        cp $< $@
    3636
    37 $(srcdir)/ltmain.sh: $(BUILDTOOLSDIR)/ltmain.sh
     37$(AUX_DIR)/ltmain.sh: $(BUILDTOOLSDIR)/ltmain.sh
    3838        cp $< $@
    3939endif
     40
     41# Take care of updating externals (if Externals file exists)
     42if HAVE_EXTERNALS
     43$(top_builddir)/Makefile: .Externals-stamp
     44
     45.Externals-stamp: $(srcdir)/Externals
     46        cd $(srcdir); svn propset svn:externals -F Externals .
     47        touch .Externals-stamp
     48
     49distclean-local:
     50        rm -f .Externals-stamp
     51
     52EXTRA_DIST += Externals
     53
     54endif
     55
     56endif
  • trunk/coin.m4

    r2 r3  
    107107
    108108###########################################################################
    109 #                           COIN_SRCDIR_INIT                              #
    110 ###########################################################################
    111 
    112 # This macro does everything that is required in the early part in the
    113 # configure script, such as defining a few variables.
    114 
    115 AC_DEFUN([AC_COIN_SRCDIR_INIT],
    116 [
    117 # Figure out if this is a VPATH configuration
    118 if test `cd $srcdir; pwd` != `pwd`; then
     109#                           COIN_CHECK_VPATH                              #
     110###########################################################################
     111
     112# This macro sets the variable coin_vpath_config to true if this is a
     113# VPATH configuration, otherwise it sets it to false.
     114AC_DEFUN([AC_COIN_CHECK_VPATH],
     115[if test `cd $srcdir; pwd` != `pwd`; then
    119116  coin_vpath_config=true;
    120117else
    121118  coin_vpath_config=false;
    122119fi
    123 
    124 # Initialize the ADDLIBS variable (a number of library require -lm)
     120]) # AC_COIN_CHECK_VPATH
     121
     122###########################################################################
     123#                           COIN_SRCDIR_INIT                              #
     124###########################################################################
     125
     126# This macro does everything that is required in the early part in the
     127# configure script, such as defining a few variables.
     128
     129AC_DEFUN([AC_COIN_SRCDIR_INIT],
     130[# Initialize the ADDLIBS variable (a number of library require -lm)
    125131ADDLIBS="-lm"
    126132AC_SUBST(ADDLIBS)
     
    128134# A useful makefile conditional that is always false
    129135AM_CONDITIONAL(ALWAYS_FALSE, false)
     136
     137# A makefile conditional that is set to true if
    130138]) # AC_COIN_SRCDIR_INIT
    131139
     
    733741
    734742###########################################################################
    735 #                         COIN_INIT_AUTO_TOOLS                            #
    736 ###########################################################################
    737 
    738 # Initialize the auto tools automake and libtool, with all
    739 # modifications we want for COIN packages.
    740 #
    741 # This also defines the AC_SUBST variables:
    742 # pkg_source_dir     absolute path to source code for this package
    743 # pkg_bin_dir        absolute path to the directory where binaries are
    744 #                    going to be installed (prefix/bin)
    745 # pkg_lib_dir        absolute path to the directory where libraries are
    746 #                    going to be installed (prefix/lib)
    747 # pkg_include_dir    absolute path to the directory where the header files
    748 #                    are installed (prefix/include)
    749 
    750 # This is a trick to have this code before AC_COIN_PROG_LIBTOOL
    751 AC_DEFUN([AC_COIN_DISABLE_STATIC],
    752 [
    753 # On Cygwin, building DLLs doesn't work
    754 case $build in
    755   *-cygwin*)
    756     if test x"$enable_shared" = xyes; then
    757       AC_MSG_WARN([On Cygwin, shared objects are not supported. I'm disabling your choice.])
    758     fi
    759     enable_shared=no
    760   ;;
    761 esac
    762 # By default, we only want the shared objects to be compiled
    763 AC_DISABLE_STATIC
    764 ])
    765 
    766 AC_DEFUN([AC_COIN_INIT_AUTO_TOOLS],
    767 [AC_BEFORE([AC_COIN_PROG_CXX],[$0])
    768 AC_BEFORE([AC_COIN_PROG_CC],[$0])
    769 AC_BEFORE([AC_COIN_PROG_F77],[$0])
    770 AC_REQUIRE([AC_COIN_DISABLE_STATIC])
    771 
     743#                          COIN_INIT_AUTOMAKE                             #
     744###########################################################################
     745
     746# This macro calls the regular INIT_AUTOMAKE and MAINTAINER_MODE
     747# macros, and defines additional variables and makefile conditionals,
     748# that are used in the maintainer parts of the makfile.  It also
     749# checks if the correct versions of the autotools are used.
     750
     751AC_DEFUN([AC_COIN_INIT_AUTOMAKE],
     752[AC_REQUIRE([AC_PROG_EGREP])
    772753# Stuff for automake
    773754AM_INIT_AUTOMAKE
    774755AM_MAINTAINER_MODE
    775756
    776 # COIN Utility directory
    777 AC_SUBST(UTILSDIR)
    778 UTILSDIR=$coin_basedir/Utils
    779 
    780 # Location of this coin.m4 macro definion file (for maintainer mode)
    781 AC_SUBST(COINM4)
    782 COINM4=$UTILSDIR/coin.m4
    783 
    784 # Stuff for libtool
    785 AC_COIN_PROG_LIBTOOL
    786 
    787 # If maintainer mode is chosen, we make sure that the correct versions
    788 # of the tools are used, and that we know where libtoo.m4 is (to
    789 # recreate acinclude.m4)
    790 
    791 AC_SUBST(LIBTOOLM4)
    792 LIBTOOLM4=
    793 
     757coin_have_externals=no
     758coin_maintainer_small=no
    794759if test "$enable_maintainer_mode" = yes; then
     760
     761  # If maintainer mode is chosen, we make sure that the correct versions
     762  # of the tools are used, and that we know where libtoo.m4 is (to
     763  # recreate acinclude.m4)
     764
     765  AC_SUBST(LIBTOOLM4)
     766  LIBTOOLM4=
    795767
    796768  # Check if we have autoconf
     
    870842    AC_MSG_ERROR([I cannot find the file ltmain.sh in $LIBTOOLPREFIX/share/libtool])
    871843  fi 
    872 fi
     844
     845  # Check if we have an Externals file
     846  if test -r $srcdir/Externals; then
     847    coin_have_externals=yes
     848  fi
     849
     850  # Check if this is a limited project (without config.guess)
     851  if test -r $srcdir/config.guess; then :; else
     852    coin_maintainer_small=yes
     853  fi
     854
     855  # Find the location of the BuildTools directory
     856  BUILDTOOLSDIR=
     857  if test -r $srcdir/BuildTools/coin.m4; then
     858    BUILDTOOLSDIR=$srcdir/BuildTools
     859  else
     860    if test -r $srcdir/../BuildTools/coin.m4; then
     861      BUILDTOOLSDIR=$srcdir/../BuildTools
     862    fi
     863  fi
     864  AC_SUBST(BUILDTOOLSDIR)
     865
     866  # The following variable is set to the name of the directory where
     867  # the autotool scripts are located
     868  AC_SUBST(AUX_DIR)
     869  AUX_DIR=$ac_aux_dir
     870fi
     871AM_CONDITIONAL(HAVE_EXTERNALS,test $coin_have_externals = yes)
     872AM_CONDITIONAL(MAINTAINER_SMALL,test $coin_maintainer_small = yes)
     873]) # AC_COIN_INIT_AUTOMAKE
     874
     875
     876
     877###########################################################################
     878#                         COIN_INIT_AUTO_TOOLS                            #
     879###########################################################################
     880
     881# Initialize the auto tools automake and libtool, with all
     882# modifications we want for COIN packages.
     883#
     884# This also defines the AC_SUBST variables:
     885# pkg_source_dir     absolute path to source code for this package
     886# pkg_bin_dir        absolute path to the directory where binaries are
     887#                    going to be installed (prefix/bin)
     888# pkg_lib_dir        absolute path to the directory where libraries are
     889#                    going to be installed (prefix/lib)
     890# pkg_include_dir    absolute path to the directory where the header files
     891#                    are installed (prefix/include)
     892
     893# This is a trick to have this code before AC_COIN_PROG_LIBTOOL
     894AC_DEFUN([AC_COIN_DISABLE_STATIC],
     895[
     896# On Cygwin, building DLLs doesn't work
     897case $build in
     898  *-cygwin*)
     899    if test x"$enable_shared" = xyes; then
     900      AC_MSG_WARN([On Cygwin, shared objects are not supported. I'm disabling your choice.])
     901    fi
     902    enable_shared=no
     903  ;;
     904esac
     905# By default, we only want the shared objects to be compiled
     906AC_DISABLE_STATIC
     907])
     908
     909AC_DEFUN([AC_COIN_INIT_AUTO_TOOLS],
     910[AC_BEFORE([AC_COIN_PROG_CXX],[$0])
     911AC_BEFORE([AC_COIN_PROG_CC],[$0])
     912AC_BEFORE([AC_COIN_PROG_F77],[$0])
     913AC_REQUIRE([AC_COIN_DISABLE_STATIC])
     914
     915# Initialize automake
     916AC_COIN_INIT_AUTOMAKE
     917
     918# Stuff for libtool
     919AC_COIN_PROG_LIBTOOL
    873920
    874921# helpful variable for the base directory of this package
     
    10171064
    10181065AC_DEFUN([AC_COIN_VPATH_LINKS],
    1019 [
     1066[AC_REQUIRE([AC_COIN_CHECK_VPATH])
    10201067if test $coin_vpath_config = true; then
    10211068  AC_CONFIG_LINKS($1:$1)
     
    11221169
    11231170# This macro makes sure that the data files in the Data subdirectory
    1124 # are available in the Test subdirectory.  The argument is the
    1125 # subdirectory name in the Data COIN project.  This macro defines the
    1126 # preprocessor macro COIN_HAS_DATA_SUBDIR (where SUBDIR is the name of
    1127 # the subdirectory in capital letters) and the makefile conditional
    1128 # with the same name.  If this is the base project, it also adds the
    1129 # directory to the recursive list.
     1171# are available.  The argument is the subdirectory name in the Data
     1172# COIN project.  This macro defines the preprocessor macro
     1173# COIN_HAS_DATA_SUBDIR (where SUBDIR is the name of the subdirectory
     1174# in capital letters) and the makefile conditional with the same name.
     1175# If this is the base project, it also adds the directory to the
     1176# recursive list.
    11301177
    11311178AC_DEFUN([AC_COIN_HAS_DATA],
    11321179[AC_MSG_CHECKING([whether Data directory $1 is available])
    11331180if test -r ../Data/$1; then
    1134   AC_CONFIG_LINKS(Test/$1:../Data/$1)
    1135   AC_DEFINE(m4_toupper(COIN_HAS_Data_$1),[1],
     1181  AC_DEFINE(m4_toupper(COIN_HAS_DATA_$1),[1],
    11361182            [Define to 1 if Data subdirectory $1 is available])
    11371183  AC_MSG_RESULT(yes)
     
    11541200
    11551201AC_DEFUN([AC_COIN_EXAMPLE_FILES],
    1156 [AC_REQUIRE([AC_PROG_LN_S])
     1202[AC_REQUIRE([AC_COIN_CHECK_VPATH])
    11571203files=`cd $srcdir; ls $1`
    11581204# We need to do the following loop to make sure that are no newlines
     
    11611207  EXAMPLE_FILES="$EXAMPLE_FILES $file"
    11621208done
    1163 if test `cd $scrdir; pwd` != `pwd`; then
     1209if test $coin_vpath_config = true; then
     1210  AC_PROG_LN_S
    11641211  AC_MSG_NOTICE([Creating links to the example files ($1)])
    11651212  for file in $EXAMPLE_FILES; do
  • trunk/run_autotools

    r2 r3  
    1010echo Running autotools in $dirs
    1111
    12 toolsdir=`pwd`/BuildTools
     12currdir=`pwd`
     13if test -r $currdir/BuildTools/coin.m4; then
     14  toolsdir=$currdir/BuildTools
     15else
     16  if test -r $currdir/../BuildTools/coin.m4; then
     17    toolsdir=$currdir/../BuildTools
     18  else
     19    echo Cannot find BuildTools directory.
     20    exit 1
     21  fi
     22fi
    1323
    1424for dir in $dirs; do
Note: See TracChangeset for help on using the changeset viewer.