From b3743583f08d7c658b2f0812a372595c8459e5c1 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Fri, 31 May 2024 20:40:06 +0000 Subject: [PATCH] Check and in configure and regen config.h. --- external/gpl2/mkhybrid/dist/config.h | 11 ++++-- external/gpl2/mkhybrid/dist/config.h.in | 6 ++++ external/gpl2/mkhybrid/dist/configure | 46 ++++++++++++++++++++++-- external/gpl2/mkhybrid/dist/configure.in | 3 +- 4 files changed, 60 insertions(+), 6 deletions(-) diff --git a/external/gpl2/mkhybrid/dist/config.h b/external/gpl2/mkhybrid/dist/config.h index 9954f8d74135..d61f2666385f 100644 --- a/external/gpl2/mkhybrid/dist/config.h +++ b/external/gpl2/mkhybrid/dist/config.h @@ -22,15 +22,24 @@ /* Define if you have the sbrk function. */ #define HAVE_SBRK 1 +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 +/* Define if you have the header file. */ +/* #undef HAVE_FLOCK_H */ + /* Define if you have the header file. */ /* #undef HAVE_MALLOC_H */ /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + /* Define if you have the header file. */ #define HAVE_STRING_H 1 @@ -63,5 +72,3 @@ /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 - -#define HAVE_FLOCK 1 diff --git a/external/gpl2/mkhybrid/dist/config.h.in b/external/gpl2/mkhybrid/dist/config.h.in index dc06274ef0cf..d3a1b9101a32 100644 --- a/external/gpl2/mkhybrid/dist/config.h.in +++ b/external/gpl2/mkhybrid/dist/config.h.in @@ -27,12 +27,18 @@ /* Define if you have the header file. */ #undef HAVE_DIRENT_H +/* Define if you have the header file. */ +#undef HAVE_FLOCK_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + /* Define if you have the header file. */ #undef HAVE_STRING_H diff --git a/external/gpl2/mkhybrid/dist/configure b/external/gpl2/mkhybrid/dist/configure index 4f8fee0ee35b..468b0de2c28d 100644 --- a/external/gpl2/mkhybrid/dist/configure +++ b/external/gpl2/mkhybrid/dist/configure @@ -1231,7 +1231,7 @@ else fi done -for ac_hdr in unistd.h string.h strings.h sys/stat.h sys/fcntl.h +for ac_hdr in unistd.h string.h strings.h stdlib.h sys/stat.h sys/fcntl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1271,6 +1271,46 @@ else fi done +for ac_hdr in flock.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1279: checking for $ac_hdr" >&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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1289: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1302,7 +1342,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1306: checking for a BSD compatible install" >&5 +echo "configure:1346: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1357,7 +1397,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1361: checking for $ac_word" >&5 +echo "configure:1401: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/external/gpl2/mkhybrid/dist/configure.in b/external/gpl2/mkhybrid/dist/configure.in index 7894f48ac50b..e960b81ffced 100644 --- a/external/gpl2/mkhybrid/dist/configure.in +++ b/external/gpl2/mkhybrid/dist/configure.in @@ -12,7 +12,8 @@ if test -z "$ac_header_dirent"; then fi AC_CHECK_FUNCS(memmove sbrk strdup) AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h) -AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h) +AC_CHECK_HEADERS(unistd.h string.h strings.h stdlib.h sys/stat.h sys/fcntl.h) +AC_CHECK_HEADERS(flock.h) AC_PROG_INSTALL AC_PROG_RANLIB AC_OUTPUT(Makefile)