Changeset 1660


Ignore:
Timestamp:
Jun 9, 2011 9:09:23 AM (7 years ago)
Author:
stefan
Message:

change to new way of using and installing configuration header files

Location:
trunk/Cbc
Files:
4 added
1 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/Makefile.in

    r1646 r1660  
    6464        $(srcdir)/osi-cbc.pc.in $(top_srcdir)/configure \
    6565        $(top_srcdir)/doxydoc/doxygen.conf.in \
    66         $(top_srcdir)/examples/Makefile.in \
    67         $(top_srcdir)/inc/config_cbc.h.in AUTHORS INSTALL config.guess \
    68         config.sub depcomp install-sh ltmain.sh missing
     66        $(top_srcdir)/examples/Makefile.in AUTHORS INSTALL \
     67        config.guess config.sub depcomp install-sh ltmain.sh missing
    6968@HAVE_EXTERNALS_TRUE@am__append_2 = Dependencies
    7069@HAVE_EXTERNALS_TRUE@am__append_3 = .Dependencies-stamp
     
    7877 configure.lineno configure.status.lineno
    7978mkinstalldirs = $(install_sh) -d
    80 CONFIG_HEADER = $(top_builddir)/inc/config_cbc.h
     79CONFIG_HEADER = $(top_builddir)/src/config.h \
     80        $(top_builddir)/src/config_cbc.h
    8181CONFIG_CLEAN_FILES = examples/Makefile cbc.pc cbc-uninstalled.pc \
    8282        osi-cbc.pc osi-cbc-uninstalled.pc doxydoc/doxygen.conf
     
    524524$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
    525525        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
    526 
    527 inc/config_cbc.h: inc/stamp-h1
    528         @if test ! -f $@; then \
    529           rm -f inc/stamp-h1; \
    530           $(MAKE) inc/stamp-h1; \
    531         else :; fi
    532 
    533 inc/stamp-h1: $(top_srcdir)/inc/config_cbc.h.in $(top_builddir)/config.status
    534         @rm -f inc/stamp-h1
    535         cd $(top_builddir) && $(SHELL) ./config.status inc/config_cbc.h
    536 $(top_srcdir)/inc/config_cbc.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
    537         cd $(top_srcdir) && $(AUTOHEADER)
    538         rm -f inc/stamp-h1
    539         touch $@
    540 
    541 distclean-hdr:
    542         -rm -f inc/config_cbc.h inc/stamp-h1
    543526examples/Makefile: $(top_builddir)/config.status $(top_srcdir)/examples/Makefile.in
    544527        cd $(top_builddir) && $(SHELL) ./config.status $@
     
    716699        $(am__remove_distdir)
    717700        mkdir $(distdir)
    718         $(mkdir_p) $(distdir)/. $(distdir)/BuildTools $(distdir)/doc $(distdir)/doxydoc $(distdir)/examples $(distdir)/inc
     701        $(mkdir_p) $(distdir)/. $(distdir)/BuildTools $(distdir)/doc $(distdir)/doxydoc $(distdir)/examples
    719702        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    720703        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    896879        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
    897880        -rm -f Makefile
    898 distclean-am: clean-am distclean-generic distclean-hdr \
    899         distclean-libtool distclean-local distclean-tags
     881distclean-am: clean-am distclean-generic distclean-libtool \
     882        distclean-local distclean-tags
    900883
    901884dvi: dvi-recursive
     
    950933        clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \
    951934        dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
    952         distclean-generic distclean-hdr distclean-libtool \
    953         distclean-local distclean-recursive distclean-tags \
    954         distcleancheck distdir distuninstallcheck dvi dvi-am html \
    955         html-am info info-am install install-am install-data \
    956         install-data-am install-data-hook install-exec install-exec-am \
     935        distclean-generic distclean-libtool distclean-local \
     936        distclean-recursive distclean-tags distcleancheck distdir \
     937        distuninstallcheck dvi dvi-am html html-am info info-am \
     938        install install-am install-data install-data-am \
     939        install-data-hook install-exec install-exec-am \
    957940        install-exec-local install-info install-info-am install-man \
    958941        install-pkgconfiglibDATA install-strip installcheck \
  • trunk/Cbc/cbc-uninstalled.pc.in

    r1566 r1660  
    77Version: @PACKAGE_VERSION@
    88Libs: ${libdir}/libCbcSolver.la ${libdir}/libCbc.la @CBCLIB_PCLIBS@
    9 Cflags: -I@abs_source_dir@/src -I@ABSBUILDDIR@/inc
     9Cflags: -I@abs_source_dir@/src -I@ABSBUILDDIR@/src
    1010Requires: @CBCLIB_PCREQUIRES@
  • trunk/Cbc/configure

    r1655 r1660  
    28772877        coin_opt_cflags="-O3"
    28782878        coin_add_cflags="-pipe"
    2879         coin_dbg_cflags="-g"
     2879        coin_dbg_cflags="-g -O0"
    28802880        coin_warn_cflags="-Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long"
    28812881        case $build in
     
    38093809        coin_opt_cxxflags="-O3"
    38103810        coin_add_cxxflags="-pipe"
    3811         coin_dbg_cxxflags="-g"
     3811        coin_dbg_cxxflags="-g -O0"
    38123812        coin_warn_cxxflags="-Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long"
    38133813        case $build in
     
    2101521015COINDEPEND_DATA_INSTALLED=
    2101621016
    21017 # initial list of dependencies is "cgl osi coinutils", but we need to filter out version number specifications (= x, <= x, >= x)
     21017# initial list of dependencies is "cgl osi coinutils", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2101821018projtoprocess="cgl osi coinutils"
    2101921019
     
    2154521545CLP_DATA_INSTALLED=
    2154621546
    21547 # initial list of dependencies is "osi-clp", but we need to filter out version number specifications (= x, <= x, >= x)
     21547# initial list of dependencies is "osi-clp", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2154821548projtoprocess="osi-clp"
    2154921549
     
    2204522045OSITESTS_DATA_INSTALLED=
    2204622046
    22047 # initial list of dependencies is "osi-unittests", but we need to filter out version number specifications (= x, <= x, >= x)
     22047# initial list of dependencies is "osi-unittests", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2204822048projtoprocess="osi-unittests"
    2204922049
     
    2250722507SAMPLE_DATA_INSTALLED=
    2250822508
    22509 # initial list of dependencies is "coindatasample", but we need to filter out version number specifications (= x, <= x, >= x)
     22509# initial list of dependencies is "coindatasample", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2251022510projtoprocess="coindatasample"
    2251122511
     
    2296922969NETLIB_DATA_INSTALLED=
    2297022970
    22971 # initial list of dependencies is "coindatanetlib", but we need to filter out version number specifications (= x, <= x, >= x)
     22971# initial list of dependencies is "coindatanetlib", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2297222972projtoprocess="coindatanetlib"
    2297322973
     
    2343123431MIPLIB3_DATA_INSTALLED=
    2343223432
    23433 # initial list of dependencies is "coindatamiplib3", but we need to filter out version number specifications (= x, <= x, >= x)
     23433# initial list of dependencies is "coindatamiplib3", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2343423434projtoprocess="coindatamiplib3"
    2343523435
     
    2517825178DYLP_DATA_INSTALLED=
    2517925179
    25180 # initial list of dependencies is "osi-dylp", but we need to filter out version number specifications (= x, <= x, >= x)
     25180# initial list of dependencies is "osi-dylp", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2518125181projtoprocess="osi-dylp"
    2518225182
     
    2565525655VOL_DATA_INSTALLED=
    2565625656
    25657 # initial list of dependencies is "osi-vol", but we need to filter out version number specifications (= x, <= x, >= x)
     25657# initial list of dependencies is "osi-vol", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2565825658projtoprocess="osi-vol"
    2565925659
     
    2614726147CPX_DATA_INSTALLED=
    2614826148
    26149 # initial list of dependencies is "osi-cplex", but we need to filter out version number specifications (= x, <= x, >= x)
     26149# initial list of dependencies is "osi-cplex", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2615026150projtoprocess="osi-cplex"
    2615126151
     
    2665426654GLPK_DATA_INSTALLED=
    2665526655
    26656 # initial list of dependencies is "osi-glpk", but we need to filter out version number specifications (= x, <= x, >= x)
     26656# initial list of dependencies is "osi-glpk", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2665726657projtoprocess="osi-glpk"
    2665826658
     
    2713127131GRB_DATA_INSTALLED=
    2713227132
    27133 # initial list of dependencies is "osi-gurobi", but we need to filter out version number specifications (= x, <= x, >= x)
     27133# initial list of dependencies is "osi-gurobi", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2713427134projtoprocess="osi-gurobi"
    2713527135
     
    2760827608MSK_DATA_INSTALLED=
    2760927609
    27610 # initial list of dependencies is "osi-mosek", but we need to filter out version number specifications (= x, <= x, >= x)
     27610# initial list of dependencies is "osi-mosek", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2761127611projtoprocess="osi-mosek"
    2761227612
     
    2810028100SPX_DATA_INSTALLED=
    2810128101
    28102 # initial list of dependencies is "osi-soplex", but we need to filter out version number specifications (= x, <= x, >= x)
     28102# initial list of dependencies is "osi-soplex", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2810328103projtoprocess="osi-soplex"
    2810428104
     
    2857728577XPR_DATA_INSTALLED=
    2857828578
    28579 # initial list of dependencies is "osi-xpress", but we need to filter out version number specifications (= x, <= x, >= x)
     28579# initial list of dependencies is "osi-xpress", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2858028580projtoprocess="osi-xpress"
    2858128581
     
    2904529045ASL_DATA_INSTALLED=
    2904629046
    29047 # initial list of dependencies is "coinasl", but we need to filter out version number specifications (= x, <= x, >= x)
     29047# initial list of dependencies is "coinasl", but we need to filter out version number specifications (= x, <= x, >= x, != x)
    2904829048projtoprocess="coinasl"
    2904929049
     
    3004630046
    3004730047# Here put the location and name of the configuration header file
    30048           ac_config_headers="$ac_config_headers inc/config_cbc.h"
     30048                    ac_config_headers="$ac_config_headers src/config.h src/config_cbc.h"
    3004930049
    3005030050
     
    3101531015  "doxydoc/doxygen.conf" ) CONFIG_FILES="$CONFIG_FILES doxydoc/doxygen.conf" ;;
    3101631016  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    31017   "inc/config_cbc.h" ) CONFIG_HEADERS="$CONFIG_HEADERS inc/config_cbc.h" ;;
     31017  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
     31018  "src/config_cbc.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config_cbc.h" ;;
    3101831019  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
    3101931020echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
  • trunk/Cbc/configure.ac

    r1646 r1660  
    352352
    353353# Here put the location and name of the configuration header file
    354 AC_CONFIG_HEADER([inc/config_cbc.h])
     354AC_CONFIG_HEADER([src/config.h src/config_cbc.h])
    355355
    356356# Finally, we let configure write all the output...
  • trunk/Cbc/examples/sample1.cpp

    r1574 r1660  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include <cassert>
    127
    138#include "CbcConfig.h"
     9#include "CoinPragma.hpp"
    1410
    1511// For Branch and bound
     
    1713#include "CbcModel.hpp"
    1814
    19 #ifdef COIN_HAS_CLP
    2015#include "OsiClpSolverInterface.hpp"
    21 #endif
    2216#include "ClpPresolve.hpp"
    2317#include "CbcCompareUser.hpp"
     
    8579  // Define your favorite OsiSolver
    8680 
    87 #ifdef COIN_HAS_CLP
    8881  ClpSimplex simplex;
    89 #endif
    9082  double time0 = cpuTime();
    9183  double time1 = time0;
  • trunk/Cbc/examples/sample2.cpp

    r1574 r1660  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include <cassert>
    127#include <iomanip>
    138
     9#include "CoinPragma.hpp"
    1410
    1511// For Branch and bound
  • trunk/Cbc/examples/sample3.cpp

    r1574 r1660  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <assert.h>
     
    2320#include "CbcCutGenerator.hpp"
    2421#include "CbcHeuristicLocal.hpp"
    25 #ifdef COIN_HAS_CLP
    2622#include "OsiClpSolverInterface.hpp"
    27 #endif
    28 #ifdef COIN_HAS_OSL
    29 #include "OsiOslSolverInterface.hpp"
    30 #endif
    3123
    3224// Cuts
     
    9587  // Define your favorite OsiSolver
    9688 
    97 #ifdef COIN_HAS_CLP
    9889  OsiClpSolverInterface solver1;
    9990  //solver1.messageHandler()->setLogLevel(0);
    10091  solver1.getModelPtr()->setDualBound(1.0e10);
    101 #endif
    102 #ifdef COIN_HAS_OSL
    103   OsiOslSolverInterface solver1;
    104   //solver1.messageHandler()->setLogLevel(0);
    105 #endif
    10692
    10793  // Read in model using argv[1]
  • trunk/Cbc/examples/sample4.cpp

    r1574 r1660  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <cassert>
     
    2219#include "CbcCompareUser.hpp"
    2320#include "CoinTime.hpp"
    24 #ifdef COIN_HAS_CLP
    2521#include "OsiClpSolverInterface.hpp"
    26 #endif
    2722
    2823//#############################################################################
     
    4641  // Define your favorite OsiSolver
    4742 
    48 #ifdef COIN_HAS_CLP
    4943  OsiClpSolverInterface solver1;
    5044  //solver1.messageHandler()->setLogLevel(0);
    5145  CbcModel model(solver1);
    52 #endif
    5346  model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
    5447
  • trunk/Cbc/examples/sample5.cpp

    r1574 r1660  
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    55
    6 #if defined(_MSC_VER)
    7 // Turn off compiler warning about long names
    8 #  pragma warning(disable:4786)
    9 #endif
    10 
    116#include "CbcConfig.h"
     7
     8#include "CoinPragma.hpp"
    129
    1310#include <cassert>
     
    2219#include "CbcCutGenerator.hpp"
    2320#include "CbcHeuristicLocal.hpp"
    24 #ifdef COIN_HAS_CLP
    2521#include "OsiClpSolverInterface.hpp"
    26 #endif
    27 #ifdef COIN_HAS_OSL
    28 #include "OsiOslSolverInterface.hpp"
    29 #endif
    3022
    3123// Cuts
     
    8274  */
    8375 
    84 #ifdef COIN_HAS_CLP
    8576  OsiClpSolverInterface solver1;
    86 #elif COIN_HAS_OSL
    87   OsiOslSolverInterface solver1;
    88 #endif
    8977  /* From now on we can build model in a solver independent way.
    9078     You can add rows one at a time but for large problems this is slow so
     
    215203  model.addCutGenerator(&mixedGen,-1,"MixedIntegerRounding");
    216204
    217 #ifdef COIN_HAS_CLP
    218205  OsiClpSolverInterface * osiclp = dynamic_cast< OsiClpSolverInterface*> (model.solver());
    219206  // go faster stripes
     
    223210    printf("may not be safe if doing cuts in tree which need accuracy (level 2 anyway)\n");
    224211  }
    225 #endif
    226212
    227213  // Allow rounding heuristic
  • trunk/Cbc/src/CbcConfig.h

    r1578 r1660  
    1 /* $Id$ */
    2 /*
     1/* Copyright (C) 2011
     2 * All Rights Reserved.
     3 * This code is published under the Eclipse Public License.
     4 *
     5 * $Id$
     6 *
    37 * Include file for the configuration of Cbc.
    48 *
     
    1216 * macros that depend on the operating system and the compiler.  The
    1317 * macros that define the configuration of the particular user setting
    14  * (e.g., presence of other COIN packages or third party code) are set
    15  * here.  The project maintainer needs to remember to update this file
    16  * and choose reasonable defines.  A user can modify the default
    17  * setting by editing this file here.
     18 * (e.g., presence of other COIN-OR packages or third party code) are set
     19 * by the files config_*default.h. The project maintainer needs to remember
     20 * to update these file and choose reasonable defines.
     21 * A user can modify the default setting by editing the config_*default.h files.
    1822 *
    1923 */
     
    2327
    2428#ifdef HAVE_CONFIG_H
     29#ifdef CBC_BUILD
     30#include "config.h"
     31#else
    2532#include "config_cbc.h"
    26 
    27 /* undefine macros that could conflict with those in other config.h
    28    files */
    29 #undef PACKAGE
    30 #undef PACKAGE_BUGREPORT
    31 #undef PACKAGE_NAME
    32 #undef PACKAGE_STRING
    33 #undef PACKAGE_TARNAME
    34 #undef PACKAGE_VERSION
    35 #undef VERSION
     33#endif
    3634
    3735#else /* HAVE_CONFIG_H */
    3836
    39 /* include the COIN-wide system specific configure header */
    40 #include "configall_system.h"
    41 
    42 /***************************************************************************/
    43 /*             HERE DEFINE THE CONFIGURATION SPECIFIC MACROS               */
    44 /***************************************************************************/
    45 
    46 /* Define to the debug sanity check level (0 is no test) */
    47 #define COIN_CBC_CHECKLEVEL 0
    48 
    49 /* Define to the debug verbosity level (0 is no output) */
    50 #define COIN_CBC_VERBOSITY 0
    51 
    52 /* Define to 1 if the Cbc package is used */
    53 #define COIN_HAS_CBC 1
    54 
    55 /* Define to 1 if the Cgl package is used */
    56 #define COIN_HAS_CGL 1
    57 
    58 /* Define to 1 if the Clp package is used */
    59 #define COIN_HAS_CLP 1
    60 
    61 /* Define to 1 if the CoinUtils package is used */
    62 #define COIN_HAS_COINUTILS 1
    63 
    64 /* Define to 1 if the Osi package is used */
    65 #define COIN_HAS_OSI 1
    66 
    67 /* Define to 1 if the Vol package is used */
    68 #define COIN_HAS_VOL 1
    69 
    70 /* Define to 1 if the Cplex package is used */
    71 /* #undef COIN_HAS_CPX */
    72 
    73 /* Define to 1 if the Dylp package is used */
    74 /* #undef COIN_HAS_DYLP */
    75 
    76 /* Define to 1 if the FortMP package is used */
    77 /* #undef COIN_HAS_FMP */
    78 
    79 /* Define to 1 if the Glpk package is used */
    80 /* #undef COIN_HAS_GLPK */
    81 
    82 /* Define to 1 if the Mosek package is used */
    83 /* #undef COIN_HAS_MSK */
    84 
    85 /* Define to 1 if the Osl package is used */
    86 /* #undef COIN_HAS_OSL */
    87 
    88 /* Define to 1 if the Soplex package is used */
    89 /* #undef COIN_HAS_SPX */
    90 
    91 /* Define to 1 if the Sym package is used */
    92 /* #undef COIN_HAS_SYM */
    93 
    94 /* Define to 1 if the Xpress package is used */
    95 /* #undef COIN_HAS_XPR */
    96 
    97 /* Cbc version */
    98 #define CBC_VERSION "trunk"
    99 
    100 /*
    101   For additional information about how to set OSICBC_DFLT_SOLVER,
    102   OSICBC_DFLT_SOLVER_CLP, and OSICBC_DFLT_SOLVER_HPP, please see comments at
    103   the beginning of OsiCbcSolverInterface.cpp. Unless you know what you're
    104   doing, you should use clp with OsiCbc. Just uncomment the next three
    105   defines.
    106 */
    107 /*
    108   Define to the name of the default solver interface class, e.g.,
    109   OsiClpSolverInterface.
    110 */
    111 /* #define OSICBC_DFLT_SOLVER OsiClpSolverInterface */
    112 
    113 /* Define this symbol if clp is the default solver. */
    114 /* #define OSICBC_DFLT_SOLVER_CLP 1 */
    115 
    116 /*
    117   Define to the name of the .hpp file for the default solver interface class,
    118   e.g., "OsiClpSolverInterface.hpp" (include quotes)
    119 */
    120 /* #define OSICBC_DFLT_SOLVER_HPP "OsiClpSolverInterface.hpp" */
     37#ifdef CBC_BUILD
     38#include "config_default.h"
     39#else
     40#include "config_cbc_default.h"
     41#endif
    12142
    12243#endif /* HAVE_CONFIG_H */
    12344
    124 #endif /* __CBCCONFIG_H__ */
     45#endif /*__CBCCONFIG_H__*/
  • trunk/Cbc/src/Makefile.am

    r1598 r1660  
    186186AM_CPPFLAGS += -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG
    187187
    188 # This line is necessary to allow VPATH compilation with MS compilers
    189 # on Cygwin
    190 DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
     188# This line is necessary to allow VPATH compilation
     189DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src
    191190
    192191########################################################################
     
    198197includecoindir = $(includedir)/coin
    199198includecoin_HEADERS = \
    200         ../inc/config_cbc.h \
    201199        Cbc_C_Interface.h \
    202200        CbcBranchActual.hpp \
     
    269267        ClpAmplObjective.hpp
    270268
    271 #############################################################################
    272 # Create the Config.h file that always defines HAVE_CONFIG_H and install it #
    273 #############################################################################
    274 
    275 # You only need to adapt the following line
    276 ConfigHeader = CbcConfig.h
    277 
    278269install-exec-local:
    279         echo "#ifndef HAVE_CONFIG_H" >bla
    280         echo "#define HAVE_CONFIG_H" >>bla
    281         echo "#endif" >> bla
    282         cat $(srcdir)/$(ConfigHeader) >> bla
    283         $(install_sh_DATA) bla $(DESTDIR)$(includecoindir)/$(ConfigHeader)
    284         rm -f bla
     270        $(install_sh_DATA) config_cbc.h $(DESTDIR)$(includecoindir)/CbcConfig.h
    285271
    286272uninstall-local:
    287         rm -f $(DESTDIR)$(includecoindir)/$(ConfigHeader)
     273        rm -f $(DESTDIR)$(includecoindir)/CbcConfig.h
  • trunk/Cbc/src/Makefile.in

    r1646 r1660  
    6969subdir = src
    7070DIST_COMMON = $(includecoin_HEADERS) $(srcdir)/Makefile.am \
    71         $(srcdir)/Makefile.in
     71        $(srcdir)/Makefile.in $(srcdir)/config.h.in \
     72        $(srcdir)/config_cbc.h.in
    7273ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    7374am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
     
    7677        $(ACLOCAL_M4)
    7778mkinstalldirs = $(install_sh) -d
    78 CONFIG_HEADER = $(top_builddir)/inc/config_cbc.h
     79CONFIG_HEADER = config.h config_cbc.h
    7980CONFIG_CLEAN_FILES =
    8081am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
     
    646647@CBC_BUILD_CBC_GENERIC_TRUE@cbc_generic_LDFLAGS = -rpath $(libdir)
    647648
    648 # This line is necessary to allow VPATH compilation with MS compilers
    649 # on Cygwin
    650 DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
     649# This line is necessary to allow VPATH compilation
     650DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src
    651651
    652652########################################################################
     
    658658includecoindir = $(includedir)/coin
    659659includecoin_HEADERS = \
    660         ../inc/config_cbc.h \
    661660        Cbc_C_Interface.h \
    662661        CbcBranchActual.hpp \
     
    729728        ClpAmplObjective.hpp
    730729
    731 
    732 #############################################################################
    733 # Create the Config.h file that always defines HAVE_CONFIG_H and install it #
    734 #############################################################################
    735 
    736 # You only need to adapt the following line
    737 ConfigHeader = CbcConfig.h
    738 all: all-recursive
     730all: config.h config_cbc.h
     731        $(MAKE) $(AM_MAKEFLAGS) all-recursive
    739732
    740733.SUFFIXES:
     
    769762$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
    770763        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     764
     765config.h: stamp-h1
     766        @if test ! -f $@; then \
     767          rm -f stamp-h1; \
     768          $(MAKE) stamp-h1; \
     769        else :; fi
     770
     771stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
     772        @rm -f stamp-h1
     773        cd $(top_builddir) && $(SHELL) ./config.status src/config.h
     774$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
     775        cd $(top_srcdir) && $(AUTOHEADER)
     776        rm -f stamp-h1
     777        touch $@
     778
     779config_cbc.h: stamp-h2
     780        @if test ! -f $@; then \
     781          rm -f stamp-h2; \
     782          $(MAKE) stamp-h2; \
     783        else :; fi
     784
     785stamp-h2: $(srcdir)/config_cbc.h.in $(top_builddir)/config.status
     786        @rm -f stamp-h2
     787        cd $(top_builddir) && $(SHELL) ./config.status src/config_cbc.h
     788
     789distclean-hdr:
     790        -rm -f config.h stamp-h1 config_cbc.h stamp-h2
    771791install-libLTLIBRARIES: $(lib_LTLIBRARIES)
    772792        @$(NORMAL_INSTALL)
     
    10561076tags: TAGS
    10571077
    1058 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
     1078TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in config_cbc.h.in $(TAGS_DEPENDENCIES) \
    10591079                $(TAGS_FILES) $(LISP)
    10601080        tags=; \
     
    10731093          fi; \
    10741094        done; \
    1075         list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
     1095        list='$(SOURCES) $(HEADERS) config.h.in config_cbc.h.in $(LISP) $(TAGS_FILES)'; \
    10761096        unique=`for i in $$list; do \
    10771097            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
     
    10851105        fi
    10861106ctags: CTAGS
    1087 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
     1107CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in config_cbc.h.in $(TAGS_DEPENDENCIES) \
    10881108                $(TAGS_FILES) $(LISP)
    10891109        tags=; \
    10901110        here=`pwd`; \
    1091         list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
     1111        list='$(SOURCES) $(HEADERS) config.h.in config_cbc.h.in $(LISP) $(TAGS_FILES)'; \
    10921112        unique=`for i in $$list; do \
    10931113            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
     
    11081128
    11091129distdir: $(DISTFILES)
    1110         $(mkdir_p) $(distdir)/../inc
    11111130        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    11121131        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    11521171check-am: all-am
    11531172check: check-recursive
    1154 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
     1173all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h \
     1174                config_cbc.h
    11551175install-binPROGRAMS: install-libLTLIBRARIES
    11561176
     
    11931213        -rm -f Makefile
    11941214distclean-am: clean-am distclean-compile distclean-generic \
    1195         distclean-libtool distclean-tags
     1215        distclean-hdr distclean-libtool distclean-tags
    11961216
    11971217dvi: dvi-recursive
     
    12421262        clean clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
    12431263        clean-libtool clean-recursive ctags ctags-recursive distclean \
    1244         distclean-compile distclean-generic distclean-libtool \
    1245         distclean-recursive distclean-tags distdir dvi dvi-am html \
    1246         html-am info info-am install install-am install-binPROGRAMS \
    1247         install-data install-data-am install-exec install-exec-am \
    1248         install-exec-local install-includecoinHEADERS install-info \
    1249         install-info-am install-libLTLIBRARIES install-man \
    1250         install-strip installcheck installcheck-am installdirs \
    1251         installdirs-am maintainer-clean maintainer-clean-generic \
    1252         maintainer-clean-recursive mostlyclean mostlyclean-compile \
    1253         mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
    1254         pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
     1264        distclean-compile distclean-generic distclean-hdr \
     1265        distclean-libtool distclean-recursive distclean-tags distdir \
     1266        dvi dvi-am html html-am info info-am install install-am \
     1267        install-binPROGRAMS install-data install-data-am install-exec \
     1268        install-exec-am install-exec-local install-includecoinHEADERS \
     1269        install-info install-info-am install-libLTLIBRARIES \
     1270        install-man install-strip installcheck installcheck-am \
     1271        installdirs installdirs-am maintainer-clean \
     1272        maintainer-clean-generic maintainer-clean-recursive \
     1273        mostlyclean mostlyclean-compile mostlyclean-generic \
     1274        mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
     1275        tags tags-recursive uninstall uninstall-am \
    12551276        uninstall-binPROGRAMS uninstall-includecoinHEADERS \
    12561277        uninstall-info-am uninstall-libLTLIBRARIES uninstall-local
     
    12581279
    12591280install-exec-local:
    1260         echo "#ifndef HAVE_CONFIG_H" >bla
    1261         echo "#define HAVE_CONFIG_H" >>bla
    1262         echo "#endif" >> bla
    1263         cat $(srcdir)/$(ConfigHeader) >> bla
    1264         $(install_sh_DATA) bla $(DESTDIR)$(includecoindir)/$(ConfigHeader)
    1265         rm -f bla
     1281        $(install_sh_DATA) config_cbc.h $(DESTDIR)$(includecoindir)/CbcConfig.h
    12661282
    12671283uninstall-local:
    1268         rm -f $(DESTDIR)$(includecoindir)/$(ConfigHeader)
     1284        rm -f $(DESTDIR)$(includecoindir)/CbcConfig.h
    12691285# Tell versions [3.59,3.63) of GNU make to not export all variables.
    12701286# Otherwise a system limit (for SysV at least) may be exceeded.
  • trunk/Cbc/src/OsiCbc/Makefile.am

    r1568 r1660  
    6666endif
    6767
    68 # This line is necessary to allow VPATH compilation with MS compilers
    69 # on Cygwin
    70 DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
     68# This line is necessary to allow VPATH compilation
     69DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
    7170
    7271########################################################################
  • trunk/Cbc/src/OsiCbc/Makefile.in

    r1646 r1660  
    6363        $(ACLOCAL_M4)
    6464mkinstalldirs = $(install_sh) -d
    65 CONFIG_HEADER = $(top_builddir)/inc/config_cbc.h
     65CONFIG_HEADER = $(top_builddir)/src/config.h \
     66        $(top_builddir)/src/config_cbc.h
    6667CONFIG_CLEAN_FILES =
    6768am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
     
    450451        $(am__append_7) $(am__append_8)
    451452
    452 # This line is necessary to allow VPATH compilation with MS compilers
    453 # on Cygwin
    454 DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/inc
     453# This line is necessary to allow VPATH compilation
     454DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I..
    455455
    456456########################################################################
  • trunk/Cbc/test/Makefile.am

    r1611 r1660  
    6767AM_CPPFLAGS += $(CLP_CFLAGS) $(CPX_CFLAGS) $(DYLP_CFLAGS) $(GLPK_CFLAGS) $(MSK_CFLAGS) $(VOL_CFLAGS) $(XPR_CFLAGS)
    6868
     69# This line is necessary to allow VPATH compilation
     70DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src
     71
    6972########################################################################
    7073#                         unitTest for OsiCbc                          #
  • trunk/Cbc/test/Makefile.in

    r1646 r1660  
    5858        $(ACLOCAL_M4)
    5959mkinstalldirs = $(install_sh) -d
    60 CONFIG_HEADER = $(top_builddir)/inc/config_cbc.h
     60CONFIG_HEADER = $(top_builddir)/src/config.h \
     61        $(top_builddir)/src/config_cbc.h
    6162CONFIG_CLEAN_FILES =
    6263am__installdirs = "$(DESTDIR)$(bindir)"
     
    6970        OsiCbcSolverInterfaceTest.$(OBJEXT)
    7071osiUnitTest_OBJECTS = $(am_osiUnitTest_OBJECTS)
    71 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/inc
    7272depcomp = $(SHELL) $(top_srcdir)/depcomp
    7373am__depfiles_maybe = depfiles
     
    424424        -I`$(CYGPATH_W) $(srcdir)/../src/OsiCbc`
    425425
     426# This line is necessary to allow VPATH compilation
     427DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src
     428
    426429########################################################################
    427430#                         unitTest for OsiCbc                          #
Note: See TracChangeset for help on using the changeset viewer.