Skip to content

Commit

Permalink
AIX build #374 + use statfs() if statvfs() not found
Browse files Browse the repository at this point in the history
  • Loading branch information
genivia-inc committed Mar 22, 2024
1 parent 74f5548 commit a874458
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 1,957 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Why use ugrep?
--------------

- Ugrep is a true drop-in replacement for GNU grep (assuming you [rename or symlink `ugrep` to `grep`, `egrep` and `fgrep`](#grep)), unlike many other popular grep claiming to be "grep alternatives" or "replacements" when those actually implement incompatible command-line options and use a different, incompatible regex matcher i.e. Perl regex versus POSIX regex grep (ugrep supports both)
- Ugrep is a true drop-in replacement for GNU grep (assuming you [copy or symlink `ug` to `grep`, `egrep` and `fgrep`](#grep)), unlike many other popular grep claiming to be "grep alternatives" or "replacements" when those actually implement incompatible command-line options and use a different, incompatible regex matcher i.e. Perl regex versus POSIX regex grep (ugrep supports both)

- Ugrep is fast, user-friendly, and equipped with a ton of new features that users wanted

Expand Down
6 changes: 6 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
/* Define to 1 if you have the `setpriority' function. */
#undef HAVE_SETPRIORITY

/* Define to 1 if you have the `statfs' function. */
#undef HAVE_STATFS

/* Define to 1 if you have the `statvfs' function. */
#undef HAVE_STATVFS

Expand Down Expand Up @@ -131,6 +134,9 @@
*/
#undef HAVE_SYS_DIR_H

/* Define to 1 if you have the <sys/mount.h> header file. */
#undef HAVE_SYS_MOUNT_H

/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
Expand Down
24 changes: 18 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5531,23 +5531,29 @@ fi
rm -f conftest.mmap conftest.txt


ac_fn_cxx_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_statvfs_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h

fi
ac_fn_cxx_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_time_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h

fi
ac_fn_cxx_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_statvfs_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h

fi
ac_fn_cxx_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_param_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h

fi
ac_fn_cxx_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_mount_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h

fi
ac_fn_cxx_check_header_compile "$LINENO" "sys/cpuset.h" "ac_cv_header_sys_cpuset_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_cpuset_h" = xyes
Expand All @@ -5569,6 +5575,12 @@ then :
fi


ac_fn_cxx_check_func "$LINENO" "statfs" "ac_cv_func_statfs"
if test "x$ac_cv_func_statfs" = xyes
then :
printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
if test "x$ac_cv_func_statvfs" = xyes
then :
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ AC_STRUCT_DIRENT_D_TYPE

AC_FUNC_MMAP

AC_CHECK_HEADERS([sys/statvfs.h sys/time.h sys/param.h sys/cpuset.h sys/resource.h sched.h])
AC_CHECK_HEADERS([sys/time.h sys/statvfs.h sys/param.h sys/mount.h sys/cpuset.h sys/resource.h sched.h])

AC_CHECK_FUNCS([statvfs])
AC_CHECK_FUNCS([statfs statvfs])

AX_PTHREAD

Expand Down
138 changes: 0 additions & 138 deletions m4/ax_check_brotlilib.m4

This file was deleted.

134 changes: 0 additions & 134 deletions m4/ax_check_bz2lib.m4

This file was deleted.

Loading

0 comments on commit a874458

Please sign in to comment.