Reputation: 2035
I'm testing some autotools stuff and I noticed that I get a doubled link, this is the main files:
configure.ac
AC_INIT([galarm], [1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
LT_INIT([disable-static])
AC_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.40.0])
AC_CONFIG_MACRO_DIR([m4])
# Checking debug or release enable
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Build with debug information [default=no]]), [], [enable_debug=no])
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" != "xno"])
# Checking for local mode
AC_ARG_ENABLE(local, AS_HELP_STRING([--enable-local], [Build with local data resource [default=no]]), [], [enable_local=no])
AM_CONDITIONAL([ENABLE_LOCAL], [test "x$enable_local" != "xno"])
# Checking gtk+-2.0: requiered
PKG_CHECK_MODULES([gtk2], [gtk+-2.0])
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [package name for gettext])
AC_CONFIG_FILES([
po/Makefile.in
src/Makefile
Makefile
])
AC_OUTPUT
src/Makefile.am
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
if ENABLE_LOCAL
my_data_dir = "$(abs_top_builddir)/data"
my_locale_dir = "$(abs_top_builddir)/po"
else
my_data_dir = "$(datadir)/$(PACKAGE)"
my_locale_dir = "$(my_data_dir)/locales"
endif
if ENABLE_DEBUG
my_build_type = -g3 -O0
else
my_build_type = -O2
endif
bin_PROGRAMS = galarm
galarm_SOURCES = main.c
noinst_HEADERS =
DEFS = -DDATA_DIR=\"$(my_data_dir)\" -DLOCALEDIR=\"$(my_locale_dir)\"
galarm_CFLAGS = $(my_build_type) $(gtk2_CFLAGS)
galarm_LDADD = $(gtk2_LIBS) $(LTLIBINTL)
galarm_LDFLAGS = -rdynamic
And this is the verbosed output:
gcc -DDATA_DIR=\""/home/joel/Documentos/coding/autofoo/data"\" -DLOCALEDIR=\""/home/joel/Documentos/coding/autofoo/po"\" -I. -I.. -g3 -O0 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT galarm-main.o -MD -MP -MF .deps/galarm-main.Tpo -c -o galarm-main.o
test -f 'main.c' || echo './'
main.c mv -f .deps/galarm-main.Tpo .deps/galarm-main.Po /bin/sh ../libtool --tag=CC --mode=link gcc -g3 -O0 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -rdynamic -o galarm galarm-main.o -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype libtool: link: gcc -g3 -O0 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -rdynamic -o galarm galarm-main.o -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -pthread
As you can see, there is a double link call. Is this normal? Any way to just use once? Thanks.
Upvotes: 0
Views: 42
Reputation: 3240
I think your post's newline got mangled so it's hard to tell what you were trying to point people at.
But in general, what you're seeing is that there is a call to ../libtool
with --mode=link
, followed by the script itself reporting libtool: link:
(because that's what it was asked.)
There is only one gcc
call effectively executed.
Upvotes: 1