2 dnl Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program; if not, write to the Free Software
15 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 # SWFMILL - Path to swfmill executable
27 AC_DEFUN([AC_PATH_SWFMILL], [
30 AC_ARG_WITH(swfmill, AC_HELP_STRING([--with-swfmill=<path>], [Path to the swfmill executable]), [
33 *) SWFMILL=${withval} ;;
37 if test x"$SWFMILL" = "x"; then
38 AC_PATH_PROG(SWFMILL, swfmill, ,[${pathlist}])
41 if test x"$SWFMILL" != "x"; then
42 sm=`$SWFMILL -h 2>&1 | head -n 4`
43 version=`echo "$sm" | grep 'swfmill [[0-9]]\{1,2\}\(\.[[0-9]]\{1,2\}\)\{2,3\}' | cut -d' ' -f2`
44 major=`echo $version | cut -d'.' -f1`
45 minor=`echo $version | cut -d'.' -f2`
46 micro=`echo $version | cut -d'.' -f3`
47 beta=`echo $version | cut -d'.' -f4`
48 if test -z $beta; then
51 SWFMILL_VERSION=`printf %2.2d%2.2d%2.2d%2.2d $major $minor $micro $beta`
54 AC_SUBST(SWFMILL_VERSION)
61 # indent-tabs-mode: nil