replace: Add check for variable program_invocation_short_name
authorMartin Schwenke <martin@meltin.net>
Mon, 12 Nov 2018 23:05:21 +0000 (10:05 +1100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 13 Nov 2018 10:11:11 +0000 (11:11 +0100)
commit9f5768106fd43935bc2725ec1b2ecce5c69f1a34
tree666a120887a726571382d543e94cc5db6ec3025c
parent63a9fe1d445f04eb83a7d0f9d27355c2baf9c5bf
replace: Add check for variable program_invocation_short_name

It appears that wafsamba's configure() defines _GNU_SOURCE
unconditionally, so checking _GNU_SOURCE isn't enough to know if this
variable is available.

For example, it isn't available on AIX with the xlc compiler:

  [ 6/10] Compiling lib/replace/replace.c
  ...
  "../../lib/replace/replace.c", line 991.16: 1506-045 (S) Undeclared identifier program_invocation_short_name.

Instead, add a configure check for program_invocation_short_name and
use it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 13 11:11:11 CET 2018 on sn-devel-144
lib/replace/replace.c
lib/replace/wscript