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

Diff for /mandoc/configure between version 1.41 and 1.43.2.2

version 1.41, 2016/07/15 15:08:37 version 1.43.2.2, 2016/07/31 09:47:01
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 #  #
   # $Id$
   #
 # Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>  # Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
 #  #
 # Permission to use, copy, modify, and distribute this software for any  # Permission to use, copy, modify, and distribute this software for any
Line 33  echo "config.log: writing..."
Line 35  echo "config.log: writing..."
   
 MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"  MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
 OSNAME=  OSNAME=
   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 -f -`
 CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"  CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
   CFLAGS="${CFLAGS} -Wno-unused-parameter"
 LDADD=  LDADD=
 LDFLAGS=  LDFLAGS=
   LD_NANOSLEEP=
 LD_OHASH=  LD_OHASH=
 LD_SQLITE3=  LD_SQLITE3=
 STATIC="-static"  STATIC="-static"
Line 53  HAVE_GETSUBOPT=
Line 58  HAVE_GETSUBOPT=
 HAVE_ISBLANK=  HAVE_ISBLANK=
 HAVE_MKDTEMP=  HAVE_MKDTEMP=
 HAVE_MMAP=  HAVE_MMAP=
   HAVE_NANOSLEEP=
 HAVE_PLEDGE=  HAVE_PLEDGE=
 HAVE_PROGNAME=  HAVE_PROGNAME=
 HAVE_REALLOCARRAY=  HAVE_REALLOCARRAY=
Line 177  runtest() {
Line 183  runtest() {
         return 1          return 1
 }  }
   
   # Select a UTF-8 locale.
   get_locale() {
           [ -n "${HAVE_WCHAR}" ] && [ "${HAVE_WCHAR}" -eq 0 ] && return 0
           ismanual UTF8_LOCALE "$UTF8_LOCALE" && return 0
           echo "UTF8_LOCALE: testing..." 1>&3
           UTF8_LOCALE=`locale -a | grep -i '^en_US\.UTF-*8$' | head -n 1`
           if [ -z "${UTF8_LOCALE}" ]; then
                   UTF8_LOCALE=`locale -a | grep -i '\.UTF-*8' | head -n 1`
                   [ -n "${UTF8_LOCALE}" ] || return 1
           fi
           echo "UTF8_LOCALE=${UTF8_LOCALE}" 1>&2
           echo "UTF8_LOCALE=${UTF8_LOCALE}" 1>&3
           echo 1>&3
           return 0;
   }
   
   
 # --- library functions ---  # --- library functions ---
 runtest dirent-namlen   DIRENT_NAMLEN   || true  runtest dirent-namlen   DIRENT_NAMLEN   || true
 runtest err             ERR             || true  runtest err             ERR             || true
Line 200  runtest strptime STRPTIME || true
Line 223  runtest strptime STRPTIME || true
 runtest strsep          STRSEP          || true  runtest strsep          STRSEP          || true
 runtest strtonum        STRTONUM        || true  runtest strtonum        STRTONUM        || true
 runtest vasprintf       VASPRINTF       || true  runtest vasprintf       VASPRINTF       || true
 runtest wchar           WCHAR           || true  
   
   # --- wide character and locale support ---
   if get_locale; then
           runtest wchar WCHAR -DUTF8_LOCALE=\"${UTF8_LOCALE}\" || true
   else
           HAVE_WCHAR=0
           echo "wchar: no (no UTF8_LOCALE)" 1>&2
           echo "wchar: no (no UTF8_LOCALE)" 1>&3
   fi
   
 # --- sqlite3 ---  # --- sqlite3 ---
 if [ ${BUILD_DB} -eq 0 ]; then  if [ ${BUILD_DB} -eq 0 ]; then
         echo "BUILD_DB=0 (manual)" 1>&2          echo "BUILD_DB=0 (manual)" 1>&2
Line 240  else
Line 271  else
         runtest sqlite3_errstr SQLITE3_ERRSTR "${LD_SQLITE3}" || true          runtest sqlite3_errstr SQLITE3_ERRSTR "${LD_SQLITE3}" || true
 fi  fi
   
   # --- nanosleep ---
   if [ -n "${LD_NANOSLEEP}" ]; then
           runtest nanosleep NANOSLEEP "${LD_NANOSLEEP}" || true
   elif singletest nanosleep NANOSLEEP; then
           :
   elif runtest nanosleep NANOSLEEP "-lrt"; then
           LD_NANOSLEEP="-lrt"
   fi
   if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
           echo "FATAL: nanosleep: no" 1>&2
           echo "FATAL: nanosleep: no" 1>&3
           exit 1
   fi
   
 # --- ohash ---  # --- ohash ---
 if ismanual ohash "${HAVE_OHASH}"; then  if ismanual ohash "${HAVE_OHASH}"; then
         :          :
Line 255  if [ "${HAVE_OHASH}" -eq 0 ]; then
Line 300  if [ "${HAVE_OHASH}" -eq 0 ]; then
 fi  fi
   
 # --- LDADD ---  # --- LDADD ---
 LDADD="${LDADD} ${LD_SQLITE3} ${LD_OHASH} -lz"  LDADD="${LDADD} ${LD_SQLITE3} ${LD_NANOSLEEP} ${LD_OHASH} -lz"
 echo "LDADD=\"${LDADD}\"" 1>&2  echo "LDADD=\"${LDADD}\"" 1>&2
 echo "LDADD=\"${LDADD}\"" 1>&3  echo "LDADD=\"${LDADD}\"" 1>&3
 echo 1>&3  echo 1>&3
Line 284  cat << __HEREDOC__
Line 329  cat << __HEREDOC__
 #error "Do not use C++.  See the INSTALL file."  #error "Do not use C++.  See the INSTALL file."
 #endif  #endif
   
 #ifndef MANDOC_CONFIG_H  #if !defined(__GNUC__) || (__GNUC__ < 4)
 #define MANDOC_CONFIG_H  #define __attribute__(x)
   #endif
   
 #if defined(__linux__) || defined(__MINT__)  #if defined(__linux__) || defined(__MINT__)
 #define _GNU_SOURCE     /* See test-*.c what needs this. */  #define _GNU_SOURCE     /* See test-*.c what needs this. */
Line 303  echo
Line 349  echo
 echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""  echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
 echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""  echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
 [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""  [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
   [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
 [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""  [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
   
 cat << __HEREDOC__  cat << __HEREDOC__
Line 389  fi
Line 436  fi
   
 [ ${HAVE_VASPRINTF} -eq 0 ] && \  [ ${HAVE_VASPRINTF} -eq 0 ] && \
         echo "extern    int       vasprintf(char **, const char *, va_list);"          echo "extern    int       vasprintf(char **, const char *, va_list);"
   
 echo  
 echo "#endif /* MANDOC_CONFIG_H */"  
   
 echo "config.h: written" 1>&2  echo "config.h: written" 1>&2
 echo "config.h: written" 1>&3  echo "config.h: written" 1>&3

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.43.2.2

CVSweb