1 # Check to see if we're running under Cygwin32, without using
2 # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
3 # Otherwise set it to "no".
6 dnl You might think we can do this by checking for a cygwin32-specific
9 [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
10 [AC_TRY_COMPILE(,[int main () { return __CYGWIN32__; }],
11 am_cv_cygwin32=yes, am_cv_cygwin32=no)
14 test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
16 # Check to see if we're running under Win32, without using
17 # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
18 # Otherwise set it to "".
21 dnl This knows we add .exe if we're building in the Cygwin32
22 dnl environment. But if we're not, then it compiles a test program
23 dnl to see if there is a suffix for executables.
25 dnl AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AM_CYGWIN32])
26 AC_MSG_CHECKING([for executable suffix])
27 [AC_CACHE_VAL(am_cv_exeext,
28 [if test "$CYGWIN32" = yes; then
31 cat > am_c_test.c << 'EOF'
33 /* Nothing needed here */
36 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
37 am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
39 test x"${am_cv_exeext}" = x && am_cv_exeext=no
42 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
43 AC_MSG_RESULT(${am_cv_exeext})