xref: /flex/autogen.sh (revision 4efcf28e)
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
280a9687d1SSimon SobischLIBTOOLIZE_ORIG="$LIBTOOLIZE";
290a9687d1SSimon Sobischif test "x$LIBTOOLIZE" = "x"; then LIBTOOLIZE=libtoolize; fi
300a9687d1SSimon Sobisch
310a9687d1SSimon Sobisch# test libtoolize
320a9687d1SSimon Sobisch$LIBTOOLIZE --version 2>/dev/null
330a9687d1SSimon Sobischif test "$?" -ne 0; then
340a9687d1SSimon Sobisch   LIBTOOLIZE=glibtoolize
350a9687d1SSimon Sobisch   $LIBTOOLIZE --version 2>/dev/null
360a9687d1SSimon Sobisch   if test "$?" -ne 0; then
370a9687d1SSimon Sobisch      echo "error: libtoolize not working, re-run with LIBTOOLIZE=/path/to/libtoolize"
380a9687d1SSimon Sobisch      echo "       LIBTOOLIZE is currently \"$LIBTOOLIZE_ORIG\""
390a9687d1SSimon Sobisch      exit 1
400a9687d1SSimon Sobisch   fi
410a9687d1SSimon Sobischfi
420a9687d1SSimon Sobisch
43ddbcdd5cSWill Estes#if we pretend to have a ChangeLog, then automake is less
44ddbcdd5cSWill Estes#worried. (Don't worry, we *do* have a ChangeLog, we just need the
45ddbcdd5cSWill Estes#Makefile first.)
46ddbcdd5cSWill Estes
474efcf28eSSimon Sobischif ! test -f ChangeLog; then
484efcf28eSSimon Sobisch   touch ChangeLog
494efcf28eSSimon Sobischfi
500a9687d1SSimon Sobisch"$LIBTOOLIZE" --install --force
51589bb430SWill Estesautoreconf --install --force
52