diff --git a/configure b/configure index e932dce76..d8fc074b0 100755 --- a/configure +++ b/configure @@ -15752,10 +15752,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS" # fi #done SDL_CFLAGS="$BASE_CFLAGS" -SDL_LIBS="-lSDL2 $BASE_LDFLAGS" -CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" -CFLAGS="$CFLAGS $EXTRA_CFLAGS" -LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" +SDL_LIBS="-lSDL2" +if "$BASE_LDFLAGS" != "" ; then + SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" +fi +if "$EXTRA_CFLAGS" != "" ; then + CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" + CFLAGS="$CFLAGS $EXTRA_CFLAGS" +fi +if "$EXTRA_LDFLAGS" != "" ; then + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" +fi base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` diff --git a/configure.in b/configure.in index 9d815dbc3..1b9935c71 100644 --- a/configure.in +++ b/configure.in @@ -123,10 +123,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS" # fi #done SDL_CFLAGS="$BASE_CFLAGS" -SDL_LIBS="-lSDL2 $BASE_LDFLAGS" -CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" -CFLAGS="$CFLAGS $EXTRA_CFLAGS" -LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" +SDL_LIBS="-lSDL2" +if [ "$BASE_LDFLAGS" != "" ]; then + SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" +fi +if [ "$EXTRA_CFLAGS" != "" ]; then + CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" + CFLAGS="$CFLAGS $EXTRA_CFLAGS" +fi +if [ "$EXTRA_LDFLAGS" != "" ]; then + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" +fi dnl set this to use on systems that use lib64 instead of lib base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`