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
28LIBTOOLIZE_ORIG="$LIBTOOLIZE";
29if test "x$LIBTOOLIZE" = "x"; then LIBTOOLIZE=libtoolize; fi
30
31# test libtoolize
32$LIBTOOLIZE --version 2>/dev/null
33if test "$?" -ne 0; then
34   LIBTOOLIZE=glibtoolize
35   $LIBTOOLIZE --version 2>/dev/null
36   if test "$?" -ne 0; then
37      echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize"
38      echo "       LIBTOOLIZE is currently \"$LIBTOOLIZE_ORIG\""
39      exit 1
40   fi
41fi
42
43#if we pretend to have a ChangeLog, then automake is less
44#worried. (Don't worry, we *do* have a ChangeLog, we just need the
45#Makefile first.)
46
47if ! test -f ChangeLog; then
48   touch ChangeLog
49fi
50"$LIBTOOLIZE" --install --force
51autoreconf --install --force
52