Commit 91553cb0 authored by Gary V. Vaughan's avatar Gary V. Vaughan

Release v30.

Signed-off-by: 's avatarGary V. Vaughan <gary@gnu.org>
parent 5a9de281
2013-08-29 Gary V. Vaughan <gary@gnu.org>
Release version 30
* NEWS: Record release date.
maint: update NEWS.
* NEWS: Update with user visible changes since previous release.
boostrap: sync with upstream.
This version fixes some cosmetic and CLI inconsistencies, as
well as improving portability to BSDs.
* bootstrap: sync with upstream.
configury: don't nuke the lib subdirectory.
Now that we've made use of lib for Lua library files, make sure
not to let gnulib-tool scribble in it.
* bootstrap.conf (source_base): Tell gnulib-tool to put its empty
library directory somewhere harmless.
(luaposix_remove_empty_lib): And then remove that.
maint: reorganise sources into subdirectories.
Rather than dump everything into the project root directory
indiscriminately, move extension modules into subdirectories
of a new 'ext/' subdirectory, Lua libraries into 'lib/'. And
adjust the build system to work with that layout.
* lua52compat.h: Move from here...
* ext/include/lua52compat.h: ...to here.
* local.mk (AM_CPPFLAGS): Add -I ext/include.
* lcurses.c, strlcpy.c, curses.lua: Move from here...
* ext/curses/curses.c, ext/curses/strlcpy.c, lib/curses.lua:
...to here.
* lposix.c, posix.lua: Move from here...
* ext/posix/posix.c, lib/posix.lua: ...to here.
* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects for future
compatibility with Automake 2.0.
(WANTEDLIBS, WANTEDLUA): Adjust paths.
* local.mk (std_cpath, std_path, EXTRA_LTLIBRARIES, lib_LTLIBRARIES)
(dist_data_DATA, dist_doc_DATA, EXTRA_DIST): Likewise.
* tree.lua: Move from here...
* examples/tree.lua: ...to here.
* make_lcurses_doc.pl, config.ld: Move from here...
* build-aux/make_lcurses_doc.pl, ext/posix/config.ld: ...to here,
and adjust for relative path changes.
* dummy.c: No longer used. Remove.
* build-aux/sanity-cfg.mk: Remove references to dummy.c.
Adjust for relative path changes.
* .gitignore: Update.
examples: error messages are not capitalized.
* examples/lock.lua: Don't capitalize error messages.
Discovered by 'make syntax-check'
2013-08-27 Gary V. Vaughan <gary@gnu.org>
posix: remember to register Pshutdown function.
* lposix.c (R): Add Pshutdown MENTRY.
posix: remove unused variables.
* lposix.c (Precvfrom): Remove unused host and serv variables.
(Paccept): Likewise, and remove unused r as well.
posix: mark unused parameters for gcc.
* lposix.c (UNUSED): New macro, expands to __unused__ with GNU C.
(FgetID, Fsysconf, Pcloselog, Psync): Use it to mark unused
function parameters.
posix: report correct bad option number.
* lposix.c (badoption): Report the passed option number as being
the bad option.
2013-08-27 Gary V. Vaughan <gary@vaughan.pe>
Merge pull request #114 from GranPC/patch-1
Fix repeated "Test ipv4" instead of "Test ipv6"
2013-08-27 Gary V. Vaughan <gary@gnu.org>
docs: fix typo in chdir ldoc comments.
* lposix.c (Pchdir): Supply a valid usage example.
Closes issue #113.
Reported by Craig Barnes.
2013-08-26 Gary V. Vaughan <gary@vaughan.pe>
Merge pull request #112 from craigbarnes/master
Fix and clean up Markdown formatting in README
2013-08-26 Enrico Tassi <gareuselesinge@debian.org>
posix: port getcwd to Hurd.
* lposix.c (Pgetcwd): Use get_current_dir_name function on Hurd.
2013-08-26 Gary V. Vaughan <gary@gnu.org>
maint: git ignore build-aux/compile.
* build-aux/.gitignore: Add compile.
configury: don't use unicode characters in shell comments.
* configure.ac: Replace unicode apostrophes with ASCII equivalents.
typo: set the configure package version correctly.
* configure.ac (AC_INIT): The correct release number is 30.
posix: improve portability of constant definitions.
Rather than try to catalog what compiler/OS releases supply what
constant symbols in their headers with a rats nest of `#if __BSD`
etc, wrap all of the contentious preprocessor defines in matching
`#ifdefs` so that they are only provided by luaposix in the
environments that define them. This should provide much better
future portability to new compiler/OS combinations.
* lposix.c (lua_open_posix_c): Simplify the declarations by using
a consistent MENTRY definition.
Except for extremely well-known groups of symbols, and groups
that are already inside _POSIX_VERSION >= 200112L guards, wrap
each constant declaration in a matching `#ifdef`.
2013-08-12 GranPC <gran.pc@gmail.com>
Fix repeated "Test ipv4" instead of "Test ipv6"
2013-08-10 Alexander V. Nikolaev <avn@daemon.hole.ru>
Merge pull request #111 from markgurevich/mg/2625/file-locks-v2
Lock or unlock files with fcntl()
2013-08-08 Craig Barnes <cr@igbarn.es>
Fix and clean up Markdown formatting in README.md
2013-07-24 Mark Gurevich <markgurevichster@gmail.com>
Lock or unlock files with fcntl()
2013-06-28 Gary V. Vaughan <gary@gnu.org>
typo: fix target URL of Travis badge link in README.md.
* README.md: Fix target URL of Travis badge link.
maint: post-release administrivia.
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* ./local.mk (old_NEWS_hash): Auto-update.
* configure.ac (AC_INIT): Bump revision to 30.
Release version 29
* NEWS: Record release date.
......
This diff is collapsed.
Stdlib NEWS - User visible changes
* Noteworthy changes in release 30 (2013-08-29) [stable]
** New features:
- Support for file locks with fcntl() using F_SETLK, F_SETLKW, F_GETLK,
F_RDLCK, F_WRLCK and F_UNLCK.
- Preliminary support for GNU Hurd, and OpenBSD.
** Bug fixes:
- posix.shutdown can actually be called now.
- Report the correct argument number in posix function error messages.
- Much reduced compiler warning noise.
- Many small typos and inconsistencies, see ChangeLog for details.
* Noteworthy changes in release 29 (2013-06-28) [stable]
** This release adds wresize to curses, and sync, fsync, fdatasync, nice,
......
luaposix
========
by the [luaposix project][github]
By the [luaposix project][GitHub]
[github]: https://github.com/luaposix/luaposix
[![travis-ci status](https://secure.travis-ci.org/luaposix/luaposix.png?branche=master)](http://travis-ci.org/luaposix/luaposix/builds)
[![travis-ci status](https://secure.travis-ci.org/luaposix/luaposix.png?branche=master)](http://travis-ci.org/luaposix/lua-posix/builds)
luaposix is a POSIX binding, including curses, for Lua 5.1 and 5.2;
luaposix is a POSIX binding, including curses, for [Lua] 5.1 and 5.2;
like most libraries it simply binds to C APIs on the underlying
system, so it won't work on a non-POSIX system. However, it does try
system, so it won't work on non-POSIX systems. However, it does try
to detect the level of POSIX conformance of the underlying system and
bind only available APIs.
luaposix is released under the MIT license, like Lua (see COPYING;
luaposix is released under the MIT license, like Lua (see [COPYING];
it's basically the same as the BSD license). There is no warranty.
Please report bugs and make suggestions by opening an issue on the
github tracker.
Installation
------------
The simplest way to install luaposix is with [LuaRocks][]. To install the
The simplest way to install luaposix is with [LuaRocks]. To install the
latest release (recommended):
luarocks install luaposix
......@@ -36,57 +33,38 @@ With Lua 5.1, luaposix requires the bitop library from http://bitop.luajit.org/
(On Lua 5.2 it will work whether bitop is installed or not.)
To install without LuaRocks, check out the sources from the
[repository][github], and then run the following commands: the
dependencies are listed in the dependencies entry of the file
`rockspec.conf`. You will also need Autoconf and Automake.
[repository][GitHub] and run the following commands:
cd luaposix
./bootstrap
./configure --prefix=INSTALLATION-ROOT-DIRECTORY
make all check install
See [INSTALL][] for instructions for `configure`, and `configure --help`
for details of available command-line switches.
cd luaposix
./bootstrap
./configure --prefix=INSTALLATION-ROOT-DIRECTORY
make all check install
[luarocks]: http://www.luarocksporg "LuaRocks Project"
[install]: https://raw.github.com/luaposix/luaposix/release/INSTALL
Dependencies are listed in the dependencies entry of the file
`rockspec.conf`. You will also need Autoconf and Automake.
See [INSTALL] for `configure` instructions and `configure --help`
for details of available command-line switches.
Use
---
The library is split into two modules. The basic POSIX APIs are in
"posix"; the curses APIs in "curses".
There is HTML documentation; to obtain it, run:
make doc
`posix` and the curses APIs in `curses`.
The posix module documentation requires LDoc, from
https://github.com/stevedonovan/LDoc
It includes links to online man pages. All the HTML documentation is
online at:
http://luaposix.github.com/luaposix/
You can find an authoritative online POSIX reference at:
http://www.opengroup.org/onlinepubs/007904875/toc.htm
HTML documentation can be generated with [LDoc] by running `make doc`
or viewed online at <http://luaposix.github.com/luaposix/>.
The authoritative online POSIX reference is at
<http://www.opengroup.org/onlinepubs/007904875/toc.htm>.
Example code
------------
See the example program tree.lua, along with the tests in
See the example program `tree.lua`, along with the tests in
`tests-*.lua`.
For a complete application, see the lua branch of GNU Zile's (a
cut-down Emacs clone) git repository at:
http://git.savannah.gnu.org/cgit/zile.git/log/?h=lua
For a complete application, see the lua branch of [GNU Zile].
Bugs reports & patches
----------------------
......@@ -110,3 +88,12 @@ bear in mind the following points when writing new code:
3. Thin wrappers: although some existing code contradicts this, wrap
POSIX APIs in the simplest way possible. If necessary, more
convenient wrappers can be added in Lua (posix.lua).
[Lua]: http://www.lua.org/
[GitHub]: https://github.com/luaposix/luaposix
[LuaRocks]: http://www.luarocksporg "Lua package manager"
[LDoc]: https://github.com/stevedonovan/LDoc "Lua documentation generator"
[COPYING]: https://raw.github.com/luaposix/luaposix/release/COPYING
[INSTALL]: https://raw.github.com/luaposix/luaposix/release/INSTALL
[GNU Zile]: http://git.savannah.gnu.org/cgit/zile.git/log/?h=lua "A cut-down Emacs clone"
# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
# generated automatically by aclocal 1.14 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
......@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.13'
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.13.3], [],
m4_if([$1], [1.14], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.13.3])dnl
[AM_AUTOMAKE_VERSION([1.14])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
......@@ -76,7 +76,8 @@ AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
: ${AR=ar}
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
[am_cv_ar_interface=ar
[AC_LANG_PUSH([C])
am_cv_ar_interface=ar
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
......@@ -93,7 +94,7 @@ AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
fi
rm -f conftest.lib libconftest.a
])
])
AC_LANG_POP([C])])
case $am_cv_ar_interface in
ar)
......@@ -477,6 +478,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
......@@ -585,7 +592,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
......@@ -593,7 +641,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
......@@ -775,6 +822,70 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
......
This diff is collapsed.
......@@ -49,6 +49,10 @@ gnulib_non_module_files='
build-aux/install-sh
'
# We don't actually use any gnulib C code, but that's no reason to
# let the defaults nuke our lib directory!
source_base=unused
# The not-synced with gnulib warning is bogus until upstream adopts
# the saner bootstrap script.
require_bootstrap_uptodate=:
......@@ -116,7 +120,7 @@ luaposix_remove_empty_lib ()
{
$debug_cmd
rm -rf lib
rm -rf $source_base
}
func_add_hook func_gnulib_tool luaposix_remove_empty_lib
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)