peter$ cat configure.ac AC_INIT AC_CONFIG_SRCDIR(configure.ac) AM_INIT_AUTOMAKE(foo,2.1) AC_PATH_XTRA AC_CONFIG_FILES(Makefile) AC_OUTPUT peter$ cat Makefile.am bin_PROGRAMS = foo foo_SOURCES = foo.c foo_LDADD = $(X_LIBS) peter$ cat foo.c int main() {;} peter$ ./configure configure: loading site script /Users/peter/config.site checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... none checking how to run the C preprocessor... gcc -E checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking whether -R must be followed by a space... no checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes configure: creating ./config.status config.status: creating Makefile config.status: executing depfiles commands peter$ make gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"foo\" -DVERSION=\"2.1\" -I. -I. -g -O2 -c foo.c gcc -g -O2 -o foo foo.o -L/usr/X11R6/lib -R/usr/X11R6/lib powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-R/usr/X11R6/lib'