[Xastir-dev] Cygwin/convert.exe/acinclude.m4 problem

Curt Mills archer at eskimo.com
Sat Nov 20 12:00:32 EST 2004


On Sat, 20 Nov 2004, David Flood wrote:

>  AC_PATH_PROG(convert, [convert --version], no, $BINPATH)
> +AC_CHECK_FILE(/usr/bin/convert.exe, cygwinconvert="yes")
> +if test "$cygwinconvert" = "yes"; then
> +	convert="/usr/bin/convert"
> +fi
>  if test "$convert" != "no"; then
>    AC_DEFINE_UNQUOTED(HAVE_CONVERT, 1, [Define if you have convert])
>    AC_DEFINE_UNQUOTED(CONVERT_PATH, "${convert}", [Path to convert])
>  fi

I formatted it slightly different above, but I see where you're
going with it.  How about this for an optimization:


AC_PATH_PROG(convert, [convert --version], no, $BINPATH)
AC_CHECK_FILE(/usr/bin/convert.exe, convert="/usr/bin/convert")
if test "$convert" != "no"; then
  AC_DEFINE_UNQUOTED(HAVE_CONVERT, 1, [Define if you have convert])
  AC_DEFINE_UNQUOTED(CONVERT_PATH, "${convert}", [Path to convert])
fi


I tried it no Linux and it works just the same.  Can someone try
that portion in their acinclude.m4 to see if it runs ok on Cygwin
and writes these to config.h?

    #define CONVERT_PATH "/usr/bin/convert"
    #define HAVE_CONVERT 1


Here's the diff.  Just one line added from the original:


diff -u -w -r1.25 acinclude.m4
--- acinclude.m4        15 Nov 2004 18:05:57 -0000      1.25
+++ acinclude.m4        20 Nov 2004 17:06:39 -0000
@@ -146,6 +146,7 @@
 fi

 AC_PATH_PROG(convert, [convert --version], no, $BINPATH)
+AC_CHECK_FILE(/usr/bin/convert.exe, convert="/usr/bin/convert")
 if test "$convert" != "no"; then
   AC_DEFINE_UNQUOTED(HAVE_CONVERT, 1, [Define if you have convert])
   AC_DEFINE_UNQUOTED(CONVERT_PATH, "${convert}", [Path to convert])


-- 
Curt, WE7U.				archer at eskimo dot com
http://www.eskimo.com/~archer
  Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"




More information about the Xastir-dev mailing list