Skip to content

Commit

Permalink
Merge SVN 5141
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jan 19, 2025
1 parent 0adcfe1 commit 55a884a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 23 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

* configure.ac: replace AC_ARG_VAR by AC_SUBST where appropriate

2023-07-24 Simon Sobisch <[email protected]>

* configure.ac: fix for resolving COBCRUN_NAME

2024-05-14 David Declerck <[email protected]>

* configure.ac: update flags for building dynamic libraries on macOS
Expand Down
17 changes: 11 additions & 6 deletions bin/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@

* cobfile.c, gcdiff.c: fixed some warnings about unsigned char

2023-07-24 Simon Sobisch <[email protected]>

* cob-config.in: prevent warning to use datadir, but not datarootdir;
allow abbreviated commands (blatantly copied from configure script)

2023-07-01 Fabrice Le Fessant <[email protected]>

* cob-config.in: echo in same order as arguments; add missing
arguments (--bindir,--libdir,--datadir,--mandir,--includedir)

2023-01-21 Simon Sobisch <[email protected]>

* cobfile.c, gcdiff.c: fixed some warnings about signed char
Expand All @@ -11,11 +21,6 @@

* cobcrun.c: use libcob's cob_getenv_direct instead of getenv

2023-07-01 Fabrice Le Fessant <[email protected]>

* cob-config: echo in same order as arguments. Add missing
arguments (--bindir,--libdir,--datadir,--mandir,--includedir)

2022-10-18 Simon Sobisch <[email protected]>

* cobcrun.c: minor validation - check for empty parameters
Expand Down Expand Up @@ -349,7 +354,7 @@
then you can switch easily.


Copyright 2004-2008,2010,2012,2014-2022 Free Software Foundation, Inc.
Copyright 2004-2008,2010,2012,2014-2023 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.
43 changes: 28 additions & 15 deletions bin/cob-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# cob-config
#
# Copyright (C) 2003-2012, 2020 Free Software Foundation, Inc.
# Written by Keisuke Nishida, Roger While
# Copyright (C) 2003-2012, 2020, 2023 Free Software Foundation, Inc.
# Written by Keisuke Nishida, Roger While, Simon Sobisch, Fabrice Le Fessant
#
# This file is part of GnuCOBOL.
#
Expand All @@ -27,6 +27,7 @@ exec_prefix_set=no
libdir=@libdir@
includedir=@includedir@
bindir=@bindir@
datarootdir=@datarootdir@
datadir=@datadir@
includedir=@includedir@
mandir=@mandir@
Expand All @@ -43,6 +44,8 @@ usage()
cat <<EOF
Usage: $me [options]
echos configuration variables of ${THIS}.
Options:
--prefix echos the package-prefix of ${THIS}
--exec-prefix echos the executable-prefix of ${THIS}
Expand All @@ -53,6 +56,7 @@ Options:
--version echos the release+patchdate version of ${THIS}
--bindir echos the directory containing ${THIS} programs
--datarootdir echos the data root for ${THIS}
--datadir echos the directory containing ${THIS} data
--includedir echos the directory containing ${THIS} header files
--libdir echos the directory containing ${THIS} libraries
Expand All @@ -74,47 +78,56 @@ while test $# -gt 0; do
esac

case $1 in
--prefix=*)
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--exec-prefix=*)
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--prefix)
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
echo ${prefix}
;;
--exec-prefix)
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
echo ${exec_prefix}
;;
--version)
-version | --version | --versio | --versi | --vers | -V)
echo ${version}
;;
--cflags)
-cflags | --cflags | --cflag | --cfla | --cfl | --cf | --c | -c)
echo ${cflags}
;;
--libs)
-libs | --libs | --lib | --li | --l | -l)
echo ${libs}
;;
--bindir)
-bindir | --bindir | --bindi | --bind | --bin | --bi)
echo ${bindir}
;;
--datadir)
-datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
| --dataroo | --dataro | --datar)
echo ${datarootdir}
;;
-datadir | --datadir | --datadi | --datad)
echo ${datadir}
;;
--includedir)
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
echo ${includedir}
;;
--libdir)
-libdir | --libdir | --libdi | --libd)
echo ${libdir}
;;
--mandir)
-mandir | --mandir | --mandi | --mand | --man | --ma | --m | -m)
echo ${mandir}
;;
--help)
-help | --help | --hel | --he | -h)
cat <<EOF
This is a shell script which simplifies configuring applications
against a particular version of the GnuCOBOL library.
Expand Down
12 changes: 10 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2766,8 +2766,16 @@ AX_AC_DEFINE_RESOLVED([COB_SCHEMA_DIR], [$COB_SCHEMA_DIR], [default search path
dnl unused: AX_AC_DEFINE_RESOLVED([DATADIR], [$datarootdir], [path for configuration files])
AX_AC_DEFINE_RESOLVED([LOCALEDIR], [$localedir], [path for locale-dependent data])
dnl unused: AC_DEFINE_UNQUOTED([COBC_NAME], ["$(echo cobc | $SED "$program_transform_name")"], [executable name for compiler])
AC_DEFINE_UNQUOTED([COBCRUN_NAME], ["$(echo cobcrun | $SED "$program_transform_name")"], [executable name for module runner])
# convert from "make" style to real command
local_transform=$(echo "$program_transform_name" | $SED -e 's,\$\$,$,')
dnl unused: cobc_name="$(echo cobc | $SED -e $local_transform)"
dnl unused: AC_DEFINE_UNQUOTED([COBC_NAME], ["$cobc_name"], [executable name for compiler])
dnl unused: unset cobc_name
cobcrun_name="$(echo cobcrun | $SED -e $local_transform)"
AC_DEFINE_UNQUOTED([COBCRUN_NAME], ["$cobcrun_name"], [executable name for module runner])
unset cobcrun_name
unset local_transform
dnl informational only
AC_DEFINE_UNQUOTED([COB_BLD_CC], ["$CC"], [informational: compiler during compilation])
Expand Down

0 comments on commit 55a884a

Please sign in to comment.