diff options
Diffstat (limited to 'autogen.sh')
| -rwxr-xr-x | autogen.sh | 41 |
1 files changed, 26 insertions, 15 deletions
| @@ -1,9 +1,8 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | 2 | # |
| 3 | # David M. Syzdek | 3 | # Tiny RADIUS Client Library |
| 4 | # Copyright (C) 2013 David M. Syzdek <david@syzdek.net>. | 4 | # Copyright (C) 2021 David M. Syzdek <david@syzdek.net>. |
| 5 | # | 5 | # All rights reserved. |
| 6 | # @DMSTOOLS_BSD_LICENSE_START@ | ||
| 7 | # | 6 | # |
| 8 | # Redistribution and use in source and binary forms, with or without | 7 | # Redistribution and use in source and binary forms, with or without |
| 9 | # modification, are permitted provided that the following conditions are | 8 | # modification, are permitted provided that the following conditions are |
| @@ -21,7 +20,7 @@ | |||
| 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS |
| 22 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | 21 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 23 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 24 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | 23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M SYZDEK BE LIABLE FOR |
| 25 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 24 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 26 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 27 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| @@ -30,9 +29,7 @@ | |||
| 30 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 31 | # SUCH DAMAGE. | 30 | # SUCH DAMAGE. |
| 32 | # | 31 | # |
| 33 | # @DMSTOOLS_BSD_LICENSE_END@ | 32 | # autogen.sh - runs GNU Autotools to create build environment |
| 34 | # | ||
| 35 | # build-aux/autogen.sh - runs GNU Autotools to create build environment | ||
| 36 | # | 33 | # |
| 37 | 34 | ||
| 38 | AUTOGENNAME="`basename ${0}`" || exit 1 | 35 | AUTOGENNAME="`basename ${0}`" || exit 1 |
| @@ -59,15 +56,23 @@ if test -d ${SRCDIR}/.git || test -f ${SRCDIR}/.git;then | |||
| 59 | fi | 56 | fi |
| 60 | 57 | ||
| 61 | 58 | ||
| 62 | # Performs some useful checks | 59 | # symlinks Bindle Tools M4 macros |
| 63 | autoscan ${SRCDIR} || exit 1 | 60 | if test -f ${SRCDIR}/contrib/bindletools/m4/bindle-gcc.m4;then |
| 61 | cd ${SRCDIR}/m4 | ||
| 62 | rm -f ./bindle*.m4 || exit 1 | ||
| 63 | ln -s ../contrib/bindletools/m4/bindle*.m4 ./ | ||
| 64 | cd - | ||
| 65 | fi | ||
| 66 | |||
| 67 | |||
| 68 | # perform pre-hook | ||
| 69 | if test -f ${SRCDIR}/build-aux/autogen-pre-hook.sh;then | ||
| 70 | . ${SRCDIR}/build-aux/autogen-pre-hook.sh | ||
| 71 | fi | ||
| 64 | 72 | ||
| 65 | 73 | ||
| 66 | # symlinks M4 macros | 74 | # Performs some useful checks |
| 67 | cd ${SRCDIR}/m4 | 75 | autoscan ${SRCDIR} || exit 1 |
| 68 | rm -f ./bindle*.m4 || exit 1 | ||
| 69 | ln -s ../contrib/bindletools/m4/bindle*.m4 ./ | ||
| 70 | cd - | ||
| 71 | 76 | ||
| 72 | 77 | ||
| 73 | # generates/installs autotools files | 78 | # generates/installs autotools files |
| @@ -78,6 +83,12 @@ autoreconf -v -i -f -Wall \ | |||
| 78 | || exit 1 | 83 | || exit 1 |
| 79 | 84 | ||
| 80 | 85 | ||
| 86 | # perform post-hook | ||
| 87 | if test -f ${SRCDIR}/build-aux/autogen-post-hook.sh;then | ||
| 88 | . ${SRCDIR}/build-aux/autogen-post-hook.sh | ||
| 89 | fi | ||
| 90 | |||
| 91 | |||
| 81 | # makes build directory | 92 | # makes build directory |
| 82 | mkdir -p ${SRCDIR}/build | 93 | mkdir -p ${SRCDIR}/build |
| 83 | 94 | ||
