| 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 | {{{ |
| 36 | case "$host_os" in |
| 37 | os2*) |
| 38 | # Increase stack size to 8MB |
| 39 | export LDFLAGS="$LDFLAGS -Zstack 0x2000" |
| 40 | esac |
| 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 | {{{ |
| 46 | case `uname -s 2>/dev/null` in |
| 47 | OS/2) |
| 48 | # Increase stack size to 8MB |
| 49 | export LDFLAGS="$LDFLAGS -Zstack 0x2000" |
| 50 | esac |
| 51 | }}} |
| 52 | |
| 53 | Note 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. |