On glibc systems, libiconv and libintl are both built into libc. That
means that it's very easy to forget to link programs against them,
because it still builds OK on GNU/Linux. However, on other systems
they are usually separate libraries and forgetting to link against
them breaks the build.
This commit switches from previous PSPP practice, in which these
libraries were linked explicitly to every binary that requires them,
to a simplified practice where they are in LIBS so that every binary
is automatically linked to them. This has no disadvantage on
GNU/Linux, our primary target, and the advantage that on other targets
PSPP works more consistently.
UNINSTALL_DATA_HOOKS =
PHONY =
SUFFIXES = .q
UNINSTALL_DATA_HOOKS =
PHONY =
SUFFIXES = .q
generate-changelog:
if test -d $(top_srcdir)/.git; then \
generate-changelog:
if test -d $(top_srcdir)/.git; then \
dnl Disable automatic po/ support, because PSPP provides its own po/ support.
AC_PROVIDE([AM_PO_SUBDIRS])
AM_GNU_GETTEXT([external], [need-ngettext])
dnl Disable automatic po/ support, because PSPP provides its own po/ support.
AC_PROVIDE([AM_PO_SUBDIRS])
AM_GNU_GETTEXT([external], [need-ngettext])
dnl Checks for libraries.
AC_SYS_LARGEFILE
AC_SEARCH_LIBS([sin], [m])
dnl Checks for libraries.
AC_SYS_LARGEFILE
AC_SEARCH_LIBS([sin], [m])
-AC_SEARCH_LIBS([dcgettext], [intl])
if test "$am_cv_func_iconv" != "yes"; then
PSPP_REQUIRED_PREREQ([iconv (see http://www.gnu.org/software/libiconv/)])
fi
if test "$am_cv_func_iconv" != "yes"; then
PSPP_REQUIRED_PREREQ([iconv (see http://www.gnu.org/software/libiconv/)])
fi
+LIBS="$LTLIBICONV $LIBS"
dnl Required by the gnulib 'relocatable-prog' module.
dnl See doc/relocatable-maint.texi in the gnulib tree for details.
dnl Required by the gnulib 'relocatable-prog' module.
dnl See doc/relocatable-maint.texi in the gnulib tree for details.
src/libpspp.la \
src/libpspp-core.la \
$(GTK_LIBS) \
src/libpspp.la \
src/libpspp-core.la \
$(GTK_LIBS) \
- $(CAIRO_LIBS) \
- $(LIBICONV) \
- $(LIBINTL)
src_ui_gui_psppiredir = $(pkgdatadir)
src_ui_gui_psppiredir = $(pkgdatadir)
src/libpspp-core.la \
$(CAIRO_LIBS) \
$(NCURSES_LIBS) \
src/libpspp-core.la \
$(CAIRO_LIBS) \
$(NCURSES_LIBS) \
- $(LIBICONV) \
- $(LIBINTL) $(LIBREADLINE)
src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS)
src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS)
tests_data_datasheet_test_SOURCES = \
tests/data/datasheet-test.c
tests_data_datasheet_test_SOURCES = \
tests/data/datasheet-test.c
-tests_data_datasheet_test_LDADD = src/libpspp-core.la $(LIBINTL)
+tests_data_datasheet_test_LDADD = src/libpspp-core.la
tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
tests_data_sack_SOURCES = \
tests/data/sack.c
tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
tests_data_sack_SOURCES = \
tests/data/sack.c
-tests_data_sack_LDADD = src/libpspp-core.la $(LIBINTL)
+tests_data_sack_LDADD = src/libpspp-core.la
tests_data_sack_CFLAGS = $(AM_CFLAGS)
tests_libpspp_ll_test_SOURCES = \
src/libpspp/ll.c \
tests/libpspp/ll-test.c
tests_data_sack_CFLAGS = $(AM_CFLAGS)
tests_libpspp_ll_test_SOURCES = \
src/libpspp/ll.c \
tests/libpspp/ll-test.c
-tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
tests_libpspp_llx_test_SOURCES = \
src/libpspp/ll.c \
src/libpspp/llx.c \
tests/libpspp/llx-test.c
tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
tests_libpspp_llx_test_SOURCES = \
src/libpspp/ll.c \
src/libpspp/llx.c \
tests/libpspp/llx-test.c
-tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
tests_libpspp_encoding_guesser_test_SOURCES = \
tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
tests_libpspp_encoding_guesser_test_SOURCES = \
src/libpspp/pool.c \
src/libpspp/temp-file.c \
tests/libpspp/heap-test.c
src/libpspp/pool.c \
src/libpspp/temp-file.c \
tests/libpspp/heap-test.c
-tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_hmap_test_SOURCES = \
src/libpspp/hmap.c \
tests/libpspp/hmap-test.c
tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_hmap_test_SOURCES = \
src/libpspp/hmap.c \
tests/libpspp/hmap-test.c
-tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_hmapx_test_SOURCES = \
src/libpspp/hmap.c \
src/libpspp/hmapx.c \
tests/libpspp/hmapx-test.c
tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_hmapx_test_SOURCES = \
src/libpspp/hmap.c \
src/libpspp/hmapx.c \
tests/libpspp/hmapx-test.c
-tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
-tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL)
+tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
tests_libpspp_abt_test_SOURCES = \
src/libpspp/abt.c \
tests/libpspp/abt-test.c
tests_libpspp_abt_test_SOURCES = \
src/libpspp/abt.c \
tests/libpspp/abt-test.c
-tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_bt_test_SOURCES = \
src/libpspp/bt.c \
tests/libpspp/bt-test.c
tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_bt_test_SOURCES = \
src/libpspp/bt.c \
tests/libpspp/bt-test.c
-tests_libpspp_bt_test_LDADD = gl/libgl.la
tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_range_map_test_SOURCES = \
src/libpspp/bt.c \
src/libpspp/range-map.c \
tests/libpspp/range-map-test.c
tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_range_map_test_SOURCES = \
src/libpspp/bt.c \
src/libpspp/range-map.c \
tests/libpspp/range-map-test.c
-tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_range_set_test_SOURCES = \
tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_range_set_test_SOURCES = \
src/libpspp/range-set.c \
src/libpspp/temp-file.c \
tests/libpspp/range-set-test.c
src/libpspp/range-set.c \
src/libpspp/temp-file.c \
tests/libpspp/range-set-test.c
-tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_str_test_SOURCES = \
tests/libpspp/str-test.c
tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_str_test_SOURCES = \
tests/libpspp/str-test.c
-tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL)
+tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
tests_libpspp_string_map_test_SOURCES = \
src/libpspp/hash-functions.c \
tests_libpspp_string_map_test_SOURCES = \
src/libpspp/hash-functions.c \
src/libpspp/string-map.c \
src/libpspp/string-set.c \
tests/libpspp/string-map-test.c
src/libpspp/string-map.c \
src/libpspp/string-set.c \
tests/libpspp/string-map-test.c
-tests_libpspp_string_map_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_stringi_map_test_SOURCES = \
tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_stringi_map_test_SOURCES = \
src/libpspp/stringi-set.c \
src/libpspp/temp-file.c \
tests/libpspp/stringi-map-test.c
src/libpspp/stringi-set.c \
src/libpspp/temp-file.c \
tests/libpspp/stringi-map-test.c
-tests_libpspp_stringi_map_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_string_set_test_SOURCES = \
tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_string_set_test_SOURCES = \
src/libpspp/hmap.c \
src/libpspp/string-set.c \
tests/libpspp/string-set-test.c
src/libpspp/hmap.c \
src/libpspp/string-set.c \
tests/libpspp/string-set-test.c
-tests_libpspp_string_set_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_stringi_set_test_SOURCES = \
tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_stringi_set_test_SOURCES = \
src/libpspp/stringi-set.c \
src/libpspp/temp-file.c \
tests/libpspp/stringi-set-test.c
src/libpspp/stringi-set.c \
src/libpspp/temp-file.c \
tests/libpspp/stringi-set-test.c
-tests_libpspp_stringi_set_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_tower_test_SOURCES = \
tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_tower_test_SOURCES = \
src/libpspp/temp-file.c \
src/libpspp/tower.c \
tests/libpspp/tower-test.c
src/libpspp/temp-file.c \
src/libpspp/tower.c \
tests/libpspp/tower-test.c
-tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
src/libpspp/pool.c \
tests/libpspp/sparse-array-test.c \
src/libpspp/temp-file.c
src/libpspp/pool.c \
tests/libpspp/sparse-array-test.c \
src/libpspp/temp-file.c
-tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_sparse_xarray_test_SOURCES = \
tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_libpspp_sparse_xarray_test_SOURCES = \
src/libpspp/pool.c \
src/libpspp/temp-file.c \
tests/libpspp/sparse-xarray-test.c
src/libpspp/pool.c \
src/libpspp/temp-file.c \
tests/libpspp/sparse-xarray-test.c
-tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_data_inexactify_SOURCES = tests/data/inexactify.c
tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
tests_data_inexactify_SOURCES = tests/data/inexactify.c
src/libpspp/integer-format.c \
src/libpspp/float-format.c \
tests/dissect-sysfile.c
src/libpspp/integer-format.c \
src/libpspp/float-format.c \
tests/dissect-sysfile.c
-tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL)
tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
check_PROGRAMS += tests/language/lexer/command-name-test
tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
check_PROGRAMS += tests/language/lexer/command-name-test
tests/language/lexer/command-name-test.c
tests_language_lexer_command_name_test_LDADD = \
src/libpspp/libpspp.la \
tests/language/lexer/command-name-test.c
tests_language_lexer_command_name_test_LDADD = \
src/libpspp/libpspp.la \
- gl/libgl.la \
- $(LIBINTL)
tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/language/lexer/scan-test
tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/language/lexer/scan-test
src/libpspp/str.c \
src/libpspp/temp-file.c \
tests/language/lexer/scan-test.c
src/libpspp/str.c \
src/libpspp/temp-file.c \
tests/language/lexer/scan-test.c
-tests_language_lexer_scan_test_LDADD = gl/libgl.la $(LIBINTL)
tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/language/lexer/segment-test
tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/language/lexer/segment-test
src/libpspp/str.c \
src/libpspp/temp-file.c \
tests/language/lexer/segment-test.c
src/libpspp/str.c \
src/libpspp/temp-file.c \
tests/language/lexer/segment-test.c
-tests_language_lexer_segment_test_LDADD = gl/libgl.la $(LIBINTL)
tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/output/render-test
tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
check_PROGRAMS += tests/output/render-test
tests_output_render_test_LDADD = \
src/libpspp.la \
src/libpspp-core.la \
tests_output_render_test_LDADD = \
src/libpspp.la \
src/libpspp-core.la \
- $(CAIRO_LIBS) \
- $(LIBICONV) \
- $(LIBINTL)
EXTRA_DIST += \
tests/coverage.sh \
EXTRA_DIST += \
tests/coverage.sh \