4.104.114.84.95
Rev | Line | |
---|
[b931d05a] | 1 | dnl |
---|
| 2 | dnl $Id$ |
---|
| 3 | dnl |
---|
[98100d2] | 4 | dnl Set the EXE extension |
---|
| 5 | dnl |
---|
| 6 | dnl 98/06/16 David Fiddes (D.J.Fiddes@hw.ac.uk) |
---|
| 7 | dnl 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 | |
---|
| 13 | dnl RTEMS_EXEEXT() |
---|
| 14 | dnl This knows we add .exe if we're building in the Cygwin32 |
---|
| 15 | dnl environment. But if we're not, then it compiles a test program |
---|
| 16 | dnl to see if there is a suffix for executables. |
---|
| 17 | AC_DEFUN(RTEMS_EXEEXT, |
---|
| 18 | [AC_REQUIRE([RTEMS_CYGWIN32]) |
---|
| 19 | AC_MSG_CHECKING([for executable suffix]) |
---|
| 20 | AC_CACHE_VAL(rtems_cv_exeext, |
---|
| 21 | [if test "$CYGWIN32" = yes; then |
---|
| 22 | rtems_cv_exeext=.exe |
---|
| 23 | else |
---|
| 24 | cat > rtems_c_test.c << 'EOF' |
---|
| 25 | int main() { |
---|
| 26 | /* Nothing needed here */ |
---|
| 27 | } |
---|
| 28 | EOF |
---|
| 29 | ${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5 |
---|
| 30 | rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//` |
---|
| 31 | rm -f rtems_c_test*]) |
---|
| 32 | test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no |
---|
| 33 | fi |
---|
| 34 | EXEEXT="" |
---|
| 35 | test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext} |
---|
| 36 | AC_MSG_RESULT(${rtems_cv_exeext}) |
---|
| 37 | AC_SUBST(EXEEXT)]) |
---|
| 38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.