dear sirs, i've managed to get make 3.79 compiled under qnx (`uname -a` gives "QNX 1 I 425 PCI 32", which means it's qnx 4.25 rev. I; i saw with pleasure my "patches" to config.[sub|guess] have been included :); the compiler is watcom c/c++ 10.6 (wcc386) ), but with a few problems, which i tried to fix (please don't blame me for their rudeness...) first of all, 1) there happens to be a bug somewhere which hangs the compiler when pulling in defs from 'make.h', line 273, as follows #ifdef __GNUC__ # undef alloca # define alloca(n) __builtin_alloca (n) #else /* Not GCC. */ # ifdef HAVE_ALLOCA_H # include <alloca.h> # else /* Not HAVE_ALLOCA_H. */ # ifndef _AIX line 273>>>>> /*extern char *alloca ();*/ <<<<<<<<<<<<<<<<<<<<<<<<<<< #include <malloc.h> /* bfi fix */ # endif /* Not AIX. */ # endif /* HAVE_ALLOCA_H. */ #endif /* GCC. */ the '#include <malloc.h>' line is my BFI fix to get it parsed and compiled (fact is qnx has a 'void *alloca(size_t size)'). dunno if it's ok to do this, but it works... you folks should know better about this; 2) didn't find any 'ar.h' (but the 'ar' program has been found by configure), as you can see: cc -DALIASPATH=\"/usr/local/share/locale:.\" -DLOCALEDIR=\"/usr/local/share/ loca le\" -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/local/include\" -DHAVE_ CONF IG_H -I. -I//1/home/cella/make-3.79 -I//1/home/cella/make-3.79/glob -g -c ars can.c /usr/watcom/10.6/bin/wcc386 -zq -d+ -dALIASPATH="/usr/local/share/locale:." -dLO CALEDIR="/usr/local/share/locale" -dLIBDIR="/usr/local/lib" -dINCLUDEDIR="/u sr/l ocal/include" -dHAVE_CONFIG_H -i=. -i=//1/home/cella/make-3.79 -i=//1/home/c ella /make-3.79/glob -d2 -ms -4r -i=/usr/watcom/10.6/usr/include -i=/usr/include arsc an.c arscan.c(235): Error! E1055: Unable to open 'ar.h' fix: got ar.h and cdefs.h from my linux box, commented out '#include <features.h>' from cdefs.h; yes, it's a BFI fix (in case you were wondering). lastly 3) print_usage is already defined (and used) under QNX to print an usage message, whose content is taken from the 'usemsg' program, which extracts from the source file(s) the text surrounded by #ifdef _USAGE zardoz --- makes your head float from vortex to vortex #endif and pulls in into the binary (once it's compiled). > fix is to define a "void my_print_usage(int bad)" (i know, i know, one should eventually test (via 'configure') if print_usage is defined and perhaps re-define it; dunno if it's better to try to go with 'native' qnx print_usage) i include the config.h, for your convenience <<< config.h >>> /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE /* #undef _ALL_SOURCE */ #endif /* Define if using alloca.c. */ #define C_ALLOCA 1 /* Define if the closedir function returns void instead of int. */ /* #undef CLOSEDIR_VOID */ /* Define to empty if the keyword does not work. */ /* #undef const */ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define for DGUX with <sys/dg_sys_info.h>. */ /* #undef DGUX */ /* Define if the `getloadavg' function needs to be run setuid or setgid. */ /* #undef GETLOADAVG_PRIVILEGED */ /* Define to `int' if <sys/types.h> doesn't define. */ /* #undef gid_t */ /* Define if you have alloca, as a function or macro. */ /* #undef HAVE_ALLOCA */ /* Define if you have <alloca.h> and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ /* Define if you don't have vprintf but do have _doprnt. */ /* #undef HAVE_DOPRNT */ /* Define if your system has a working fnmatch function. */ /* #undef HAVE_FNMATCH */ /* Define if your system has its own `getloadavg' function. */ /* #undef HAVE_GETLOADAVG */ /* Define if you have the getmntent function. */ /* #undef HAVE_GETMNTENT */ /* Define if the `long double' type works. */ /* #undef HAVE_LONG_DOUBLE */ /* Define if you support file names longer than 14 characters. */ /* #undef HAVE_LONG_FILE_NAMES */ /* Define if you have a working `mmap' system call. */ /* #undef HAVE_MMAP */ /* Define if system calls automatically restart after interruption by a signal. */ /* #undef HAVE_RESTARTABLE_SYSCALLS */ /* Define if your struct stat has st_blksize. */ /* #undef HAVE_ST_BLKSIZE */ /* Define if your struct stat has st_blocks. */ /* #undef HAVE_ST_BLOCKS */ /* Define if you have the strcoll function and it is properly defined. */ #define HAVE_STRCOLL 1 /* Define if your struct stat has st_rdev. */ /* #undef HAVE_ST_RDEV */ /* Define if you have the strftime function. */ /* #undef HAVE_STRFTIME */ /* Define if you have the ANSI # stringizing operator in cpp. */ /* #undef HAVE_STRINGIZE */ /* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 /* Define if your struct tm has tm_zone. */ /* #undef HAVE_TM_ZONE */ /* Define if you don't have tm_zone but do have the external array tzname. */ /* #undef HAVE_TZNAME */ /* Define if you have <unistd.h>. */ #define HAVE_UNISTD_H 1 /* Define if utime(file, NULL) sets file's timestamp to the present. */ /* #undef HAVE_UTIME_NULL */ /* Define if you have <vfork.h>. */ /* #undef HAVE_VFORK_H */ /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define if you have the wait3 system call. */ /* #undef HAVE_WAIT3 */ /* Define as __inline if that's what the C compiler calls it. */ #define inline /* Define if on MINIX. */ /* #undef _MINIX */ /* Define if your struct nlist has an n_un member. */ /* #undef NLIST_NAME_UNION */ /* Define if you have <nlist.h>. */ #define NLIST_STRUCT 1 /* Define if your C compiler doesn't accept -c and -o together. */ /* #undef NO_MINUS_C_MINUS_O */ /* Define to `int' if <sys/types.h> doesn't define. */ /* #undef pid_t */ /* Define if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define if you need to in order for stat and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define if the setvbuf function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ /* #undef SETVBUF_REVERSED */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #define STACK_DIRECTION -1 /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define on System V Release 4. */ /* #undef SVR4 */ /* Define if `sys_siglist' is declared by <signal.h>. */ /* #undef SYS_SIGLIST_DECLARED */ /* Define to `int' if <sys/types.h> doesn't define. */ /* #undef uid_t */ /* Define for Encore UMAX. */ /* #undef UMAX */ /* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of <sys/cpustats.h>. */ /* #undef UMAX4_3 */ /* Define vfork as fork if vfork does not work. */ #define vfork fork /* Define to 1 if NLS is requested. */ #define ENABLE_NLS 1 /* Define as 1 if you have dcgettext. */ #define HAVE_DCGETTEXT 1 /* Define as 1 if you have gettext and don't want to use GNU gettext. */ #define HAVE_GETTEXT 1 /* Define if your locale.h file contains LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 /* Define to the installation directory for locales. */ #define LOCALEDIR "/usr/local/share/locale" /* Define as 1 if you have the stpcpy function. */ /* #undef HAVE_STPCPY */ /* Define to the name of the SCCS `get' command. */ #define SCCS_GET "get" /* Define this if the SCCS `get' command understands the `-G<file>' option. */ /* #undef SCCS_GET_MINUS_G */ /* Define this to enable job server support in GNU make. */ #define MAKE_JOBSERVER 1 /* Define to be the nanoseconds member of struct stat's st_mtim, if it exists. */ /* #undef ST_MTIM_NSEC */ /* Define this if the C library defines the variable `sys_siglist'. */ /* #undef HAVE_SYS_SIGLIST */ /* Define this if the C library defines the variable `_sys_siglist'. */ /* #undef HAVE__SYS_SIGLIST */ /* Define this if you have the `union wait' type in <sys/wait.h>. */ /* #undef HAVE_UNION_WAIT */ /* Define to `unsigned long' or `unsigned long long' if <inttypes.h> doesn't define. */ #define uintmax_t unsigned long /* Define if the system doesn't provide fd_set. */ /* #undef fd_set */ /* Define the type of the first arg to select(). */ #define fd_set_size_t int /* Define this if select() args need to be cast away from fd_set (HP-UX). */ #define SELECT_FD_SET_CAST /* Define if you have the INTTYPES_H function. */ /* #undef HAVE_INTTYPES_H */ /* Define if you have the clock_gettime function. */ #define HAVE_CLOCK_GETTIME 1 /* Define if you have the dcgettext function. */ #define HAVE_DCGETTEXT 1 /* Define if you have the dup2 function. */ #define HAVE_DUP2 1 /* Define if you have the fdopen function. */ #define HAVE_FDOPEN 1 /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 /* Define if you have the getgroups function. */ #define HAVE_GETGROUPS 1 /* Define if you have the gethostbyname function. */ /* #undef HAVE_GETHOSTBYNAME */ /* Define if you have the gethostname function. */ /* #undef HAVE_GETHOSTNAME */ /* Define if you have the getloadavg function. */ /* #undef HAVE_GETLOADAVG */ /* Define if you have the gettext function. */ #define HAVE_GETTEXT 1 /* Define if you have the memcpy function. */ #define HAVE_MEMCPY 1 /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 /* Define if you have the mkstemp function. */ /* #undef HAVE_MKSTEMP */ /* Define if you have the mktemp function. */ /* #undef HAVE_MKTEMP */ /* Define if you have the pipe function. */ #define HAVE_PIPE 1 /* Define if you have the psignal function. */ /* #undef HAVE_PSIGNAL */ /* Define if you have the pstat_getdynamic function. */ /* #undef HAVE_PSTAT_GETDYNAMIC */ /* Define if you have the select function. */ #define HAVE_SELECT 1 /* Define if you have the setegid function. */ #define HAVE_SETEGID 1 /* Define if you have the seteuid function. */ #define HAVE_SETEUID 1 /* Define if you have the setlinebuf function. */ /* #undef HAVE_SETLINEBUF */ /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 /* Define if you have the setregid function. */ #define HAVE_SETREGID 1 /* Define if you have the setreuid function. */ #define HAVE_SETREUID 1 /* Define if you have the sigaction function. */ #define HAVE_SIGACTION 1 /* Define if you have the sigsetmask function. */ /* #undef HAVE_SIGSETMASK */ /* Define if you have the socket function. */ /* #undef HAVE_SOCKET */ /* Define if you have the stpcpy function. */ /* #undef HAVE_STPCPY */ /* Define if you have the strcasecmp function. */ /* #undef HAVE_STRCASECMP */ /* Define if you have the strchr function. */ #define HAVE_STRCHR 1 /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 /* Define if you have the strerror function. */ #define HAVE_STRERROR 1 /* Define if you have the strsignal function. */ /* #undef HAVE_STRSIGNAL */ /* Define if you have the wait3 function. */ /* #undef HAVE_WAIT3 */ /* Define if you have the waitpid function. */ #define HAVE_WAITPID 1 /* Define if you have the <dirent.h> header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the <dmalloc.h> header file. */ /* #undef HAVE_DMALLOC_H */ /* Define if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the <libintl.h> header file. */ /* #undef HAVE_LIBINTL_H */ /* Define if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define if you have the <mach/mach.h> header file. */ /* #undef HAVE_MACH_MACH_H */ /* Define if you have the <memory.h> header file. */ /* #undef HAVE_MEMORY_H */ /* Define if you have the <ndir.h> header file. */ /* #undef HAVE_NDIR_H */ /* Define if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define if you have the <sys/dir.h> header file. */ /* #undef HAVE_SYS_DIR_H */ /* Define if you have the <sys/ndir.h> header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 /* Define if you have the <sys/select.h> header file. */ #define HAVE_SYS_SELECT_H 1 /* Define if you have the <sys/socket.h> header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define if you have the <sys/time.h> header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the <sys/timeb.h> header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have the <sys/wait.h> header file. */ #define HAVE_SYS_WAIT_H 1 /* Define if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the dgc library (-ldgc). */ /* #undef HAVE_LIBDGC */ /* Define if you have the dmalloc library (-ldmalloc). */ /* #undef HAVE_LIBDMALLOC */ /* Define if you have the kstat library (-lkstat). */ /* #undef HAVE_LIBKSTAT */ /* Define if you have the posix4 library (-lposix4). */ #define HAVE_LIBPOSIX4 1 /* Define if you have the sun library (-lsun). */ #define HAVE_LIBSUN 1 /* Name of package */ #define PACKAGE "make" /* Version number of package */ #define VERSION "3.79" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define to make fseeko etc. visible, on some hosts. */ /* #undef _LARGEFILE_SOURCE */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Build host information. */ #define MAKE_HOST "i386-pc-qnx" <<< end of config.h >>> here is the output of 'make check' (don't have the testsuite, sorry) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< start of 'make check' >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # make check Making check in glob make[1]: Entering directory `/home/cella/make-3.79/glob' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/home/cella/make-3.79/glob' Making check in i18n make[1]: Entering directory `/home/cella/make-3.79/i18n' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/home/cella/make-3.79/i18n' make[1]: Entering directory `/home/cella/make-3.79' make check-local make[2]: Entering directory `/home/cella/make-3.79' Can't find the GNU Make test suite (//1/home/cella/make-3.79/tests). ln file://1/home/cella/make-3.79/getloadavg.c loadavg.c || \ cp file://1/home/cella/make-3.79/getloadavg.c loadavg.c cc -g -o loadavg -DTEST -DALIASPATH=\"/usr/local/share/locale:.\" -DLOCALEDIR= \"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/ loca l/include\" -DHAVE_CONFIG_H -I. -I//1/home/cella/make-3.79 -I//1/home/cella/ make -3.79/glob loadavg.c -lsun -lposix4 -ldir /usr/watcom/10.6/bin/wcc386 -zq -d2 -d+ -dTEST -dALIASPATH="/usr/local/share /loc ale:." -dLOCALEDIR="/usr/local/share/locale" -dLIBDIR="/usr/local/lib" -dINC LUDE DIR="/usr/local/include" -dHAVE_CONFIG_H -i=. -i=//1/home/cella/make-3.79 -i =//1 /home/cella/make-3.79/glob -ms -4r -i=/usr/watcom/10.6/usr/include -i=/usr/i nclu de loadavg.c loadavg.c(1078): Warning! W107: Missing return value for function 'main' cc warning: cc: cannot find library 'sun' cc warning: cc: cannot find library 'posix4' cc warning: cc: cannot find library 'dir' /usr/watcom/10.6/bin/wlink op quiet form qnx flat na loadavg op priv=3 op c libp /usr/watcom/10.6/usr/lib:/usr/lib:. de all f loadavg.o op offset=40k op st=32k The system uptime program believes the load average to be: uptime make[2]: uptime: Command not found make[2]: [check-loadavg] Error 127 (ignored) The GNU load average checking code believes: ./loadavg Error getting load average: No error make[2]: [check-loadavg] Error 1 (ignored) ============================================================== Regression PASSED: GNU Make 3.79 (i386-pc-qnx) built with cc ============================================================== make[2]: Leaving directory `/home/cella/make-3.79' make[1]: Leaving directory `/home/cella/make-3.79' # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of 'make check' >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> finally, # ./make -v GNU Make version 3.79, by Richard Stallman and Roland McGrath. Built for i386-pc-qnx Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to <[EMAIL PROTECTED]>. # (means it works for me, i also tried to compile other packages). if it may help, watcom c compiler under qnx defines __QNX__, which can be used in #ifdef s. moreover, but i don't think who to ask for advice, i have some trouble with cvs - configure (autoconf/automake) - make, that is: 0) cd /sources/package && make distclean && cvs commit 1) cd /tmp && cvs co package 2) cd package && ./configure 3) ./make ==========> calls 'cd . && autoconf' which is not what i expect (maybe it's something with the timestamp(s), cvs-side or make-side???) do you have any clue? greetings --- alce Alessandro Cella Solari di Udine S.p.A. via Gino Pieri, 29 I-33100 Udine (UD) Italy +39 0432 497 365