configure.in
changeset 1363 dc623bb58c9a
parent 1361 19418e4422cb
child 1364 4214be2b8d77
equal deleted inserted replaced
1362:88ddeb76c9c1 1363:dc623bb58c9a
    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
       
    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 
    52 dnl Check for tools
    66 dnl Check for tools
    53 #AC_LIBTOOL_DLOPEN
    67 #AC_LIBTOOL_DLOPEN
    54 AC_LIBTOOL_WIN32_DLL
    68 AC_LIBTOOL_WIN32_DLL
    55 AC_PROG_LIBTOOL
    69 AC_PROG_LIBTOOL
    56 AC_PROG_CC
    70 AC_PROG_CC
   142 # Set up the build preprocessor flags
   156 # Set up the build preprocessor flags
   143 INCLUDE="-I$srcdir/include"
   157 INCLUDE="-I$srcdir/include"
   144 if test x$srcdir != x.; then
   158 if test x$srcdir != x.; then
   145     INCLUDE="-Iinclude $INCLUDE"
   159     INCLUDE="-Iinclude $INCLUDE"
   146 fi
   160 fi
   147 BUILD_CFLAGS='-D_GNU_SOURCE=1 $(INCLUDE)'
   161 BUILD_CFLAGS="$BASE_CFLAGS \$(INCLUDE)"
   148 
   162 
   149 # Standard C sources
   163 # Standard C sources
   150 SOURCES="$SOURCES $srcdir/src/*.c"
   164 SOURCES="$SOURCES $srcdir/src/*.c"
   151 SOURCES="$SOURCES $srcdir/src/audio/*.c"
   165 SOURCES="$SOURCES $srcdir/src/audio/*.c"
   152 SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
   166 SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
   158 SOURCES="$SOURCES $srcdir/src/thread/*.c"
   172 SOURCES="$SOURCES $srcdir/src/thread/*.c"
   159 SOURCES="$SOURCES $srcdir/src/timer/*.c"
   173 SOURCES="$SOURCES $srcdir/src/timer/*.c"
   160 SOURCES="$SOURCES $srcdir/src/video/*.c"
   174 SOURCES="$SOURCES $srcdir/src/video/*.c"
   161 
   175 
   162 # Set up the build libraries needed
   176 # Set up the build libraries needed
   163 BUILD_LIBS=""
   177 BUILD_LIBS="$BASE_LIBS"
   164 
   178 
   165 dnl Initialize the compiler and linker flags for SDL applications
   179 # Set up the compiler and linker flags for SDL applications
   166 
   180 SDL_CFLAGS="$BASE_CFLAGS"
   167 SDL_CFLAGS=""
   181 SDL_LIBS="$BASE_LIBS -lSDL"
   168 SDL_LIBS="-lSDL"
       
   169 
   182 
   170 dnl Add the math library for the new gamma correction support
   183 dnl Add the math library for the new gamma correction support
   171 
       
   172 case "$target" in
   184 case "$target" in
   173     *-*-cygwin* | *-*-mingw32*)
   185     *-*-cygwin* | *-*-mingw32*)
   174         MATHLIB=""
   186         MATHLIB=""
   175         ;;
   187         ;;
   176     *-*-beos*)
   188     *-*-beos*)
  2121         if test x$have_directx = xyes; then
  2133         if test x$have_directx = xyes; then
  2122             BUILD_LIBS="$BUILD_LIBS -ldxguid"
  2134             BUILD_LIBS="$BUILD_LIBS -ldxguid"
  2123         fi
  2135         fi
  2124         # The Win32 platform requires special setup
  2136         # The Win32 platform requires special setup
  2125         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
  2137         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
  2126         case "$target" in
  2138         SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
  2127             *-*-cygwin*)
       
  2128                 BUILD_CFLAGS="$BUILD_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
       
  2129                 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
       
  2130                 BUILD_LIBS="$BUILD_LIBS -mno-cygwin"
       
  2131                 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
       
  2132                 ;;
       
  2133             *-*-mingw32*)
       
  2134                 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
       
  2135                 ;;
       
  2136         esac
       
  2137         ;;
  2139         ;;
  2138     *-*-beos*)
  2140     *-*-beos*)
  2139         ARCH=beos
  2141         ARCH=beos
  2140         ac_default_prefix=/boot/develop/tools/gnupro
  2142         ac_default_prefix=/boot/develop/tools/gnupro
  2141         CheckDummyVideo
  2143         CheckDummyVideo