1 # exeext.at -- ensure that exeext handling works -*- Autotest -*-
3 # Copyright (C) 2010 Free Software Foundation, Inc.
4 # Written by Peter Rosin
6 # This file is part of GNU Libtool.
8 # GNU Libtool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
13 # GNU Libtool is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Libtool; see the file COPYING. If not, a copy
20 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
21 # or obtained by writing to the Free Software Foundation, Inc.,
22 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 AT_SETUP([both of -o prog and -o prog$EXEEXT work])
27 AT_KEYWORDS([libtool])
29 AT_CHECK([test -n "$EXEEXT" || exit 77])
33 mkdir src $bin srcext $binext
37 int main(void) { return 0; }
40 $CC $CPPFLAGS $CFLAGS -c src/prog.c -o src/prog.$OBJEXT
42 AT_CHECK($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog src/prog.$OBJEXT,
43 [0], [ignore], [ignore])
44 AT_CHECK($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT src/prog.$OBJEXT,
45 [0], [ignore], [ignore])
47 $LIBTOOL --mode=install cp src/prog $bin/prog
48 $LIBTOOL --mode=install cp srcext/prog$EXEEXT $binext/prog$EXEEXT
50 LT_AT_EXEC_CHECK([$bin/prog])
51 LT_AT_EXEC_CHECK([$binext/prog$EXEEXT])