[BACK]Return to configure CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/configure between version 1.48 and 1.53

version 1.48, 2016/07/31 09:29:13 version 1.53, 2016/10/20 18:47:49
Line 37  MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/lo
Line 37  MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/lo
 OSNAME=  OSNAME=
 UTF8_LOCALE=  UTF8_LOCALE=
   
 CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -f -`  CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
 CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"  CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
 CFLAGS="${CFLAGS} -Wno-unused-parameter"  CFLAGS="${CFLAGS} -Wno-unused-parameter"
 LDADD=  LDADD=
Line 50  BUILD_CGI=0
Line 50  BUILD_CGI=0
   
 HAVE_DIRENT_NAMLEN=  HAVE_DIRENT_NAMLEN=
 HAVE_EFTYPE=  HAVE_EFTYPE=
   HAVE_ENDIAN=
 HAVE_ERR=  HAVE_ERR=
 HAVE_FTS=  HAVE_FTS=
   HAVE_FTS_COMPARE_CONST=
 HAVE_GETLINE=  HAVE_GETLINE=
 HAVE_GETSUBOPT=  HAVE_GETSUBOPT=
 HAVE_ISBLANK=  HAVE_ISBLANK=
 HAVE_MKDTEMP=  HAVE_MKDTEMP=
 HAVE_NANOSLEEP=  HAVE_NANOSLEEP=
   HAVE_NTOHL=
 HAVE_OHASH=  HAVE_OHASH=
   HAVE_PATH_MAX=
 HAVE_PLEDGE=  HAVE_PLEDGE=
 HAVE_PROGNAME=  HAVE_PROGNAME=
 HAVE_REALLOCARRAY=  HAVE_REALLOCARRAY=
Line 71  HAVE_STRLCPY=
Line 75  HAVE_STRLCPY=
 HAVE_STRPTIME=  HAVE_STRPTIME=
 HAVE_STRSEP=  HAVE_STRSEP=
 HAVE_STRTONUM=  HAVE_STRTONUM=
   HAVE_SYS_ENDIAN=
 HAVE_VASPRINTF=  HAVE_VASPRINTF=
 HAVE_WCHAR=  HAVE_WCHAR=
   
Line 125  COMP="${CC} ${CFLAGS} -Wno-unused -Werror"
Line 130  COMP="${CC} ${CFLAGS} -Wno-unused -Werror"
 # If yes, use the override, if no, do not decide anything yet.  # If yes, use the override, if no, do not decide anything yet.
 # Arguments: lower-case test name, manual value  # Arguments: lower-case test name, manual value
 ismanual() {  ismanual() {
         [ -z "${2}" ] && return 1          [ -z "${3}" ] && return 1
         echo "${1}: manual (${2})" 1>&2          echo "${1}: manual (HAVE_${2}=${3})" 1>&2
         echo "${1}: manual (${2})" 1>&3          echo "${1}: manual (HAVE_${2}=${3})" 1>&3
         echo 1>&3          echo 1>&3
         return 0          return 0
 }  }
Line 138  ismanual() {
Line 143  ismanual() {
 # Arguments: lower-case test name, upper-case test name, additional CFLAGS  # Arguments: lower-case test name, upper-case test name, additional CFLAGS
 singletest() {  singletest() {
         cat 1>&3 << __HEREDOC__          cat 1>&3 << __HEREDOC__
 ${1}: testing...  ${1}${3}: testing...
 ${COMP} ${3} -o test-${1} test-${1}.c  ${COMP} ${3} -o test-${1} test-${1}.c
 __HEREDOC__  __HEREDOC__
   
         if ${COMP} ${3} -o "test-${1}" "test-${1}.c" 1>&3 2>&3; then          if ${COMP} ${3} -o "test-${1}" "test-${1}.c" 1>&3 2>&3; then
                 echo "${1}: ${CC} succeeded" 1>&3                  echo "${1}${3}: ${CC} succeeded" 1>&3
         else          else
                 echo "${1}: ${CC} failed with $?" 1>&3                  echo "${1}${3}: ${CC} failed with $?" 1>&3
                 echo 1>&3                  echo 1>&3
                 return 1                  return 1
         fi          fi
   
         if ./test-${1} 1>&3 2>&3; then          if ./test-${1} 1>&3 2>&3; then
                 echo "${1}: yes" 1>&2                  echo "${1}${3}: yes" 1>&2
                 echo "${1}: yes" 1>&3                  echo "${1}${3}: yes" 1>&3
                 echo 1>&3                  echo 1>&3
                 eval HAVE_${2}=1                  eval HAVE_${2}=1
                 rm "test-${1}"                  rm "test-${1}"
                 return 0                  return 0
         else          else
                 echo "${1}: execution failed with $?" 1>&3                  echo "${1}${3}: execution failed with $?" 1>&3
                 echo 1>&3                  echo 1>&3
                 rm "test-${1}"                  rm "test-${1}"
                 return 1                  return 1
Line 170  __HEREDOC__
Line 175  __HEREDOC__
 # Arguments: lower case name, upper case name, additional CFLAGS  # Arguments: lower case name, upper case name, additional CFLAGS
 runtest() {  runtest() {
         eval _manual=\${HAVE_${2}}          eval _manual=\${HAVE_${2}}
         ismanual "${1}" "${_manual}" && return 0          ismanual "${1}" "${2}" "${_manual}" && return 0
         singletest "${1}" "${2}" "${3}" && return 0          singletest "${1}" "${2}" "${3}" && return 0
         echo "${1}: no" 1>&2          echo "${1}${3}: no" 1>&2
         eval HAVE_${2}=0          eval HAVE_${2}=0
         return 1          return 1
 }  }
Line 180  runtest() {
Line 185  runtest() {
 # Select a UTF-8 locale.  # Select a UTF-8 locale.
 get_locale() {  get_locale() {
         [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0          [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0
         ismanual UTF8_LOCALE "$UTF8_LOCALE" && return 0          ismanual UTF8_LOCALE UTF8_LOCALE "$UTF8_LOCALE" && return 0
         echo "UTF8_LOCALE: testing..." 1>&3          echo "UTF8_LOCALE: testing..." 1>&3
         UTF8_LOCALE=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`          UTF8_LOCALE=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`
         if [ -z "${UTF8_LOCALE}" ]; then          if [ -z "${UTF8_LOCALE}" ]; then
Line 196  get_locale() {
Line 201  get_locale() {
   
 # --- library functions ---  # --- library functions ---
 runtest dirent-namlen   DIRENT_NAMLEN   || true  runtest dirent-namlen   DIRENT_NAMLEN   || true
   runtest be32toh         ENDIAN          || true
   runtest be32toh         SYS_ENDIAN      -DSYS_ENDIAN || true
 runtest EFTYPE          EFTYPE          || true  runtest EFTYPE          EFTYPE          || true
 runtest err             ERR             || true  runtest err             ERR             || true
 runtest fts             FTS             || true  
 runtest getline         GETLINE         || true  runtest getline         GETLINE         || true
 runtest getsubopt       GETSUBOPT       || true  runtest getsubopt       GETSUBOPT       || true
 runtest isblank         ISBLANK         || true  runtest isblank         ISBLANK         || true
 runtest mkdtemp         MKDTEMP         || true  runtest mkdtemp         MKDTEMP         || true
   runtest ntohl           NTOHL           || true
   runtest PATH_MAX        PATH_MAX        || true
 runtest pledge          PLEDGE          || true  runtest pledge          PLEDGE          || true
 runtest sandbox_init    SANDBOX_INIT    || true  runtest sandbox_init    SANDBOX_INIT    || true
 runtest progname        PROGNAME        || true  runtest progname        PROGNAME        || true
Line 218  runtest strsep  STRSEP  || true
Line 226  runtest strsep  STRSEP  || true
 runtest strtonum        STRTONUM        || true  runtest strtonum        STRTONUM        || true
 runtest vasprintf       VASPRINTF       || true  runtest vasprintf       VASPRINTF       || true
   
   if [ ${HAVE_ENDIAN} -eq 0 -a \
        ${HAVE_SYS_ENDIAN} -eq 0 -a \
        ${HAVE_NTOHL} -eq 0 ]; then
           echo "FATAL: no endian conversion functions found" 1>&2
           echo "FATAL: no endian conversion functions found" 1>&3
           exit 1
   fi
   
   if ismanual fts FTS ${HAVE_FTS}; then
           HAVE_FTS_COMPARE_CONST=0
   elif runtest fts FTS_COMPARE_CONST -DFTS_COMPARE_CONST; then
           HAVE_FTS=1
   else
           runtest fts FTS || true
   fi
   
 # --- wide character and locale support ---  # --- wide character and locale support ---
 if get_locale; then  if get_locale; then
         runtest wchar WCHAR -DUTF8_LOCALE=\"${UTF8_LOCALE}\" || true          runtest wchar WCHAR -DUTF8_LOCALE=\"${UTF8_LOCALE}\" || true
Line 242  if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
Line 266  if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
 fi  fi
   
 # --- ohash ---  # --- ohash ---
 if ismanual ohash "${HAVE_OHASH}"; then  if ismanual ohash OHASH "${HAVE_OHASH}"; then
         :          :
 elif [ -n "${LD_OHASH}" ]; then  elif [ -n "${LD_OHASH}" ]; then
         runtest ohash OHASH "${LD_OHASH}" || true          runtest ohash OHASH "${LD_OHASH}" || true
Line 293  echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
Line 317  echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
 [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""  [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
 [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""  [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
 [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"  [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
   [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096"
   if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then
           echo "#define be32toh ntohl"
           echo "#define htobe32 htonl"
   fi
   
 cat << __HEREDOC__  cat << __HEREDOC__
 #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}  #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
   #define HAVE_ENDIAN ${HAVE_ENDIAN}
 #define HAVE_ERR ${HAVE_ERR}  #define HAVE_ERR ${HAVE_ERR}
 #define HAVE_FTS ${HAVE_FTS}  #define HAVE_FTS ${HAVE_FTS}
   #define HAVE_FTS_COMPARE_CONST ${HAVE_FTS_COMPARE_CONST}
 #define HAVE_GETLINE ${HAVE_GETLINE}  #define HAVE_GETLINE ${HAVE_GETLINE}
 #define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}  #define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
 #define HAVE_ISBLANK ${HAVE_ISBLANK}  #define HAVE_ISBLANK ${HAVE_ISBLANK}
 #define HAVE_MKDTEMP ${HAVE_MKDTEMP}  #define HAVE_MKDTEMP ${HAVE_MKDTEMP}
   #define HAVE_NTOHL ${HAVE_NTOHL}
 #define HAVE_PLEDGE ${HAVE_PLEDGE}  #define HAVE_PLEDGE ${HAVE_PLEDGE}
 #define HAVE_PROGNAME ${HAVE_PROGNAME}  #define HAVE_PROGNAME ${HAVE_PROGNAME}
 #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}  #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
Line 315  cat << __HEREDOC__
Line 347  cat << __HEREDOC__
 #define HAVE_STRPTIME ${HAVE_STRPTIME}  #define HAVE_STRPTIME ${HAVE_STRPTIME}
 #define HAVE_STRSEP ${HAVE_STRSEP}  #define HAVE_STRSEP ${HAVE_STRSEP}
 #define HAVE_STRTONUM ${HAVE_STRTONUM}  #define HAVE_STRTONUM ${HAVE_STRTONUM}
   #define HAVE_SYS_ENDIAN ${HAVE_SYS_ENDIAN}
 #define HAVE_VASPRINTF ${HAVE_VASPRINTF}  #define HAVE_VASPRINTF ${HAVE_VASPRINTF}
 #define HAVE_WCHAR ${HAVE_WCHAR}  #define HAVE_WCHAR ${HAVE_WCHAR}
 #define HAVE_OHASH ${HAVE_OHASH}  #define HAVE_OHASH ${HAVE_OHASH}

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.53

CVSweb