[SSSD] [patch] Avoid bashism in the configure script
Petter Reinholdtsen
pere at hungry.com
Thu May 20 21:23:56 UTC 2010
I tried to build sssd version 1.1.92 in Debian/Sid, and the build
failed. While investigating, I ran across bashism in the configure
script. /bin/sh in Debian is dash, and its test command do not
recognize the '==' bashism. Here is a patch to try to solve the ones
I found.
--- sssd-1.1.92.orig/src/conf_macros.m4
+++ sssd-1.1.92/src/conf_macros.m4
@@ -123,7 +123,7 @@
[],
with_manpages=yes
)
- if test x"$with_manpages" == xyes; then
+ if test x"$with_manpages" = xyes; then
HAVE_MANPAGES=1
AC_SUBST(HAVE_MANPAGES)
fi
@@ -167,7 +167,7 @@
[],
with_python_bindings=yes
)
- if test x"$with_python_bindings" == xyes; then
+ if test x"$with_python_bindings" = xyes; then
HAVE_PYTHON_BINDINGS=1
AC_SUBST(HAVE_PYTHON_BINDINGS)
fi
@@ -183,7 +183,7 @@
[],
with_selinux=yes
)
- if test x"$with_selinux" == xyes; then
+ if test x"$with_selinux" = xyes; then
HAVE_SELINUX=1
AC_SUBST(HAVE_SELINUX)
AC_DEFINE_UNQUOTED(HAVE_SELINUX, 1, [Build with SELinux support])
@@ -212,7 +212,7 @@
[],
with_nscd=yes
)
- if test x"$with_nscd" == xyes; then
+ if test x"$with_nscd" = xyes; then
AC_DEFINE_UNQUOTED(HAVE_NSCD, 1, [flush nscd cache after local domain operations])
fi
])
@@ -226,7 +226,7 @@
[],
with_semanage=yes
)
- if test x"$with_semanage" == xyes; then
+ if test x"$with_semanage" = xyes; then
HAVE_SEMANAGE=1
AC_SUBST(HAVE_SEMANAGE)
AC_DEFINE_UNQUOTED(HAVE_SEMANAGE, 1, [Build with SELinux support])
--- sssd-1.1.92.orig/src/external/platform.m4
+++ sssd-1.1.92/src/external/platform.m4
@@ -3,10 +3,10 @@
)
osname=""
if test x"$with_os" != x ; then
- if test x"$with_os" == xfedora -o \
- x"$with_os" == xredhat -o \
- x"$with_os" == xsuse -o \
- x"$with_os" == xdebian ; then
+ if test x"$with_os" = xfedora || \
+ test x"$with_os" = xredhat || \
+ test x"$with_os" = xsuse || \
+ test x"$with_os" = xdebian ; then
osname=$with_os
else
AC_MSG_ERROR([Illegal value -$with_os- for option --with-os])
@@ -27,10 +27,10 @@
AC_MSG_NOTICE([Detected operating system type: $osname])
fi
-AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" == xfedora])
-AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" == xredhat])
-AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" == xsuse])
-AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" == xdebian])
+AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" = xfedora])
+AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" = xredhat])
+AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" = xsuse])
+AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
[[#define _GNU_SOURCE
Happy hacking,
--
Petter Reinholdtsen
More information about the sssd-devel
mailing list