configure.ac (4567B)
1 dnl w3m autoconf 2 dnl Process this file with autoconf to produce a configure script. 3 AC_INIT(w3m, 0.5.3, satodai@w3m.jp) 4 PACKAGE=w3m 5 VERSION=0.5.3 6 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") 7 AC_DEFINE_UNQUOTED(VERSION, "$VERSION") 8 AC_SUBST(PACKAGE) 9 AC_SUBST(VERSION) 10 11 AC_SUBST(W3M) 12 W3M=w3m 13 AC_DEFINE(W3M, w3m) 14 15 AC_SUBST(W3M_LANG) 16 W3M_LANG=${LC_ALL:-$LANG} 17 dnl AM_INIT_AUTOMAKE(w3m, 0.4) 18 AC_CONFIG_HEADER(config.h) 19 dnl Checks for programs. 20 AC_PROG_CXX 21 AC_PROG_AWK 22 AC_PROG_CC 23 AC_PROG_CPP 24 AC_PROG_INSTALL 25 AC_PROG_LN_S 26 AC_PROG_MAKE_SET 27 AC_PROG_RANLIB 28 AC_PATH_PROGS(PERL, perl, /usr/local/bin/perl) 29 AC_PATH_PROGS(NKF, nkf, /usr/local/bin/nkf) 30 AC_PATH_PROGS(MAN, man, /usr/bin/man) 31 AC_CANONICAL_HOST 32 33 AC_EXEEXT 34 AC_SUBST(EXEEXT) 35 36 AUXBIN_TARGETS= 37 38 AC_SUBST(W3M_TARGET) 39 AC_SUBST(W3M_LIBS) 40 W3M_TARGET=$target 41 AC_DEFINE_UNQUOTED(W3M_TARGET, $W3M_TARGET) 42 43 AC_W3M_M17N 44 if test x$enable_messagel10n = xno; then 45 AM_GNU_GETTEXT([external]) 46 fi 47 48 NLSTARGET="" 49 if test x"$USE_NLS" = xyes; then 50 NLSTARGET="po" 51 fi 52 AC_SUBST(INTLTARGET) 53 AC_SUBST(NLSTARGET) 54 55 AC_W3M_COLOR 56 AC_W3M_ANSI_COLOR 57 AC_W3M_BG_COLOR 58 59 AC_W3M_IMAGE 60 if test x"$enable_image" != xno; then 61 AUXBIN_TARGETS="$AUXBIN_TARGETS w3mimgdisplay\$(EXT)" 62 AC_W3M_XFACE 63 fi 64 65 AC_W3M_KEYMAP 66 AC_W3M_MENU 67 AC_W3M_MOUSE 68 AC_W3M_HISTORY 69 AC_W3M_ALARM 70 71 AC_W3M_COOKIE 72 AC_W3M_NNTP 73 AC_W3M_GOPHER 74 75 AC_W3M_DICT 76 AC_W3M_HELP_CGI 77 AC_W3M_EXTERNAL_URI_LOADER 78 AC_W3M_W3MMAILER 79 AC_W3M_MIGEMO 80 AC_W3M_EDITOR 81 AC_W3M_MAILER 82 AC_W3M_EXT_BROWSER 83 84 dnl Checks for ext libs 85 for lib in bsd BSD 44bsd socket nsl dld dl 86 do 87 AC_W3M_EXTLIBS($lib) 88 done 89 90 AC_W3M_IPv6 91 AC_W3M_SSL_DIGEST_AUTH 92 93 dnl Checks for libraries. 94 AC_CHECK_FUNC(sqrt,,[AC_CHECK_LIB(m, sqrt)]) 95 if test x"$enable_mouse" = xyes; then 96 AC_SUBST(USE_W3M) 97 AC_CHECK_LIB(gpm, Gpm_Open, [AC_DEFINE(USE_GPM) 98 W3M_LIBS="$W3M_LIBS -lgpm"]) 99 AC_SUBST(USE_SYSMOUSE) 100 AC_TRY_CPP([#include <sys/consio.h> 101 MOUSE_GETINFO], [AC_DEFINE(USE_SYSMOUSE)], 102 [AC_TRY_CPP([#include <machine/console.h> 103 MOUSE_GETINFO], [AC_DEFINE(USE_SYSMOUSE)])]) 104 fi 105 AC_SUBST(AUXBIN_TARGETS) 106 AC_W3M_TERMLIB 107 AC_W3M_GC 108 AC_CHECK_LIB(z, zError, [AUXBIN_TARGETS="$AUXBIN_TARGETS inflate\$(EXT)"]) 109 110 AC_CHECK_TYPE([socklen_t], 111 [AC_DEFINE(HAVE_SOCKLEN_T)], , 112 [#include <sys/types.h> 113 #include <sys/socket.h>]) 114 115 AC_DEFINE(AUXBIN_TARGETS, "$AUXBIN_TARGETS") 116 117 AC_SUBST(USE_BINMODE_STREAM) 118 case "$host_os" in 119 *cygwin*|*os2-emx*|*mingw*) 120 AC_DEFINE(USE_BINMODE_STREAM) 121 ;; 122 esac 123 124 AC_HEADER_DIRENT 125 AC_HEADER_STDC 126 AC_HEADER_SYS_WAIT 127 dnl AC_CHECK_HEADERS(fcntl.h malloc.h sgtty.h strings.h sys/ioctl.h sys/time.h termio.h unistd.h setjmp.h) 128 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS_H)], 129 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO_H)], 130 [AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H)])])]) 131 AC_CHECK_HEADER([float.h], [AC_DEFINE(HAVE_FLOAT_H)]) 132 AC_CHECK_HEADER([sys/select.h], [AC_DEFINE(HAVE_SYS_SELECT_H)]) 133 AC_CHECK_HEADER([locale.h], [AC_DEFINE(HAVE_LOCALE_H)]) 134 AC_CHECK_HEADER([stdint.h], [AC_DEFINE(HAVE_STDINT_H)]) 135 AC_CHECK_HEADER([inttypes.h], [AC_DEFINE(HAVE_INTTYPES_H)]) 136 137 dnl Checks for typedefs, structures, and compiler characteristics. 138 dnl AC_C_CONST 139 dnl AC_C_INLINE 140 dnl AC_TYPE_PID_T 141 dnl AC_TYPE_SIZE_T 142 dnl AC_HEADER_TIME 143 dnl AC_STRUCT_TM 144 AC_CHECK_SIZEOF(long long, 0) 145 146 dnl Checks for library functions. 147 dnl AC_FUNC_ALLOCA 148 dnl AC_PROG_GCC_TRADITIONAL 149 dnl AC_FUNC_MEMCMP 150 dnl AC_FUNC_MMAP 151 dnl AC_FUNC_SETVBUF_REVERSED 152 dnl AC_FUNC_VPRINTF 153 AC_CHECK_FUNCS(strcasecmp strcasestr strchr memcpy strerror bcopy setpgrp chdir getcwd getwd readlink setenv putenv strtoll stroq atoll atoq symlink readlink lstat srand48 srandom getpassphrase waitpid setlocale) 154 AC_FUNC_STRFTIME 155 AC_FUNC_WAIT3 156 AC_FUNC_SETPGRP 157 case "$host_os" in 158 *cygwin*) 159 ;; 160 *) 161 AM_LANGINFO_CODESET 162 ;; 163 esac 164 AC_W3M_SYS_ERRLIST 165 AC_W3M_SIGSETJMP 166 AC_W3M_SIGNAL 167 168 AC_SUBST(HELP_DIR) 169 HELP_DIR="$datadir/$PACKAGE" 170 AC_DEFINE(HELP_DIR, "$HELP_DIR") 171 AC_SUBST(RC_DIR) 172 RC_DIR="~/.$PACKAGE" 173 AC_DEFINE(RC_DIR, "$RC_DIR") 174 AC_SUBST(DOCDIRS) 175 DOCDIRS="doc:en_English doc-jp:ja_Japanese" 176 AC_DEFINE_UNQUOTED(DOCDIRS, "$DOCDIRS") 177 178 AC_W3M_VERSION 179 AC_OUTPUT([Makefile posubst po/Makefile.in \ 180 scripts/Makefile scripts/dirlist.cgi \ 181 scripts/w3mhelp.cgi \ 182 scripts/w3mmail.cgi scripts/xface2xpm \ 183 scripts/multipart/Makefile scripts/multipart/multipart.cgi \ 184 scripts/w3mman/Makefile scripts/w3mman/w3mman scripts/w3mman/w3mman.1 \ 185 scripts/w3mman/w3mman2html.cgi \ 186 libwc/Makefile \ 187 w3mimg/Makefile w3mimg/fb/Makefile w3mimg/x11/Makefile w3mimg/win/Makefile \ 188 w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \ 189 w3mhelp-lynx_en.html w3mhelp-lynx_ja.html]) 190 191 chmod +x posubst