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