10ad5a842SWill Estes#!/bin/sh
20ad5a842SWill Estes
31d7763d7SWill Estes#  This file is part of flex.
41d7763d7SWill Estes
51d7763d7SWill Estes#  Redistribution and use in source and binary forms, with or without
61d7763d7SWill Estes#  modification, are permitted provided that the following conditions
71d7763d7SWill Estes#  are met:
81d7763d7SWill Estes
91d7763d7SWill Estes#  1. Redistributions of source code must retain the above copyright
101d7763d7SWill Estes#     notice, this list of conditions and the following disclaimer.
111d7763d7SWill Estes#  2. Redistributions in binary form must reproduce the above copyright
121d7763d7SWill Estes#     notice, this list of conditions and the following disclaimer in the
131d7763d7SWill Estes#     documentation and/or other materials provided with the distribution.
141d7763d7SWill Estes
151d7763d7SWill Estes#  Neither the name of the University nor the names of its contributors
161d7763d7SWill Estes#  may be used to endorse or promote products derived from this software
171d7763d7SWill Estes#  without specific prior written permission.
181d7763d7SWill Estes
191d7763d7SWill Estes#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
201d7763d7SWill Estes#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
211d7763d7SWill Estes#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221d7763d7SWill Estes#  PURPOSE.
231d7763d7SWill Estes
240ad5a842SWill Estes# If you see no configure script, then run ./autogen.sh to create it
259939ef10SWill Estes# and procede with the "normal" build procedures.
26bb256b35SWill Estes
270a9687d1SSimon Sobisch# use LIBTOOLIZE, if set
289be1980eSExplorerif test "x$LIBTOOLIZE" = "x"; then
299be1980eSExplorer   for ac_prog in libtoolize glibtoolize; do
309be1980eSExplorer      if $ac_prog --version >/dev/null 2>&1; then
319be1980eSExplorer         LIBTOOLIZE=$ac_prog
329be1980eSExplorer         break
339be1980eSExplorer      fi
349be1980eSExplorer   done
359be1980eSExplorerfi
360a9687d1SSimon Sobisch
370a9687d1SSimon Sobisch# test libtoolize
389be1980eSExplorerif test "x$LIBTOOLIZE" = "x" || ! $LIBTOOLIZE --version >/dev/null; then
399be1980eSExplorer   echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize">&2
409be1980eSExplorer   echo "       LIBTOOLIZE is currently \"$LIBTOOLIZE\"">&2
419be1980eSExplorer   exit 1
420a9687d1SSimon Sobischfi
430a9687d1SSimon Sobisch
44ddbcdd5cSWill Estes#if we pretend to have a ChangeLog, then automake is less
45ddbcdd5cSWill Estes#worried. (Don't worry, we *do* have a ChangeLog, we just need the
46ddbcdd5cSWill Estes#Makefile first.)
47ddbcdd5cSWill Estes
484efcf28eSSimon Sobischif ! test -f ChangeLog; then
494efcf28eSSimon Sobisch   touch ChangeLog
504efcf28eSSimon Sobischfi
518900923eSExplorer$LIBTOOLIZE --install --force
52589bb430SWill Estesautoreconf --install --force
53