configure.in
changeset 1389 ce65f014190a
parent 1384 6fd39b50dd91
child 1393 cd3362657144
equal deleted inserted replaced
1388:9a9b87172b4b 1389:ce65f014190a
    47     AC_DEFINE(SDL_BYTEORDER, 4321)
    47     AC_DEFINE(SDL_BYTEORDER, 4321)
    48 else
    48 else
    49     AC_DEFINE(SDL_BYTEORDER, 1234)
    49     AC_DEFINE(SDL_BYTEORDER, 1234)
    50 fi
    50 fi
    51 
    51 
    52 dnl Set up the base CFLAGS and LIBS
    52 dnl Set up the compiler and linker flags
    53 case "$target" in
       
    54     *-*-cygwin*)
       
    55         # We build SDL on cygwin without the UNIX emulation layer
       
    56         BASE_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
       
    57         BASE_LIBS="-mno-cygwin"
       
    58         ;;
       
    59     *)
       
    60         BASE_CFLAGS="-D_GNU_SOURCE=1"
       
    61         BASE_LIBS=""
       
    62         ;;
       
    63 esac
       
    64 CFLAGS="$CFLAGS $BASE_CFLAGS"
       
    65 
       
    66 dnl Set up the compiler and linker flags for building SDL
       
    67 INCLUDE="-I$srcdir/include"
    53 INCLUDE="-I$srcdir/include"
    68 if test x$srcdir != x.; then
    54 if test x$srcdir != x.; then
    69     INCLUDE="-Iinclude $INCLUDE"
    55     INCLUDE="-Iinclude $INCLUDE"
    70 fi
    56 fi
    71 BUILD_CFLAGS="$BASE_CFLAGS \$(INCLUDE)"
    57 case "$target" in
    72 BUILD_LIBS="$BASE_LIBS"
    58     *-*-cygwin*)
    73 
    59         # We build SDL on cygwin without the UNIX emulation layer
    74 dnl Set up the compiler and linker flags for SDL applications
    60         CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
    75 SDL_CFLAGS="$BASE_CFLAGS"
    61         BUILD_CFLAGS="$CFLAGS \$(INCLUDE)"
    76 SDL_LIBS="$BASE_LIBS -lSDL"
    62         BUILD_LIBS="-mno-cygwin"
       
    63         SDL_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
       
    64         SDL_LIBS="-lSDL -mno-cygwin"
       
    65         ;;
       
    66     *)
       
    67         CFLAGS="$CFLAGS -D_GNU_SOURCE=1"
       
    68         BUILD_CFLAGS="$CFLAGS \$(INCLUDE)"
       
    69         BUILD_LIBS=""
       
    70         SDL_CFLAGS=""
       
    71         SDL_LIBS="-lSDL"
       
    72         ;;
       
    73 esac
    77 
    74 
    78 dnl Check for tools
    75 dnl Check for tools
    79 #AC_LIBTOOL_DLOPEN
       
    80 AC_LIBTOOL_WIN32_DLL
    76 AC_LIBTOOL_WIN32_DLL
    81 AC_PROG_LIBTOOL
    77 AC_PROG_LIBTOOL
    82 AC_PROG_CC
    78 AC_PROG_CC
    83 AC_PROG_CXX
    79 AC_PROG_CXX
    84 AC_PROG_INSTALL
    80 AC_PROG_INSTALL
   749                     x11_lib='libX11.so'
   745                     x11_lib='libX11.so'
   750                     x11ext_lib='libXext.so'
   746                     x11ext_lib='libXext.so'
   751                     ;;
   747                     ;;
   752                 *)
   748                 *)
   753                     if test x$X_LIBS = x; then X_LIBS="-L/usr/lib"; fi
   749                     if test x$X_LIBS = x; then X_LIBS="-L/usr/lib"; fi
   754                     x11_lib_spec=`echo $X_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libX11.so*/'`
   750                     x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libX11.so.[0-9]/'`]
   755                     x11_lib=`ls $x11_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
   751                     x11_lib=`ls $x11_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
   756                     x11ext_lib_spec=`echo $X_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libXext.so*/'`
   752                     x11ext_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libXext.so.[0-9]/'`]
   757                     x11ext_lib=`ls $x11ext_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
   753                     x11ext_lib=`ls $x11ext_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
   758                     ;;
   754                     ;;
   759             esac
   755             esac
   760 
   756 
   761             X_CFLAGS="$X_CFLAGS -DXTHREADS"
   757             X_CFLAGS="$X_CFLAGS -DXTHREADS"