source: ThirdParty/Glpk/branches/autotools-update/glpk_config.patch

Last change on this file was 4056, checked in by lou, 5 months ago

Second try, rewriting glpk's configuration source files. Went with Stefan's
suggestion to stop trying to pass values and just add COIN macros to glpk's
configure.ac. More straightforward.

File size: 2.3 KB
RevLine 
[4050]1--- glpk/configure.ac   2018-02-15 23:00:00.000000000 -0800
[4056]2+++ glpk/configure.ac   2020-01-14 17:12:57.170996200 -0800
3@@ -4,9 +4,26 @@
[4050]4 
[4056]5 AC_CONFIG_SRCDIR([src/glpk.h])
[4050]6 
[4056]7-AC_CONFIG_MACRO_DIR([m4])
8+# Add standard COIN initialisation and build macros.
9 
10-AM_INIT_AUTOMAKE
11+AC_COIN_INITIALIZE(glpk)
[4050]12+
[4056]13+# Get the name of the C compiler and appropriate compiler options. If the
14+# compile script is already in the cached name from ThirdParty/Glpk's
15+# configure, strip it. COIN_PROG_CC will wrap it again. Quadrigraphs
16+# because autoconf processing eats square brackets.
[4050]17+
[4056]18+if expr "$ac_cv_prog_CC" : '^.*/compile @<:@^ @:>@*$' >/dev/null 2>&1 ; then
19+  ac_cv_prog_CC=`expr "$ac_cv_prog_CC" : '^.*/compile \(@<:@^ @:>@*\)$'`
20+  CC=$ac_cv_prog_CC
21+fi
22+AC_COIN_PROG_CC
[4050]23+
[4056]24+# Set up libtool.
25+
26+AC_COIN_PROG_LIBTOOL
27+
28+# End of COIN macros.
[4050]29 
[4056]30 AC_CONFIG_HEADERS([config.h])
[4050]31 
[4056]32@@ -56,16 +73,6 @@
33       esac],
34    [enable_reentrant=yes])
[4050]35 
[4056]36-dnl Disable unnecessary libtool tests
37-define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
38-define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
39-define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
40-
41-dnl Check for programs
42-AC_PROG_CC
43-AC_PROG_INSTALL
44-AC_PROG_LIBTOOL
45-
46 dnl Check for math library
47 AC_CHECK_LIB([m], [exp])
[4050]48 
49--- glpk/src/Makefile.am        2018-02-15 23:00:00.000000000 -0800
[4056]50+++ glpk/src/Makefile.am        2020-01-14 14:24:47.532399900 -0800
51@@ -1,10 +1,14 @@
52 ## Process this file with automake to produce Makefile.in ##
[4050]53 
[4056]54+AUTOMAKE_OPTIONS = subdir-objects
55+
[4050]56 include_HEADERS = glpk.h
57 
58-lib_LTLIBRARIES = libglpk.la
59+# Change name from libglpk to libcoinglpk.
[4056]60+
61+lib_LTLIBRARIES = libcoinglpk.la
[4050]62 
63-libglpk_la_CPPFLAGS = \
64+libcoinglpk_la_CPPFLAGS = \
65 -I$(srcdir) \
66 -I$(srcdir)/amd \
67 -I$(srcdir)/api \
[4056]68@@ -21,12 +25,12 @@
[4050]69 -I$(srcdir)/simplex \
70 -I$(srcdir)/zlib
71 
72-libglpk_la_LDFLAGS = \
73+libcoinglpk_la_LDFLAGS = \
74 -version-info 43:0:3 \
75 -export-symbols-regex '^glp_*' \
76 ${NOUNDEFINED}
77 
78-libglpk_la_SOURCES = \
79+libcoinglpk_la_SOURCES = \
80 amd/amd_1.c \
81 amd/amd_2.c \
82 amd/amd_aat.c \
[4056]83--- glpk/examples/Makefile.am   2018-02-15 23:00:00.000000000 -0800
84+++ glpk/examples/Makefile.am   2020-01-14 13:46:52.053812700 -0800
85@@ -2,7 +2,9 @@
86 
87 AM_CPPFLAGS = -I$(srcdir)/../src
88 
89-LDADD = ../src/libglpk.la
90+# Change name from libglpk to libcoinglpk.
91+
92+LDADD = ../src/libcoinglpk.la
93 
94 bin_PROGRAMS = glpsol
95 
Note: See TracBrowser for help on using the repository browser.