Ticket #64: libdaemon-autodetect-lynx.patch

File libdaemon-autodetect-lynx.patch, 1.2 kB (added by lool, 2 years ago)

Auto disable lynx

  • configure.ac

    old new  
    9191 
    9292# LYNX documentation generation 
    9393AC_ARG_ENABLE(lynx, 
    94         AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation), 
     94        AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation (default: autodetect)), 
    9595[case "${enableval}" in 
    9696  yes) lynx=yes ;; 
    9797  no)  lynx=no ;; 
    9898  *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;; 
    99 esac],[lynx=yes]) 
     99esac],[lynx=auto]) 
    100100 
    101 if test x$lynx = xyes ; then 
     101if test x$lynx != xno ; then 
    102102   AC_CHECK_PROG(have_lynx, lynx, yes, no) 
    103103 
    104    if test x$have_lynx = xno ; then 
    105      AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***]) 
     104   if test x$lynx = xyes && test x$have_lynx = xno ; then 
     105     AC_MSG_ERROR([*** Lynx enabled but couldn't find lynx ***]) 
    106106   fi 
    107107fi 
    108108 
    109 AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) 
     109AM_CONDITIONAL([USE_LYNX], [test "x$lynx" != xno]) 
    110110 
    111111AC_CONFIG_FILES([libdaemon/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile libdaemon.spec libdaemon.pc]) 
    112112AC_OUTPUT