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