1#!/bin/sh
2
3#  This file is part of flex.
4
5#  Redistribution and use in source and binary forms, with or without
6#  modification, are permitted provided that the following conditions
7#  are met:
8
9#  1. Redistributions of source code must retain the above copyright
10#     notice, this list of conditions and the following disclaimer.
11#  2. Redistributions in binary form must reproduce the above copyright
12#     notice, this list of conditions and the following disclaimer in the
13#     documentation and/or other materials provided with the distribution.
14
15#  Neither the name of the University nor the names of its contributors
16#  may be used to endorse or promote products derived from this software
17#  without specific prior written permission.
18
19#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
20#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
21#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22#  PURPOSE.
23
24# If you see no configure script, then run ./autogen.sh to create it
25# and procede with the "normal" build procedures.
26
27# use LIBTOOLIZE, if set
28if test "x$LIBTOOLIZE" = "x"; then
29   for ac_prog in libtoolize glibtoolize; do
30      if $ac_prog --version >/dev/null 2>&1; then
31         LIBTOOLIZE=$ac_prog
32         break
33      fi
34   done
35fi
36
37# test libtoolize
38if test "x$LIBTOOLIZE" = "x" || ! $LIBTOOLIZE --version >/dev/null; then
39   echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize">&2
40   echo "       LIBTOOLIZE is currently \"$LIBTOOLIZE\"">&2
41   exit 1
42fi
43
44#if we pretend to have a ChangeLog, then automake is less
45#worried. (Don't worry, we *do* have a ChangeLog, we just need the
46#Makefile first.)
47
48if ! test -f ChangeLog; then
49   touch ChangeLog
50fi
51$LIBTOOLIZE --install --force
52autoreconf --install --force
53