Double quote code passed to AC_LANG_PROGRAM

Upon re-reading the autoconf documentation, this seemed the right thing
to do.  The AC_LANG_PROGRAM macro does not quote its arguments so any
occurence of [ and ] will get stripped out if not double quoted.

Current code snippets passed do not use them but it is better to use a
consistent quoting approach for such snippets.  In other places in the
configure.ac file double quoting is used already.
merge-requests/1/head
Olaf Meeuwissen 2015-10-28 20:59:22 +09:00
rodzic d3d5dc3da0
commit d9e2f44113
2 zmienionych plików z 27 dodań i 27 usunięć

Wyświetl plik

@ -181,10 +181,10 @@ AC_DEFUN([SANE_CHECK_IEEE1284],
[
AC_CHECK_HEADER(ieee1284.h, [
AC_CACHE_CHECK([for libieee1284 >= 0.1.5], sane_cv_use_libieee1284, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <ieee1284.h>], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ieee1284.h>]], [[
struct parport p; char *buf;
ieee1284_nibble_read(&p, 0, buf, 1);
])],
]])],
[sane_cv_use_libieee1284="yes"; IEEE1284_LIBS="-lieee1284"
],[sane_cv_use_libieee1284="no"])
],)
@ -492,16 +492,16 @@ AC_DEFUN([SANE_CHECK_IPV6],
])
if test "$ipv6" != "no" ; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
#include <sys/socket.h> ]], [[
/* AF_INET6 available check */
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
exit(0);
])],[
]])],[
AC_MSG_RESULT(yes)
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
ipv6=yes
@ -513,27 +513,27 @@ AC_DEFUN([SANE_CHECK_IPV6],
if test "$ipv6" != "no" ; then
AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
#include <sys/socket.h> ]], [[
/* test if the ss_family member exists in struct sockaddr_storage */
struct sockaddr_storage ss;
ss.ss_family = AF_INET;
exit (0);
])], [
]])], [
AC_MSG_RESULT(yes)
AC_DEFINE([HAS_SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has an ss_family member])
], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define INET6
#include <sys/types.h>
#include <sys/socket.h> ], [
#include <sys/socket.h> ]], [[
/* test if the __ss_family member exists in struct sockaddr_storage */
struct sockaddr_storage ss;
ss.__ss_family = AF_INET;
exit (0);
])], [
]])], [
AC_MSG_RESULT([no, but __ss_family exists])
AC_DEFINE([HAS___SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has __ss_family instead of ss_family])
], [

Wyświetl plik

@ -231,22 +231,22 @@ SANE_CHECK_U_TYPES
# from Python, check for "long long" type
AC_MSG_CHECKING(for long long support)
have_long_long=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [long long x; x = (long long)0;])],[AC_DEFINE(HAVE_LONG_LONG, 1, Define if the long long type is available.) have_long_long=yes],[])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[AC_DEFINE(HAVE_LONG_LONG, 1, Define if the long long type is available.) have_long_long=yes],[])
AC_MSG_RESULT($have_long_long)
AC_MSG_CHECKING([for socklen_t in <sys/socket.h>])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/socket.h>
], [socklen_t len])],AC_MSG_RESULT(yes),
]], [[socklen_t len]])],AC_MSG_RESULT(yes),
[AC_MSG_RESULT(no); AC_DEFINE(socklen_t,int,
[Define socklen_t as \'int\' if necessary.])])
AC_MSG_CHECKING([for union semun in <sys/sem.h>])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
], [union semun test_semun])],[AC_MSG_RESULT(yes);
]], [[union semun test_semun]])],[AC_MSG_RESULT(yes);
AC_DEFINE(HAVE_UNION_SEMUN,1,[Define if union semun is available.])],
[AC_MSG_RESULT(no)])
@ -256,12 +256,12 @@ AC_EGREP_HEADER([struct flock], fcntl.h, [AC_MSG_RESULT(yes) ;
[Define if struct flock is available.])], AC_MSG_RESULT(no))
AC_MSG_CHECKING([for Linux ioctl defines])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/ioctl.h>
#include <asm/types.h>
],[
]],[[
__u32 houba = _IOR('v',14, unsigned long);
])],[AC_MSG_RESULT(yes);
]])],[AC_MSG_RESULT(yes);
have_linux_ioctl_defines="yes";],AC_MSG_RESULT(no))
dnl ***********************************************************************
@ -487,10 +487,10 @@ dnl FreeBSD < 3
if test "$ac_cv_header_sys_scsiio_h" = "yes" \
-a "$ac_cv_header_scsi_h" = "yes"; then
AC_MSG_CHECKING([if 'scsireq_t' needs to be defined as 'struct scsireq'])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/scsiio.h>
#include <scsi.h>
], [scsireq_t req])],,
]], [[scsireq_t req]])],,
[AC_MSG_RESULT(yes);
AC_DEFINE(scsireq_t, struct scsireq_t,
[Define scsireq_t as \'struct scsireq\' if necessary.])])
@ -504,14 +504,14 @@ AC_CHECK_FUNCS(scsireq_enter)
if test "$ac_cv_header_scsi_sg_h" = "yes"; then
AC_MSG_CHECKING([for sg_header.target_status in <scsi/sg.h>])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <scsi/sg.h>
],[
]],[[
struct sg_header hdr;
hdr.target_status = 1;
return 0;
])],[AC_MSG_RESULT(yes);
]])],[AC_MSG_RESULT(yes);
AC_DEFINE(HAVE_SG_TARGET_STATUS,1,
[Define if sg_header.target_status is available.])],
AC_MSG_RESULT(no))
@ -519,13 +519,13 @@ fi
if test "$ac_cv_header_IOKit_scsi_SCSITaskLib_h" = "yes"; then
AC_MSG_CHECKING([for SCSITaskSGElement in IOKit/scsi/SCSITaskLib.h])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#undef VERSION
#include <IOKit/scsi/SCSITaskLib.h>
],[
]],[[
SCSITaskSGElement range;
return 0;
])],[AC_MSG_RESULT(yes);
]])],[AC_MSG_RESULT(yes);
AC_DEFINE(HAVE_SCSITASKSGELEMENT, 1,
[Define if SCSITaskSGElement is available.])],
AC_MSG_RESULT(no))