configure.awk revision 1.1.1.1
1#!/usr/bin/gawk -f 2# A script for emulating configure on OS/2 without having even a Unix-like 3# shell. Designed specifically for compiling gettext with gcc+emx. 4 5BEGIN{ 6 print "/* config.h. Generated automatically by configure.awk. */" 7 8 cfg["HAVE_ALLOCA"] = 1; 9 cfg["HAVE_ALLOCA_H"] = 1; 10 cfg["HAVE_LONG_FILE_NAMES"] = 1; 11 cfg["STDC_HEADERS"] = 1; 12 cfg["HAVE_GETCWD"] = 1; 13 cfg["HAVE_GETEGID"] = 1; 14 cfg["HAVE_GETEUID"] = 1; 15 cfg["HAVE_GETGID"] = 1; 16 cfg["HAVE_GETPAGESIZE"] = 1; 17 cfg["HAVE_GETUID"] = 1; 18 cfg["HAVE_ISASCII"] = 1; 19 cfg["HAVE_MBLEN"] = 1; 20 cfg["HAVE_MEMCPY"] = 1; 21 cfg["HAVE_MEMMOVE"] = 1; 22 cfg["HAVE_MEMSET"] = 1; 23 cfg["HAVE_PUTENV"] = 1; 24 cfg["HAVE_SETLOCALE"] = 1; 25 cfg["HAVE_STRCHR"] = 1; 26 cfg["HAVE_STRCSPN"] = 1; 27 cfg["HAVE_STRDUP"] = 1; 28 cfg["HAVE_STRERROR"] = 1; 29 cfg["HAVE_STRSTR"] = 1; 30 cfg["HAVE_STRTOUL"] = 1; 31 cfg["HAVE_UNAME"] = 1; 32 cfg["HAVE_LIMITS_H"] = 1; 33 cfg["HAVE_LOCALE_H"] = 1; 34 cfg["HAVE_MALLOC_H"] = 1; 35 cfg["HAVE_STDDEF_H"] = 1; 36 cfg["HAVE_STDLIB_H"] = 1; 37 cfg["HAVE_STRING_H"] = 1; 38 cfg["HAVE_SYS_PARAM_H"] = 1; 39 cfg["HAVE_UNISTD_H"] = 1; 40 cfg["HAVE_GETTIMEOFDAY"] = 1; 41 cfg["HAVE_PATHCONF"] = 1; 42 cfg["HAVE_RAISE"] = 1; 43 cfg["HAVE_SELECT"] = 1; 44 cfg["HAVE_STRPBRK"] = 1; 45 cfg["HAVE_UTIME"] = 1; 46 cfg["HAVE_UTIMES"] = 1; 47 cfg["HAVE_WAITPID"] = 1; 48 cfg["HAVE_ARPA_INET_H"] = 1; 49 cfg["HAVE_DIRENT_H"] = 1; 50 cfg["HAVE_FCNTL_H"] = 1; 51 cfg["HAVE_SYS_TIME_H"] = 1; 52 cfg["HAVE_TIME_H"] = 1; 53 cfg["HAVE_POSIX_SIGNALBLOCKING"] = 1; 54 cfg["HAVE_ERRNO_DECL"] = 1; 55 cfg["HAVE_ICONV"] = 1; 56 cfg["ICONV_CONST"] = "const"; 57 cfg["_GNU_SOURCE"] = 1; 58 cfg["HAVE_UNSIGNED_LONG_LONG"] = 1; 59 cfg["HAVE_PTRDIFF_T"] = 1; 60 cfg["vfork"] = "fork"; 61 cfg["uintmax_t"] = "unsigned long long"; 62 cfg["HAVE_DECL_WCWIDTH"] = 0; 63 cfg["mbstate_t"] = "int"; 64 cfg["SETLOCALE_CONST"] = "const"; 65 cfg["ENABLE_NLS"] = 1; 66 67 cfg["PACKAGE"] = "\""PACKAGE"\""; 68 cfg["VERSION"] = "\""VERSION"\""; 69} 70 71/^#undef/ { 72 if (cfg[$2] != "") 73 print "#define "$2" "cfg[$2]; 74 else 75 print "/* #undef "$2" */"; 76 next 77} 78 79{ 80 print $0 81} 82