4

I want to add --export-dynamic flag to my project's configure.ac file. I am trying to compile my project files that must use this flag after pkg-config --cflags --libs gtk+-3.0.

The following are contents of my configure.ac file.

AC_INIT(myapp, 1.0)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11])
AM_SILENT_RULES([yes])
AC_PROG_CXX
AC_PROG_CC
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=myapp
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
LT_INIT
PKG_CHECK_MODULES(MYAPP, [gtk+-3.0 ])
AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
])

How do I do that?

Gurjot Bhatti
  • 977
  • 1
  • 10
  • 24
  • Does --export-dynamic work for all linkers? Is it specified in the standard for all platforms you are targetting? Do you want your package to be usable on platform you have not yet considered? Are there any linkers ever implemented that would abort if that flag was passed to them which someone might want to use? If not, or if you're not sure, then you need to add a check before adding the flag. (That is, use AM_CONDITIONAL in configure.ac before adding the flag in AM_LDFLAGS in Makefile.am) If you are sure, you should still add the check, because you're probably wrong! – William Pursell Jul 18 '14 at 11:31

1 Answers1

1

How about adding them to AM_LDFLAGS or more specific _LDFLAGS variable in Makefile.am

arved
  • 4,401
  • 4
  • 30
  • 53