Detecing awk... Trying: echo "a.c b.c c.c" | tr ' ' \n | awk ' { ORS = " " } /\.c$/ { gsub(".c$", ".o", $0); print $0; }' 2>/dev/null Result: 'a.o b.o c.o ' checking awk... awk checking build system type... CC/CXX not set (skipping) executing gcc -dumpmachine returned i686-apple-darwin9 exit code 0 checking build system type... i686-apple-darwin9 checking host system type... CC/CXX not set (skipping) executing gcc -dumpmachine returned i686-apple-darwin9 exit code 0 checking host system type... i686-apple-darwin9 detecting OS... OSX checking universal build... no checking build cc... gcc checking host cc... gcc checking build c++... CC/CXX not set (skipping) executing g++ -dumpmachine returned i686-apple-darwin9 exit code 0 checking build c++... g++ checking host c++... CC/CXX not set (skipping) executing g++ -dumpmachine returned i686-apple-darwin9 exit code 0 checking host c++... g++ checking host strip... CC/CXX not set (skipping) executing strip strip.test returned exit code 0 checking host strip... strip executing makedepend -f makedepend.tmp returned # DO NOT DELETE exit code 0 checking makedepend... makedepend executing g++ tmp.64bit.cpp -o tmp.64bit -DTESTING 2>&1 returned tmp.64bit.cpp:2: error: size of array ‘a’ is negative exit code 1 detecting cpu-type... 32 bits checking static... yes checking unicode... no using debug level... no checking SDL... OSX, skipping checking COCOA... found checking GDI video driver... not Windows, skipping checking dedicated... not selected checking network... found checking translator... no checking assert... enabled detecting zlib trying /usr/include/zlib.h... found checking zlib... found executing libpng-config --version returned 1.2.18 exit code 0 checking libpng... found executing freetype_config --version returned 9.16.3 exit code 0 checking libfreetype... found executing pkg-config fontconfig --modversion returned 2.4.1 exit code 0 checking libfontconfig... found found iconv in iconv.h checking iconv... found executing g++ -c tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1 exit code 1 checking if iconv has non-const inbuf... yes checking psp-config... not PSP, skipping detecting libtimidity trying /usr/include/timidity.h... no trying /usr/local/include/timidity.h... no checking libtimidity... not found checking direct-music... not Windows, skipping running echo | sort result was valid checking sort... sort checking endianess... PREPROCESSOR suppress language errors... no checking stripping... strip checking distcc... no (only used when forced) checking ccache... no (only used when forced) checking OSX sysroot... no (use system default) detecting G5... no checking revision... svn detection personal home directory... Documents/OpenTTD installation directory... / Running configure with following options: ./configure --ignore-extra-parameters --build="" --host="" --cc-build="gcc" --cc-host="gcc" --cxx-build="g++" --cxx-host="g++" --windres="" --strip="strip" --awk="awk" --lipo="" --os="OSX" --cpu-type="32" --revision="" --endian="PREPROCESSOR" --config-log="config.log" --prefix-dir="/usr/local" --binary-dir="games" --data-dir="share/games/openttd" --icon-dir="share/pixmaps" --personal-dir="Documents/OpenTTD" --install-dir="/" --enable-debug="0" --enable-profiling="0" --enable-dedicated="0" --enable-network="1" --enable-static="2" --enable-translator="0" --enable-assert="1" --enable-strip="1" --with-distcc="0" --with-osx-sysroot="0" --enable-universal="0" --enable-osx-g5="0" --enable-unicode="0" --with-application-bundle="1" --with-sdl="1" --with-cocoa="1" --with-zlib="1" --with-png="1" --with-makedepend="1" --with-direct-music="0" --with-sort="1" --with-iconv="2" --with-midi="" --with-midi-arg="" --with-libtimidity="1" --with-freetype="1" --with-fontconfig="1" --with-psp-config="1" --with-threads="1" --CC="" --CXX="" --CFLAGS="" --LDFLAGS="" using CFLAGS... -O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic -DOSX -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -Wno-uninitialized -W -Wno-unused-parameter -fno-strict-aliasing -DUNIX -DWITH_COCOA -DWITH_ZLIB -DWITH_PNG -I/sw/include/libpng12 -DWITH_FONTCONFIG -I/usr/X11/include -DWITH_FREETYPE -I/usr/X11/include/freetype2 -I/usr/X11/include -DWITH_ICONV -DHAVE_BROKEN_ICONV -DHAVE_BROKEN_ICONV -DHAVE_BROKEN_ICONV -DENABLE_NETWORK -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\"Documents/OpenTTD\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\" -Wstrict-prototypes -Wdeclaration-after-statement -Wold-style-definition using LDFLAGS... -lstdc++ -lc -framework QuickTime -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -lz /sw/lib/libpng.a /usr/X11/lib/libfontconfig.a -L/usr/X11/lib -lexpat /usr/X11/lib/libfreetype.a -liconv -framework Cocoa