@@ -140,26 +140,28 @@ function buildFLTK() {
140140 esac
141141
142142 FLTK_CXXFLAGS="${PACKAGE_CFLAGS} `fltk2-config --cxxflags` -fno-exceptions"
143- PACKAGE_LIBS="${PACKAGE_LIBS} `fltk2-config --ldflags --use-images`"
143+ PACKAGE_LIBS="${PACKAGE_LIBS} `fltk2-config --ldstaticflags --use-images`"
144144
145145 dnl do not depend on cygwin.dll under cygwin build
146146 case "${host_os}" in
147147 *mingw* | cygwin*)
148- FLTK_CXXFLAGS="-I`cygpath -m /usr/local/include` ${FLTK_CXXFLAGS} -mms-bitfields"
149- PACKAGE_LIBS="-L`cygpath -m /usr/local/lib` ${PACKAGE_LIBS} -lwsock32 -static-libgcc"
148+ FLTK_CXXFLAGS="${FLTK_CXXFLAGS} -mms-bitfields"
149+ PACKAGE_LIBS="-Wl,-Bstatic ${PACKAGE_LIBS} -lwsock32 -lws2_32 - static-libgcc -static-libstdc++ "
150150 AC_DEFINE ( _Win32 , 1 , [ Windows build] )
151+ ;;
152+
153+ *)
154+ dnl check for sdl2-config for sound output
155+ AC_CHECK_PROG ( have_sdl , sdl2-config , [ yes] , [ no] )
156+ if test "${have_sdl}" = "yes" ; then
157+ FLTK_CXXFLAGS="${FLTK_CXXFLAGS} `sdl2-config --cflags`"
158+ PACKAGE_LIBS="${PACKAGE_LIBS} `sdl2-config --libs`"
159+ AC_DEFINE ( HAVE_SDL , 1 , [ Windows build] )
160+ fi
151161 esac
152162
153163 defaultConditionals
154164
155- dnl check for sdl-config for sound output
156- AC_CHECK_PROG ( have_sdl , sdl-config , [ yes] , [ no] )
157- if test "${have_sdl}" = "yes" ; then
158- FLTK_CXXFLAGS="${FLTK_CXXFLAGS} `sdl-config --cflags`"
159- PACKAGE_LIBS="${PACKAGE_LIBS} `sdl-config --libs`"
160- AC_DEFINE ( HAVE_SDL , 1 , [ Windows build] )
161- fi
162-
163165 dnl preconfigured values for FLTK build
164166 AC_DEFINE ( _UnixOS , 1 , [ Building under Unix like systems.] )
165167 AC_DEFINE ( _FLTK , 1 , [ Defined for FLTK build.] )
@@ -200,8 +202,8 @@ function buildSDL() {
200202 PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
201203
202204 dnl do not depend on cygwin.dll under cygwin build
203- PACKAGE_CFLAGS="-I`cygpath -m /usr/local/include` ${PACKAGE_CFLAGS} -mms-bitfields"
204- PACKAGE_LIBS="-L`cygpath -m /usr/local/lib` ${PACKAGE_LIBS} -lwsock32 -lws2_32 -static-libgcc -static-libstdc++"
205+ PACKAGE_CFLAGS="${PACKAGE_CFLAGS} -mms-bitfields"
206+ PACKAGE_LIBS="${PACKAGE_LIBS} -lwsock32 -lws2_32 -static-libgcc -static-libstdc++"
205207 AC_DEFINE ( _Win32 , 1 , [ Windows build] )
206208 ;;
207209
0 commit comments