Skip to content

Commit aa297a7

Browse files
author
sf-mensch
committed
build update
configure.ac: fix --without-iconv; use iconv includes, if necessary; use libtool link
1 parent 3f99dba commit aa297a7

File tree

2 files changed

+46
-21
lines changed

2 files changed

+46
-21
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
2025-03-27 Simon Sobisch <simonsobisch@gnu.org>
3+
4+
* configure.ac: fix --without-iconv; use iconv includes, if necessary;
5+
use libtool link
6+
27
2025-03-16 Simon Sobisch <simonsobisch@gnu.org>
38

49
* configure.ac: support setting of PANEL_LIBS independent of CURSES_LIBS

configure.ac

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,47 @@ AC_CHECK_LIB([$with_math], [__gmp_get_memory_functions],
984984
LIBS="$curr_libs"
985985
CPPFLAGS="$curr_cppflags"
986986

987+
988+
# Checks for internationalization stuff
989+
990+
dnl check for iconv is also done for gettext and
991+
dnl the AC_REQUIRE used in the macro below lead to the check
992+
dnl be done outside of the "with_iconv" test, so we only can
993+
dnl revert its effects after the check if disabled.
994+
995+
dnl Note that the AC_REQUIREd macros also output messages for
996+
dnl "how to run the C preprocessor" and "for egrep -e"
997+
998+
AC_ARG_WITH([iconv],
999+
[AS_HELP_STRING([--with-iconv],
1000+
[(GnuCOBOL) Use iconv for character set conversion (default: check)])],
1001+
[],
1002+
[with_iconv=check])
1003+
1004+
if test "$with_iconv" = no; then
1005+
am_cv_func_iconv_summary=disabled
1006+
am_cv_func_iconv=no
1007+
fi
1008+
1009+
AS_IF([test "$with_iconv" = yes -o "$with_iconv" = check], [
1010+
AM_ICONV
1011+
if test "$with_iconv" = yes && test "$am_cv_func_iconv" != yes; then
1012+
AC_MSG_ERROR([iconv library requested but not found])
1013+
fi
1014+
if test "$am_cv_func_iconv" = yes -a "x$LIBICONV" != x; then
1015+
PROGRAMS_LIBS="$PROGRAMS_LIBS $LTLIBICONV"
1016+
LIBCOB_LIBS="$LIBCOB_LIBS $LTLIBICONV"
1017+
COBC_CPPFLAGS="$COBC_CPPFLAGS $INCICONV"
1018+
LIBCOB_CPPFLAGS="$LIBCOB_CPPFLAGS $INCICONV"
1019+
fi
1020+
])
1021+
1022+
if test "$with_iconv" = no; then
1023+
am_cv_func_iconv_summary=disabled
1024+
fi
1025+
1026+
AM_LANGINFO_CODESET
1027+
9871028
# Checks for gettext.
9881029

9891030
case $host_os in
@@ -1017,27 +1058,6 @@ if test "x$LTLIBINTL" != x; then
10171058
LIBCOB_LIBS="$LIBCOB_LIBS $LTLIBINTL"
10181059
fi
10191060

1020-
# Checks for internationalization stuff
1021-
AM_LANGINFO_CODESET
1022-
1023-
AC_ARG_WITH([iconv],
1024-
[AS_HELP_STRING([--with-iconv],
1025-
[(GnuCOBOL) Use iconv for character set conversion (default: check)])],
1026-
[],
1027-
[with_iconv=check])
1028-
1029-
if test "$with_iconv" = yes -o "$with_iconv" = check; then
1030-
AM_ICONV
1031-
if test "$with_iconv" = yes && test "$am_cv_func_iconv" != yes; then
1032-
AC_MSG_ERROR([iconv library requested but not found])
1033-
fi
1034-
if test "$am_cv_func_iconv" = yes -a "x$LIBICONV" != x; then
1035-
PROGRAMS_LIBS="$PROGRAMS_LIBS $LIBICONV"
1036-
LIBCOB_LIBS="$LIBCOB_LIBS $LIBICONV"
1037-
fi
1038-
fi
1039-
1040-
10411061
dnl
10421062
dnl Configure options part II (needing compilation)
10431063
dnl

0 commit comments

Comments
 (0)