3 #--------------------------------------------------------------------------
4 # findtool works as 'which' but we use a different name to make it more
5 # obvious we aren't using 'which'! ;-)
14 # echo "checks for $file in $path" >&2
15 if test -f "$path/$file"; then
23 #--------------------------------------------------------------------------
24 # removethis() removes all files and subdirectories with the given name,
25 # inside and below the current subdirectory at invocation time.
28 if test "$#" = "1"; then
29 find . -depth -name $1 -print > buildconf.tmp.$$
32 if test -f "$fdname"; then
34 elif test -d "$fdname"; then
37 done < buildconf.tmp.$$
38 rm -f buildconf.tmp.$$
42 #--------------------------------------------------------------------------
43 # Ensure that buildconf runs from the subdirectory where configure.ac lives
45 if test ! -f configure.ac ||
46 test ! -f ares_init.c ||
47 test ! -f m4/cares-functions.m4; then
48 echo "Can not run buildconf from outside of c-ares source subdirectory!"
49 echo "Change to the subdirectory where buildconf is found, and try again."
53 #--------------------------------------------------------------------------
54 # this approach that tries 'glibtool' first is some kind of work-around for
55 # some BSD-systems I believe that use to provide the GNU libtool named
56 # glibtool, with 'libtool' being something completely different.
57 libtool=`findtool glibtool 2>/dev/null`
58 if test ! -x "$libtool"; then
59 libtool=`findtool ${LIBTOOL:-libtool}`
62 if test -z "$LIBTOOLIZE"; then
63 # set the LIBTOOLIZE here so that glibtoolize is used if glibtool was found
64 # $libtool is already the full path
65 libtoolize="${libtool}ize"
67 libtoolize=`findtool $LIBTOOLIZE`
70 #--------------------------------------------------------------------------
71 # Remove files generated on previous buildconf/configure run.
109 #--------------------------------------------------------------------------
110 # run the correct scripts now
113 ${libtoolize} --copy --automake --force
114 ${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
115 ${AUTOHEADER:-autoheader}
116 ${AUTOCONF:-autoconf}
117 ${AUTOMAKE:-automake} --add-missing --copy