Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
noinst_LIBRARIES = libsynaptic.a

AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DSYNAPTICSTATEDIR=\""$(localstatedir)"\" \
@SYNAPTIC_APP_PATHS@ \
@GTK_DISABLE_DEPRECATED@ \
@GTK_CFLAGS@ \
@VTE_CFLAGS@ \
Expand Down
20 changes: 20 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,26 @@ AC_ARG_WITH(launchpad-integration,
]
)

# IDEs and code analisys tools need to know about the externally defined symbols,
# so, for those scenarios, here those are added to the config.h file with default values.
# Otherwise they're injected at build time (through the -D command line arguments in the makefiles).
AC_ARG_ENABLE(ide-integration, [ --enable-ide-integration: Define default values in config.h for the injected symbols for the IDEs and code analisys tools.])
AS_IF([test "x$enable_ide_integration" = "xyes"],
[
# These default values define relative paths to the current folder (i.e., where the executable is).
AC_DEFINE(PACKAGE_DATA_DIR, "./share", Default value for the IDEs and code analisys tools.)
AC_DEFINE(PACKAGE_LOCALE_DIR, "./share/locale", Default value for the IDEs and code analisys tools.)
AC_DEFINE(SYNAPTICSTATEDIR, "./var", Default value for the IDEs and code analisys tools.)
AC_DEFINE(SYNAPTIC_GTKBUILDERDIR, "./gtkbuilder/", Default value for the IDEs and code analisys tools.)
AC_DEFINE(SYNAPTIC_PIXMAPDIR, "./pixmaps/", Default value for the IDEs and code analisys tools.)
],
[
# The paths defined here are replaced at make time by the standard values (as defined by GNU for the "Variables for Installation Directories").
# They can be adjusted by passing the --prefix option to autogen.
AC_SUBST(SYNAPTIC_APP_PATHS,'-DPACKAGE_DATA_DIR=\""${datadir}"\" -DPACKAGE_LOCALE_DIR=\""${localedir}"\" -DSYNAPTICSTATEDIR=\""${localstatedir}"\" -DSYNAPTIC_GTKBUILDERDIR=\""${datadir}/synaptic/gtkbuilder/"\" -DSYNAPTIC_PIXMAPDIR=\""${datadir}/synaptic/pixmaps/"\"')
]
)

AC_ARG_WITH(pkg-hold,
[ --with-pkg-hold: Build with experimental package "hold" feature],
AC_DEFINE(SYNAPTIC_PKG_HOLD, 1, [build with package pin feature])
Expand Down
6 changes: 1 addition & 5 deletions gtk/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ SUBDIRS = gtkbuilder


AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DSYNAPTICSTATEDIR=\""$(localstatedir)"\" \
-DSYNAPTIC_GTKBUILDERDIR=\""$(datadir)/synaptic/gtkbuilder/"\" \
-DSYNAPTIC_PIXMAPDIR=\""$(datadir)/synaptic/pixmaps/"\" \
@SYNAPTIC_APP_PATHS@ \
@GTK_DISABLE_DEPRECATED@ \
@GTK_CFLAGS@ \
@VTE_CFLAGS@ \
Expand Down
4 changes: 1 addition & 3 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

AM_CPPFLAGS = -I@top_srcdir@ -I@top_srcdir@/common -I@top_srcdir@/gtk -I@top_builddir@ \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DSYNAPTICSTATEDIR=\""$(localstatedir)"\" \
@SYNAPTIC_APP_PATHS@ \
@GTK_DISABLE_DEPRECATED@ \
@GTK_CFLAGS@ \
@VTE_CFLAGS@ \
Expand Down