Changes between Version 9 and Version 10 of PortingTips


Ignore:
Timestamp:
Nov 27, 2016, 11:17:31 PM (7 years ago)
Author:
dmik
Comment:

Add OS/2 specific build details to Autoconf-based packages

Legend:

Unmodified
Added
Removed
Modified
  • PortingTips

    v9 v10  
    2828
    2929With the latest `libtool` it is possible to have a buildlevel string built into a dll. To do so you need to teach the `Makefile` how to handle it. Most likely it is the best practice to change `Makefile.am` and then do a `sh -c "autoreconf -fvi"`. How to adjust a `Makefile.am` can be seen here: r1823
     30
     31=== Add OS/2 specific build details to Autoconf-based packages ===
     32
     33**Method 1**. If `configure.ac` already uses AC_CANONICAL_TARGET or AC_CANONICAL_HOST macros, then you can add the following excerpt to it to do OS/2-specific job (`$target_os` becomes `$host_os` if AC_CANONICAL_HOST is used instead of AC_CANONICAL_TARGET):
     34
     35{{{
     36case "$host_os" in
     37os2*)
     38        # Increase stack size to 8MB
     39        export LDFLAGS="$LDFLAGS -Zstack 0x2000"
     40esac
     41}}}
     42
     43**Method 2**. If the above AC_CANONICAL macros are not used, then it will be simpler to use `uname` to do the OS/2-specific job:
     44
     45{{{
     46case `uname -s 2>/dev/null` in
     47OS/2)
     48        # Increase stack size to 8MB
     49        export LDFLAGS="$LDFLAGS -Zstack 0x2000"
     50esac
     51}}}
     52
     53Note though that if you need to add such a block more than once, it makes sense to add AC_CANONICAL_TARGET right after AC_INIT to `configure.ac` and go with //Method 1// described above.