Changeset 3246 for ThirdParty/Glpk


Ignore:
Timestamp:
Jun 29, 2014 6:16:45 PM (5 years ago)
Author:
stefan
Message:

reorganize initialization macros

Location:
ThirdParty/Glpk/branches/autotools-update
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Glpk/branches/autotools-update/configure

    r3239 r3246  
    721721CFLAGS
    722722CC
     723COIN_DESTDIR
    723724build_os
    724725build_vendor
    725726build_cpu
    726727build
     728ALWAYS_FALSE_FALSE
     729ALWAYS_FALSE_TRUE
    727730GLPK_SVN_REV
    728731have_svnversion
    729 COIN_DESTDIR
    730732target_alias
    731733host_alias
     
    22412243
    22422244
    2243 # Where should everything be installed by default?  Here, we want it
    2244 # to be installed directly in 'bin', 'lib', 'include' subdirectories
    2245 # of the directory where configure is run.  The default would be
    2246 # /usr/local.
    2247 
    2248 
    2249 
    2250 # figure out whether there is a base directory up from here
    2251 coin_base_directory=
    2252 if test -e ../coin_subdirs.txt ; then
    2253   coin_base_directory=`cd ..; pwd`
    2254 elif test -e ../../coin_subdirs.txt ; then
    2255   coin_base_directory=`cd ../..; pwd`
    2256 fi
    2257 
    2258 if test "x$coin_base_directory" != x ; then
    2259   COIN_DESTDIR=$coin_base_directory/coinstash
    2260 fi
    2261 
    2262 
    2263 # Set the project's version numbers
    2264 
    2265 
    2266 cat >>confdefs.h <<_ACEOF
    2267 #define GLPK_VERSION "$PACKAGE_VERSION"
    2268 _ACEOF
    2269 
    2270 
    2271   coin_majorver=`echo $PACKAGE_VERSION | sed -n -e 's/^\([0-9]*\).*/\1/gp'`
    2272   coin_minorver=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.\([0-9]*\).*/\1/gp'`
    2273   coin_releasever=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/gp'`
    2274   if test "x$coin_majorver" = x ; then coin_majorver=9999 ; fi
    2275   if test "x$coin_minorver" = x ; then coin_minorver=9999 ; fi
    2276   if test "x$coin_releasever" = x ; then coin_releasever=9999 ; fi
    2277 
    2278 cat >>confdefs.h <<_ACEOF
    2279 #define GLPK_VERSION_MAJOR $coin_majorver
    2280 _ACEOF
    2281 
    2282 
    2283 cat >>confdefs.h <<_ACEOF
    2284 #define GLPK_VERSION_MINOR $coin_minorver
    2285 _ACEOF
    2286 
    2287 
    2288 cat >>confdefs.h <<_ACEOF
    2289 #define GLPK_VERSION_RELEASE $coin_releasever
    2290 _ACEOF
    2291 
    2292 
    2293   # We use the following variable to have a string with the upper case
    2294   # version of the project name
    2295   COIN_PRJCT=GLPK
    2296 
    2297   # Set the project's SVN revision number. The complicated sed expression
    2298   # (made worse by quadrigraphs) ensures that things like 4123:4168MS end up
    2299   # as a single number.
    2300   # Extract the first word of "svnversion", so it can be a program name with args.
    2301 set dummy svnversion; ac_word=$2
    2302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    2303 $as_echo_n "checking for $ac_word... " >&6; }
    2304 if ${ac_cv_prog_have_svnversion+:} false; then :
    2305   $as_echo_n "(cached) " >&6
    2306 else
    2307   if test -n "$have_svnversion"; then
    2308   ac_cv_prog_have_svnversion="$have_svnversion" # Let the user override the test.
    2309 else
    2310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    2311 for as_dir in $PATH
    2312 do
    2313   IFS=$as_save_IFS
    2314   test -z "$as_dir" && as_dir=.
    2315     for ac_exec_ext in '' $ac_executable_extensions; do
    2316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    2317     ac_cv_prog_have_svnversion="yes"
    2318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    2319     break 2
    2320   fi
    2321 done
    2322   done
    2323 IFS=$as_save_IFS
    2324 
    2325   test -z "$ac_cv_prog_have_svnversion" && ac_cv_prog_have_svnversion="no"
    2326 fi
    2327 fi
    2328 have_svnversion=$ac_cv_prog_have_svnversion
    2329 if test -n "$have_svnversion"; then
    2330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_svnversion" >&5
    2331 $as_echo "$have_svnversion" >&6; }
    2332 else
    2333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2334 $as_echo "no" >&6; }
    2335 fi
    2336 
    2337 
    2338   if test "x$have_svnversion" = xyes; then
    2339 
    2340     svn_rev_tmp=`LANG=en_EN svnversion $srcdir 2>/dev/null`
    2341     if test "x$svn_rev_tmp" != xexported -a "x$svn_rev_tmp" != x -a "x$svn_rev_tmp" != "xUnversioned directory"; then
    2342       GLPK_SVN_REV=`echo $svn_rev_tmp | sed -n -e 's/^[0-9]*://' -e 's/\([0-9]\)[^0-9]*$/\1/p'`
    2343 
    2344 cat >>confdefs.h <<_ACEOF
    2345 #define GLPK_SVN_REV $GLPK_SVN_REV
    2346 _ACEOF
    2347 
    2348     fi
    2349   fi
    2350 
    2351 
    2352 
    2353 # Capture libtool library version, if given.
    2354 
    2355 
    2356 
    2357 
    2358 #############################################################################
    2359 #                         Standard build tool stuff                         #
    2360 #############################################################################
    2361 
    2362 # Get the system type
    23632245ac_aux_dir=
    23642246for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
     
    24282310
    24292311
     2312
     2313
     2314
     2315
     2316# Set the project's version numbers
     2317
     2318
     2319cat >>confdefs.h <<_ACEOF
     2320#define GLPK_VERSION "$PACKAGE_VERSION"
     2321_ACEOF
     2322
     2323
     2324  coin_majorver=`echo $PACKAGE_VERSION | sed -n -e 's/^\([0-9]*\).*/\1/gp'`
     2325  coin_minorver=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.\([0-9]*\).*/\1/gp'`
     2326  coin_releasever=`echo $PACKAGE_VERSION | sed -n -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/gp'`
     2327  test -z "$coin_majorver"   && coin_majorver=9999
     2328  test -z "$coin_minorver"   && coin_minorver=9999
     2329  test -z "$coin_releasever" && coin_releasever=9999
     2330
     2331cat >>confdefs.h <<_ACEOF
     2332#define GLPK_VERSION_MAJOR $coin_majorver
     2333_ACEOF
     2334
     2335
     2336cat >>confdefs.h <<_ACEOF
     2337#define GLPK_VERSION_MINOR $coin_minorver
     2338_ACEOF
     2339
     2340
     2341cat >>confdefs.h <<_ACEOF
     2342#define GLPK_VERSION_RELEASE $coin_releasever
     2343_ACEOF
     2344
     2345
     2346  # We use the following variable to have a string with the upper case
     2347  # version of the project name
     2348  COIN_PRJCT=GLPK
     2349
     2350  # Set the project's SVN revision number. The complicated sed expression
     2351  # (made worse by quadrigraphs) ensures that things like 4123:4168MS end up
     2352  # as a single number.
     2353  # Extract the first word of "svnversion", so it can be a program name with args.
     2354set dummy svnversion; ac_word=$2
     2355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2356$as_echo_n "checking for $ac_word... " >&6; }
     2357if ${ac_cv_prog_have_svnversion+:} false; then :
     2358  $as_echo_n "(cached) " >&6
     2359else
     2360  if test -n "$have_svnversion"; then
     2361  ac_cv_prog_have_svnversion="$have_svnversion" # Let the user override the test.
     2362else
     2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2364for as_dir in $PATH
     2365do
     2366  IFS=$as_save_IFS
     2367  test -z "$as_dir" && as_dir=.
     2368    for ac_exec_ext in '' $ac_executable_extensions; do
     2369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2370    ac_cv_prog_have_svnversion="yes"
     2371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2372    break 2
     2373  fi
     2374done
     2375  done
     2376IFS=$as_save_IFS
     2377
     2378  test -z "$ac_cv_prog_have_svnversion" && ac_cv_prog_have_svnversion="no"
     2379fi
     2380fi
     2381have_svnversion=$ac_cv_prog_have_svnversion
     2382if test -n "$have_svnversion"; then
     2383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_svnversion" >&5
     2384$as_echo "$have_svnversion" >&6; }
     2385else
     2386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2387$as_echo "no" >&6; }
     2388fi
     2389
     2390
     2391  if test "x$have_svnversion" = xyes; then
     2392
     2393    svn_rev_tmp=`LANG=en_EN svnversion $srcdir 2>/dev/null`
     2394    if test "x$svn_rev_tmp" != xexported -a "x$svn_rev_tmp" != x -a "x$svn_rev_tmp" != "xUnversioned directory"; then
     2395      GLPK_SVN_REV=`echo $svn_rev_tmp | sed -n -e 's/^[0-9]*://' -e 's/\([0-9]\)[^0-9]*$/\1/p'`
     2396
     2397cat >>confdefs.h <<_ACEOF
     2398#define GLPK_SVN_REV $GLPK_SVN_REV
     2399_ACEOF
     2400
     2401    fi
     2402  fi
     2403
     2404
     2405
     2406# Capture libtool library version, if given.
     2407
     2408
     2409
     2410# A useful makefile conditional that is always false
     2411 if false; then
     2412  ALWAYS_FALSE_TRUE=
     2413  ALWAYS_FALSE_FALSE='#'
     2414else
     2415  ALWAYS_FALSE_TRUE='#'
     2416  ALWAYS_FALSE_FALSE=
     2417fi
     2418
     2419
     2420# Where should everything be installed by default?  Here, we want it
     2421# to be installed directly in 'bin', 'lib', 'include' subdirectories
     2422# of the directory where configure is run.  The default would be
     2423# /usr/local.
     2424
     2425
     2426# Get the system type
     2427
     2428
     2429
     2430# figure out whether there is a base directory up from here
     2431coin_base_directory=
     2432if test -e ../.coin_subdirs.txt ; then
     2433  coin_base_directory=`cd ..; pwd`
     2434elif test -e ../../.coin_subdirs.txt ; then
     2435  coin_base_directory=`cd ../..; pwd`
     2436fi
     2437
     2438if test "x$coin_base_directory" != x ; then
     2439  COIN_DESTDIR=$coin_base_directory/.coinstash
     2440fi
     2441
     2442
     2443
     2444#############################################################################
     2445#                         Standard build tool stuff                         #
     2446#############################################################################
    24302447
    24312448#turn off warnings and pedantic mode since it seem to make trouble on solaris platform
     
    1200312020if test "x$coin_subdirs" != x; then
    1200412021  # write coin_subdirs to a file so that project configuration knows where to find uninstalled projects
    12005   echo $coin_subdirs > coin_subdirs.txt
     12022  echo $coin_subdirs > .coin_subdirs.txt
    1200612023else
    1200712024  # substitute for OBJDIR, needed to setup .pc file for uninstalled project
     
    1212012137
    1212112138
     12139if test -z "${ALWAYS_FALSE_TRUE}" && test -z "${ALWAYS_FALSE_FALSE}"; then
     12140  as_fn_error $? "conditional \"ALWAYS_FALSE\" was never defined.
     12141Usually this means the macro was only invoked conditionally." "$LINENO" 5
     12142fi
    1212212143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
    1212312144$as_echo_n "checking that generated files are newer than configure... " >&6; }
  • ThirdParty/Glpk/branches/autotools-update/configure.ac

    r3239 r3246  
    88#                       Names and other basic things                        #
    99#############################################################################
    10 
    11 AC_PREREQ(2.59)
    1210
    1311AC_INIT([ThirdPartyGlpk],[trunk],[http://projects.coin-or.org/BuildTools/newticket])
     
    2321AC_CONFIG_SRCDIR(glpk/src/glpk.h)
    2422
    25 # Where should everything be installed by default?  Here, we want it
    26 # to be installed directly in 'bin', 'lib', 'include' subdirectories
    27 # of the directory where configure is run.  The default would be
    28 # /usr/local.
    29 AC_PREFIX_DEFAULT([`pwd`])
    30 
    31 AC_COIN_INITIALIZE(Glpk)
     23AC_COIN_PROJECTDIR_INITIALIZE(Glpk)
    3224
    3325#############################################################################
    3426#                         Standard build tool stuff                         #
    3527#############################################################################
    36 
    37 # Get the system type
    38 AC_CANONICAL_BUILD
    3928
    4029#turn off warnings and pedantic mode since it seem to make trouble on solaris platform
Note: See TracChangeset for help on using the changeset viewer.