summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-08-08 14:01:50 +0000
committerjkar8572 <jkar8572>2001-08-08 14:01:50 +0000
commitd53de898f784e71fe6ecb157be86b644b092e88b (patch)
treefd15ac0c636da35f73215f61701c286041443ed2
parent5f7affb337573a9679d9a5205a697003f9b51979 (diff)
Made configure script work right of systems with e2fslib but without ext2fs.h.
-rwxr-xr-xconfigure66
-rw-r--r--configure.in8
2 files changed, 30 insertions, 44 deletions
diff --git a/configure b/configure
index 2d14aae..15e5855 100755
--- a/configure
+++ b/configure
@@ -1068,28 +1068,21 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lcom_err $LIBS"
-
+ EXT2LIBS="-lcom_err $EXT2LIBS"
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for ext2fs_initialize in -lext2fs""... $ac_c" 1>&6
-echo "configure:1085: checking for ext2fs_initialize in -lext2fs" >&5
+echo "configure:1078: checking for ext2fs_initialize in -lext2fs" >&5
ac_lib_var=`echo ext2fs'_'ext2fs_initialize | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lext2fs $LIBS"
+LIBS="-lext2fs "-lcom_err" $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1093 "configure"
+#line 1086 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1100,7 +1093,7 @@ int main() {
ext2fs_initialize()
; return 0; }
EOF
-if { (eval echo configure:1104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1115,14 +1108,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo ext2fs | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lext2fs $LIBS"
-
+ EXT2LIBS="-lext2fs $EXT2LIBS"
else
echo "$ac_t""no" 1>&6
fi
@@ -1134,20 +1120,21 @@ fi
echo "configure: warning: Ext2 direct support won't be compiled. Libraries not found." 1>&2
fi
with_ext2direct="no"
+ EXT2LIBS=""
else
ac_safe=`echo "ext2fs/ext2fs.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ext2fs/ext2fs.h""... $ac_c" 1>&6
-echo "configure:1141: checking for ext2fs/ext2fs.h" >&5
+echo "configure:1128: checking for ext2fs/ext2fs.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1146 "configure"
+#line 1133 "configure"
#include "confdefs.h"
#include <ext2fs/ext2fs.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1175,6 +1162,7 @@ fi
echo "configure: warning: Ext2 direct support won't be compiled. Header files not found." 1>&2
fi
with_ext2direct="no"
+ EXT2LIBS=""
else
with_ext2direct="yes"
fi
@@ -1184,12 +1172,10 @@ fi
fi
fi
-EXT2LIBS=${LIBS}
-LIBS=""
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:1193: checking for main in -lnsl" >&5
+echo "configure:1179: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1197,14 +1183,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1201 "configure"
+#line 1187 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1232,7 +1218,7 @@ else
fi
echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
-echo "configure:1236: checking for main in -lwrap" >&5
+echo "configure:1222: checking for main in -lwrap" >&5
ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1240,14 +1226,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lwrap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1244 "configure"
+#line 1230 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1278,17 +1264,17 @@ fi
if test ${ac_cv_lib_wrap_main} = yes; then
ac_safe=`echo "tcpd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tcpd.h""... $ac_c" 1>&6
-echo "configure:1282: checking for tcpd.h" >&5
+echo "configure:1268: checking for tcpd.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
+#line 1273 "configure"
#include "confdefs.h"
#include <tcpd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1318,12 +1304,12 @@ fi
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1322: checking for working const" >&5
+echo "configure:1308: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1327 "configure"
+#line 1313 "configure"
#include "confdefs.h"
int main() {
@@ -1372,7 +1358,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1393,21 +1379,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1397: checking for inline" >&5
+echo "configure:1383: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1404 "configure"
+#line 1390 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
diff --git a/configure.in b/configure.in
index 4775238..e98e3aa 100644
--- a/configure.in
+++ b/configure.in
@@ -12,8 +12,8 @@ AC_ARG_WITH(ext2direct,
,
with_ext2direct="try")
if test "x$with_ext2direct" != "xno"; then
- AC_CHECK_LIB(com_err, com_err)
- AC_CHECK_LIB(ext2fs, ext2fs_initialize)
+ AC_CHECK_LIB(com_err, com_err, EXT2LIBS="-lcom_err $EXT2LIBS")
+ AC_CHECK_LIB(ext2fs, ext2fs_initialize, EXT2LIBS="-lext2fs $EXT2LIBS",, "-lcom_err")
if test "${ac_cv_lib_com_err_com_err}" != "yes" -o "${ac_cv_lib_ext2fs_ext2fs_initialize}" != "yes"; then
if test "x$with_ext2direct" = "xyes"; then
AC_MSG_ERROR([Ext2 direct support required but libraries not found.])
@@ -21,6 +21,7 @@ if test "x$with_ext2direct" != "xno"; then
AC_MSG_WARN([Ext2 direct support won't be compiled. Libraries not found.])
fi
with_ext2direct="no"
+ EXT2LIBS=""
else
AC_CHECK_HEADER(ext2fs/ext2fs.h,ext2fshead="yes")
if test "x$ext2fshead" != "xyes"; then
@@ -30,6 +31,7 @@ if test "x$with_ext2direct" != "xno"; then
AC_MSG_WARN([Ext2 direct support won't be compiled. Header files not found.])
fi
with_ext2direct="no"
+ EXT2LIBS=""
else
with_ext2direct="yes"
fi
@@ -39,9 +41,7 @@ if test "x$with_ext2direct" != "xno"; then
AC_SUBST(EXT2_DIRECT)
fi
fi
-EXT2LIBS=${LIBS}
AC_SUBST(EXT2LIBS)
-LIBS=""
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(wrap, main)