]>
Commit | Line | Data |
---|---|---|
59408f2c AB |
1 | diff -Naur colm-0.14.7.orig/configure.ac colm-0.14.7/configure.ac |
2 | --- colm-0.14.7.orig/configure.ac 2021-02-10 07:13:17.000000000 +0100 | |
3 | +++ colm-0.14.7/configure.ac 2023-01-22 16:50:04.910666917 +0100 | |
4 | @@ -45,6 +45,7 @@ | |
5 | AC_CHECK_TOOL(AR, ar) | |
6 | AC_PROG_RANLIB | |
7 | AC_PROG_LIBTOOL | |
8 | + | |
9 | SED_SUBST=["\ | |
10 | -e 's|@CXX@|${CXX}|g' \ | |
11 | -e 's|@CC@|${CC}|g' \ | |
12 | @@ -424,6 +425,13 @@ | |
13 | echo "#define VERSION \"$VERSION\"" > src/version.h | |
14 | echo "#define PUBDATE \"$PUBDATE\"" >> src/version.h | |
15 | ||
16 | +if test "x$enable_static" = "xyes"; then | |
17 | + AC_DEFINE([LINK_STATIC], [1], [Link static lib when invoking C compile and link]) | |
18 | +fi | |
19 | + | |
20 | +if test "x$enable_shared" = "xyes"; then | |
21 | + AC_DEFINE([LINK_SHARED], [1], [Link shared lib when invoking C compile and link]) | |
22 | +fi | |
23 | ||
24 | dnl | |
25 | dnl Wrap up. | |
26 | diff -Naur colm-0.14.7.orig/src/main.cc colm-0.14.7/src/main.cc | |
27 | --- colm-0.14.7.orig/src/main.cc 2021-02-10 07:13:17.000000000 +0100 | |
28 | +++ colm-0.14.7/src/main.cc 2023-01-22 16:46:51.225559962 +0100 | |
29 | @@ -485,7 +485,14 @@ | |
30 | " -I%s/../aapl" | |
31 | " -I%s/include" | |
32 | " -L%s" | |
33 | +#if defined(LINK_STATIC) | |
34 | " %s/libcolm.a", | |
35 | +#elif defined(LINK_SHARED) | |
36 | + " %s/libcolm.so", | |
37 | +#else | |
38 | +# error "must enabled at least one of shared or static libs" | |
39 | +#endif | |
40 | + | |
41 | binaryFn, intermedFn, srcLocation, | |
42 | srcLocation, location, location ); | |
43 | } |