]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/ppc/aclocal.m4
Wed Apr 29 15:44:52 1998 Geoffrey Noer <noer@cygnus.com>
[thirdparty/binutils-gdb.git] / sim / ppc / aclocal.m4
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".
4
5 dnl AM_CYGWIN32()
6 dnl You might think we can do this by checking for a cygwin32-specific
7 dnl cpp define.
8 AC_DEFUN(AM_CYGWIN32,
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)
12 rm -f conftest*])
13 CYGWIN32=
14 test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
15
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 "".
19
20 dnl AM_EXEEXT()
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.
24 AC_DEFUN(AM_EXEEXT,
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
29 am_cv_exeext=.exe
30 else
31 cat > am_c_test.c << 'EOF'
32 int main() {
33 /* Nothing needed here */
34 }
35 EOF
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//`
38 rm -f am_c_test*])
39 test x"${am_cv_exeext}" = x && am_cv_exeext=no
40 fi
41 EXEEXT=""
42 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
43 AC_MSG_RESULT(${am_cv_exeext})
44 AC_SUBST(EXEEXT)])
45