source: rtems/aclocal/exeext.m4 @ bf1ef5b

4.104.114.84.95
Last change on this file since bf1ef5b was b931d05a, checked in by Joel Sherrill <joel.sherrill@…>, on 09/30/98 at 19:51:39

Added Id's.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1dnl
2dnl  $Id$
3dnl
4dnl Set the EXE extension
5dnl
6dnl 98/06/16 David Fiddes       (D.J.Fiddes@hw.ac.uk)
7dnl                             Hacked from automake-1.3
8
9# Check to see if we're running under Win32, without using
10# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
11# Otherwise set it to "".
12
13dnl RTEMS_EXEEXT()
14dnl This knows we add .exe if we're building in the Cygwin32
15dnl environment. But if we're not, then it compiles a test program
16dnl to see if there is a suffix for executables.
17AC_DEFUN(RTEMS_EXEEXT,
18[AC_REQUIRE([RTEMS_CYGWIN32])
19AC_MSG_CHECKING([for executable suffix])
20AC_CACHE_VAL(rtems_cv_exeext,
21[if test "$CYGWIN32" = yes; then
22rtems_cv_exeext=.exe
23else
24cat > rtems_c_test.c << 'EOF'
25int main() {
26/* Nothing needed here */
27}
28EOF
29${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
30rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
31rm -f rtems_c_test*])
32test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
33fi
34EXEEXT=""
35test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
36AC_MSG_RESULT(${rtems_cv_exeext})
37AC_SUBST(EXEEXT)])
38
Note: See TracBrowser for help on using the repository browser.