Skip to contentSkip to conversation

configure.ac: fix configure fail with --disable-mount

PATCH In review Kinglong Mee 2 participants 2 messages Apr 15, 2015 – May 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 configure.ac: fix configure fail with --disable-mount

Configure fail as,

# ./configure --disable-mount
... ...
checking for suitable libblkid version... yes
checking for mnt_context_do_mount in -lmount... no
configure: error: libmount needed

It is caused by $enable_libmount is "" (not "yes" and "no") with --disable-mount.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 21be2bd..d4301a2 100644
@@ -346,7 +346,7 @@ AC_SUBST(LIBBSD)
 AC_SUBST(LIBBLKID)
 AC_SUBST(LIBDL)
 
-if test "$enable_libmount" != no; then
+if test "$enable_libmount" == yes; then
    AC_CHECK_LIB(mount, mnt_context_do_mount, [LIBMOUNT="-lmount"], AC_MSG_ERROR([libmount needed]))
    AC_CHECK_HEADER(libmount/libmount.h, , AC_MSG_ERROR([Cannot find libmount header file libmount/libmount.h]))
 fi
Signature · 1 line
2.3.5
#1 lore raw
Quoted 7 lines · Kinglong Mee

Configure fail as,

# ./configure --disable-mount
... ...
checking for suitable libblkid version... yes
checking for mnt_context_do_mount in -lmount... no
configure: error: libmount needed
Quoted 7 lines

It is caused by $enable_libmount is "" (not "yes" and "no") with --disable-mount.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Committed...

steved.

Quoted 15 lines
configure.ac +1 -1
index 21be2bd..d4301a2 100644
@@ -346,7 +346,7 @@ AC_SUBST(LIBBSD)
 AC_SUBST(LIBBLKID)
 AC_SUBST(LIBDL)
 
-if test "$enable_libmount" != no; then
+if test "$enable_libmount" == yes; then
    AC_CHECK_LIB(mount, mnt_context_do_mount, [LIBMOUNT="-lmount"], AC_MSG_ERROR([libmount needed]))
    AC_CHECK_HEADER(libmount/libmount.h, , AC_MSG_ERROR([Cannot find libmount header file libmount/libmount.h]))
 fi