autogen.sh 885 Bytes
Newer Older
1
2
3
#!/bin/sh

autoreconf -fvi || exit $?
Sergey Kosukhin's avatar
Sergey Kosukhin committed
4
patch --forward --no-backup-if-mismatch -p1 -r - -i patch/libtool.m4.nag_wrapper.patch
Sergey Kosukhin's avatar
Sergey Kosukhin committed
5
6
# The program 'patch' exits with exitcode=1 if the patch has already been applied.
# Consider this a normal scenario:
Sergey Kosukhin's avatar
Sergey Kosukhin committed
7
exitcode=$?; test $exitcode -ne 0 && test $exitcode -ne 1 && exit $exitcode
Sergey Kosukhin's avatar
Sergey Kosukhin committed
8

Sergey Kosukhin's avatar
Sergey Kosukhin committed
9
10
11
12
patch --forward --no-backup-if-mismatch -p1 -r - -i patch/libtool.m4.arg_spaces.patch
exitcode=$?; test $exitcode -ne 0 && test $exitcode -ne 1 && exit $exitcode

# Rebuild configure if you need to patch M4 macros:
Sergey Kosukhin's avatar
Sergey Kosukhin committed
13
autoconf -f || exit $?
Sergey Kosukhin's avatar
Sergey Kosukhin committed
14
15

# Reset libtool.m4 timestamps to avoid confusing make:
Sergey Kosukhin's avatar
Sergey Kosukhin committed
16
17
touch -r m4/ltversion.m4 m4/libtool.m4 || exit $?

Sergey Kosukhin's avatar
Sergey Kosukhin committed
18
19
20
21
22
23
patch --forward --no-backup-if-mismatch -p1 -r - -i patch/ltmain.sh.nag_pthread.patch
exitcode=$?; test $exitcode -ne 0 && test $exitcode -ne 1 && exit $exitcode

# All went fine since we have not exited before:
exit 0