common/autoconf/autogen.sh

changeset 664
15c1642967c9
parent 571
7a3c6ffdf1fb
child 674
a09e9c9ca963
equal deleted inserted replaced
658:466685ba01bf 664:15c1642967c9
41 custom_script_dir=$CUSTOM_CONFIG_DIR 41 custom_script_dir=$CUSTOM_CONFIG_DIR
42 fi 42 fi
43 43
44 custom_hook=$custom_script_dir/custom-hook.m4 44 custom_hook=$custom_script_dir/custom-hook.m4
45 45
46 if test "x`which autoconf 2> /dev/null`" = x; then 46 AUTOCONF=$(which autoconf 2> /dev/null);
47 AUTOCONF_267=$(which autoconf-2.67 2> /dev/null);
48
49 echo "Autoconf found: ${AUTOCONF}"
50 echo "Autoconf-2.67 found: ${AUTOCONF_267}"
51
52 if test "x${AUTOCONF}" = x; then
47 echo You need autoconf installed to be able to regenerate the configure script 53 echo You need autoconf installed to be able to regenerate the configure script
48 echo Error: Cannot find autoconf 1>&2 54 echo Error: Cannot find autoconf 1>&2
49 exit 1 55 exit 1
50 fi 56 fi
51 57
52 echo Generating generated-configure.sh 58 if test "x${AUTOCONF_267}" != x; then
53 cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh 59 AUTOCONF=${AUTOCONF_267};
60 fi
61
62 echo Generating generated-configure.sh with ${AUTOCONF}
63 cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
54 rm -rf autom4te.cache 64 rm -rf autom4te.cache
55 65
56 if test -e $custom_hook; then 66 if test -e $custom_hook; then
57 echo Generating custom generated-configure.sh 67 echo Generating custom generated-configure.sh
58 # We have custom sources available; also generate configure script 68 # We have custom sources available; also generate configure script
59 # with custom hooks compiled in. 69 # with custom hooks compiled in.
60 cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ 70 cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
61 sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh 71 sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
62 rm -rf autom4te.cache 72 rm -rf autom4te.cache
63 else 73 else
64 echo No custom hook found: $custom_hook 74 echo No custom hook found: $custom_hook
65 fi 75 fi

mercurial