Index: configure =================================================================== --- configure (revision 24089) +++ configure (working copy) @@ -116,6 +116,7 @@ amigaos() { issystem "AmigaOS" ; return "$?" ; } win32() { cygwin || mingw32 ; return "$?" ; } beos() { issystem "BEOS" ; return "$?" ; } +os2() { issystem "OS/2" ; return "$?" ; } # arch test boolean functions # x86/x86pc is used by QNX @@ -482,6 +485,7 @@ _iwmmxt=auto _mtrr=auto _install=install +_ar=ar _ranlib=ranlib _ldconfig=ldconfig _cc=cc @@ -1215,6 +1225,9 @@ MINGW32*) system_name=MINGW32 ;; + OS/2*) + system_name=OS/2 + ;; *) system_name="$system_name-UNKNOWN" ;; @@ -1365,6 +1378,14 @@ _ld_extra="$_ld_extra -lph" fi +if os2 ; then + _exesuf=".exe" + _need_shmem=no + _ar="emxomfar -p256" + _ranlib="echo ignoring ranlib" + _ld_extra="$_ld_extra -Zomf -Zstack 16384 -lmmpm2" +fi + # Check how to call 'head' and 'tail'. Newer versions spit out warnings # if used as 'head -1' instead of 'head -n 1', but older versions don't # know about '-n'. @@ -3402,7 +3440,8 @@ EOF _posix_select=no _def_posix_select='#undef HAVE_POSIX_SELECT' -cc_check && _posix_select=yes \ +#select() of kLIBC supports socket only +not os2 && cc_check && _posix_select=yes \ && _def_posix_select='#define HAVE_POSIX_SELECT 1' echores "$_posix_select" @@ -5338,10 +5420,10 @@ echocheck "dvdread" if test "$_dvdread_internal" = auto ; then _dvdread_internal=no - if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux && \ + if linux || freebsd || netbsd || darwin || openbsd || win32 || os2 || sunos || hpux && \ test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \ test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || \ - test "$_hpux_scsi_h" = yes || darwin || win32 ; then + test "$_hpux_scsi_h" = yes || darwin || win32 || os2 ; then _dvdread_internal=yes _dvdread=yes fi @@ -6129,6 +6211,7 @@ if test -z "$_codecsdir" ; then _codecsdir="$_libdir/codecs" mingw32 && _codecsdir="codecs" + os2 && _codecsdir="codecs" fi @@ -7284,7 +7367,7 @@ # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly) _ld_dl_dynamic='' bsd && _ld_dl_dynamic='-rdynamic' -if test "$_real" = yes || test "$_xanim" = yes && not win32 && not qnx && not darwin ; then +if test "$_real" = yes || test "$_xanim" = yes && not win32 && not qnx && not darwin && not os2 ; then _ld_dl_dynamic='-rdynamic' fi @@ -7413,6 +7496,9 @@ if cygwin ; then CFLAGS="$CFLAGS -D__CYGWIN__ -DSYS_CYGWIN" fi +if os2 ; then + CFLAGS="$CFLAGS -Zomf -DSYS_OS2" +fi # 64 bit file offsets? if test "$_largefiles" = yes || freebsd ; then CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" @@ -8184,7 +8270,7 @@ #elif defined(HPUX) #define DEFAULT_CDROM_DEVICE "/dev/cdrom" #define DEFAULT_DVD_DEVICE "/dev/dvd" -#elif defined(WIN32) +#elif defined(WIN32) || defined(__OS2__) #define DEFAULT_CDROM_DEVICE "D:" #define DEFAULT_DVD_DEVICE "D:" #elif defined(SYS_DARWIN)