xref: /netbsd-src/external/bsd/flex/dist/autogen.sh (revision 463ae347b383ca644b1399e7e5228310d0bdf969)
13c3a7b76Schristos#!/bin/sh
23c3a7b76Schristos
33c3a7b76Schristos#  This file is part of flex.
43c3a7b76Schristos
53c3a7b76Schristos#  Redistribution and use in source and binary forms, with or without
63c3a7b76Schristos#  modification, are permitted provided that the following conditions
73c3a7b76Schristos#  are met:
83c3a7b76Schristos
93c3a7b76Schristos#  1. Redistributions of source code must retain the above copyright
103c3a7b76Schristos#     notice, this list of conditions and the following disclaimer.
113c3a7b76Schristos#  2. Redistributions in binary form must reproduce the above copyright
123c3a7b76Schristos#     notice, this list of conditions and the following disclaimer in the
133c3a7b76Schristos#     documentation and/or other materials provided with the distribution.
143c3a7b76Schristos
153c3a7b76Schristos#  Neither the name of the University nor the names of its contributors
163c3a7b76Schristos#  may be used to endorse or promote products derived from this software
173c3a7b76Schristos#  without specific prior written permission.
183c3a7b76Schristos
193c3a7b76Schristos#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
203c3a7b76Schristos#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
213c3a7b76Schristos#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
223c3a7b76Schristos#  PURPOSE.
233c3a7b76Schristos
243c3a7b76Schristos# If you see no configure script, then run ./autogen.sh to create it
253c3a7b76Schristos# and procede with the "normal" build procedures.
263c3a7b76Schristos
27*463ae347Schristos# use LIBTOOLIZE, if set
28*463ae347SchristosLIBTOOLIZE_ORIG="$LIBTOOLIZE";
29*463ae347Schristosif test "x$LIBTOOLIZE" = "x"; then LIBTOOLIZE=libtoolize; fi
30*463ae347Schristos
31*463ae347Schristos# test libtoolize
32*463ae347Schristos$LIBTOOLIZE --version 2>/dev/null
33*463ae347Schristosif test "$?" -ne 0; then
34*463ae347Schristos   LIBTOOLIZE=glibtoolize
35*463ae347Schristos   $LIBTOOLIZE --version 2>/dev/null
36*463ae347Schristos   if test "$?" -ne 0; then
37*463ae347Schristos      echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize"
38*463ae347Schristos      echo "       LIBTOOLIZE is currently \"$LIBTOOLIZE_ORIG\""
39*463ae347Schristos      exit 1
40*463ae347Schristos   fi
41*463ae347Schristosfi
42*463ae347Schristos
433c3a7b76Schristos#if we pretend to have a ChangeLog, then automake is less
443c3a7b76Schristos#worried. (Don't worry, we *do* have a ChangeLog, we just need the
453c3a7b76Schristos#Makefile first.)
463c3a7b76Schristos
47*463ae347Schristosif ! test -f ChangeLog; then
483c3a7b76Schristos   touch ChangeLog
49*463ae347Schristosfi
50*463ae347Schristos"$LIBTOOLIZE" --install --force
5130da1778Schristosautoreconf --install --force
52