| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
AC_DEFUN([ENSC_CHECK_EXT2FS_HEADER], |
|---|
| 19 |
[ |
|---|
| 20 |
AC_LANG_PUSH(C++) |
|---|
| 21 |
AC_CACHE_CHECK([for ext2fs-headers], [ensc_cv_test_ext2fs_header],[ |
|---|
| 22 |
AC_COMPILE_IFELSE(AC_LANG_SOURCE([ |
|---|
| 23 |
int main() { return 0; }]), |
|---|
| 24 |
[ensc_cv_test_ext2fs_header=e2fsprogs],[ |
|---|
| 25 |
AC_COMPILE_IFELSE(AC_LANG_SOURCE([ |
|---|
| 26 |
int main() { return 0; }]), |
|---|
| 27 |
[ensc_cv_test_ext2fs_header=kernel],[ |
|---|
| 28 |
ensc_cv_test_ext2fs_header=none])])]) |
|---|
| 29 |
|
|---|
| 30 |
case x"$ensc_cv_test_ext2fs_header" in |
|---|
| 31 |
(xe2fsprogs) |
|---|
| 32 |
AC_CHECK_HEADER([ext2fs/ext2_fs.h], |
|---|
| 33 |
[AC_DEFINE(ENSC_HAVE_EXT2FS_EXT2_FS_H, 1, [define when <ext2fs/ext2_fs.h> is usable])], |
|---|
| 34 |
[AC_MSG_FAILURE([unexpected error while checkin for <ext2fs/ext2_fs.h>])]) |
|---|
| 35 |
;; |
|---|
| 36 |
(xkernel) |
|---|
| 37 |
AC_CHECK_HEADER([linux/ext2_fs.h], |
|---|
| 38 |
[AC_DEFINE(ENSC_HAVE_LINUX_EXT2_FS_H, 1, [define when <linux/ext2_fs.h> is usable])], |
|---|
| 39 |
[AC_MSG_FAILURE([unexpected error while checkin for <linux/ext2_fs.h>])]) |
|---|
| 40 |
;; |
|---|
| 41 |
(*) |
|---|
| 42 |
AC_MSG_FAILURE([ |
|---|
| 43 |
ext2fs headers were not found, or they are not usable. This can have |
|---|
| 44 |
the following reasons: |
|---|
| 45 |
|
|---|
| 46 |
* you have neither the e2fsprogs nor the kernel headers installed |
|---|
| 47 |
|
|---|
| 48 |
* kernel headers are broken (e.g. these of linux 2.6 are known to be) |
|---|
| 49 |
and you do not have e2fsprogs headers installed; please try to install |
|---|
| 50 |
- e2fsprogs-devel (for Red Hat), or |
|---|
| 51 |
- lib*ext2fs2-devel (for Mandriva), or |
|---|
| 52 |
- e2fslibs-dev (for Debian) |
|---|
| 53 |
in this case. |
|---|
| 54 |
|
|---|
| 55 |
* kernel headers are broken and your e2fsprogs headers are too old; |
|---|
| 56 |
until version 1.27 (inclusive), they are using reserved C++ keywords |
|---|
| 57 |
|
|---|
| 58 |
* kernel headers are broken and your e2fsprogs headers are too new; |
|---|
| 59 |
recent (January 2004) BK snapshots of e2fsprogs are unusable for |
|---|
| 60 |
C++, for details and a solution see |
|---|
| 61 |
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112448 |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
In the latter two cases you have the following options: |
|---|
| 65 |
* fix the headers manually, or |
|---|
| 66 |
* install a stable version of e2fsprogs (e.g. 1.34), or |
|---|
| 67 |
* use good kernel headers (from linux 2.4.x) |
|---|
| 68 |
]) |
|---|
| 69 |
;; |
|---|
| 70 |
esac |
|---|
| 71 |
AC_LANG_POP |
|---|
| 72 |
]) |
|---|