Skip to contentSkip to conversation

fix the static compilation for sdl

PATCH Applied TeLeMan 4 participants 4 messages Feb 8, 2010

lore
Share & tools
lore

TeLeMan

author
#0 lore raw

PATCH 1/1 fix the static compilation for sdl

The static compilation for sdl is broken after
79427693174a553d62f3da44aacd3f19ba8df3a7.

---
 configure |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
configure +5 -2
index 4c95c27..213dddf 100644
@@ -1063,7 +1063,11 @@ if test "$sdl" != "no" ; then
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
 EOF
   sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
-  sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  if test "$static" = "yes" ; then
+    sdl_libs=`sdl-config --static-libs 2>/dev/null`
+  else
+    sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  fi
   if compile_prog "$sdl_cflags" "$sdl_libs" ; then
     if test "$_sdlversion" -lt 121 ; then
       sdl_too_old=yes
@@ -1075,7 +1079,6 @@ EOF
 
     # static link with sdl ? (note: sdl.pc's --static --libs is broken)
     if test "$sdl" = "yes" -a "$static" = "yes" ; then
-      sdl_libs=`sdl-config --static-libs 2>/dev/null`
       if test $? = 0 && echo $sdl_libs | grep -- -laa > /dev/null; then
          sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`"
          sdl_cflags="$sdl_cflags `aalib-config --cflags >2 /dev/null`"
Signature · 4 lines
1.6.5.1.1367.gcd48

--
SUN OF A BEACH
#1 lore raw
Quoted 2 lines · TeLeMan

The static compilation for sdl is broken after
79427693174a553d62f3da44aacd3f19ba8df3a7.

ACK.

Quoted 30 lines
---
  configure |    7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)
configure +5 -2
index 4c95c27..213dddf 100644
@@ -1063,7 +1063,11 @@ if test "$sdl" != "no" ; then
  int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
  EOF
    sdl_cflags=`$sdlconfig --cflags 2>  /dev/null`
-  sdl_libs=`$sdlconfig --libs 2>  /dev/null`
+  if test "$static" = "yes" ; then
+    sdl_libs=`sdl-config --static-libs 2>/dev/null`
+  else
+    sdl_libs=`$sdlconfig --libs 2>  /dev/null`
+  fi
    if compile_prog "$sdl_cflags" "$sdl_libs" ; then
      if test "$_sdlversion" -lt 121 ; then
        sdl_too_old=yes
@@ -1075,7 +1079,6 @@ EOF
 
      # static link with sdl ? (note: sdl.pc's --static --libs is broken)
      if test "$sdl" = "yes" -a "$static" = "yes" ; then
-      sdl_libs=`sdl-config --static-libs 2>/dev/null`
        if test $? = 0&&  echo $sdl_libs | grep -- -laa>  /dev/null; then
           sdl_libs="$sdl_libs `aalib-config --static-libs>2 /dev/null`"
           sdl_cflags="$sdl_cflags `aalib-config --cflags>2 /dev/null`"
#2 lore raw
In reply to TeLeMan
Quoted 26 lines · TeLeMan

The static compilation for sdl is broken after
79427693174a553d62f3da44aacd3f19ba8df3a7.

---
 configure |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
configure +5 -1
index 4c95c27..213dddf 100644
@@ -1063,7 +1063,11 @@ if test "$sdl" != "no" ; then
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
 EOF
   sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
-  sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  if test "$static" = "yes" ; then
+    sdl_libs=`sdl-config --static-libs 2>/dev/null`
+  else
+    sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  fi
   if compile_prog "$sdl_cflags" "$sdl_libs" ; then
     if test "$_sdlversion" -lt 121 ; then
       sdl_too_old=yes

configure EOF · line 1084

Quoted 7 lines
configure +0 -1
@@ -1075,7 +1079,6 @@ EOF
 
     # static link with sdl ? (note: sdl.pc's --static --libs is broken)
     if test "$sdl" = "yes" -a "$static" = "yes" ; then
-      sdl_libs=`sdl-config --static-libs 2>/dev/null`
       if test $? = 0 && echo $sdl_libs | grep -- -laa > /dev/null; then
          sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`"
          sdl_cflags="$sdl_cflags `aalib-config --cflags >2 /dev/null`"

Ah right, the tests were being run on a shared libsdl no matter actual linking would happen against the static or shared libsdl; thanks for fixing the ordering.

Signature · 1 line
Loïc Minier
#3 lore raw
In reply to TeLeMan
Quoted 4 lines · TeLeMan

The static compilation for sdl is broken after
79427693174a553d62f3da44aacd3f19ba8df3a7.

Thanks, applied.

Quoted 37 lines
---
 configure |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
configure +5 -2
index 4c95c27..213dddf 100644
@@ -1063,7 +1063,11 @@ if test "$sdl" != "no" ; then
 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
 EOF
   sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
-  sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  if test "$static" = "yes" ; then
+    sdl_libs=`sdl-config --static-libs 2>/dev/null`
+  else
+    sdl_libs=`$sdlconfig --libs 2> /dev/null`
+  fi
   if compile_prog "$sdl_cflags" "$sdl_libs" ; then
     if test "$_sdlversion" -lt 121 ; then
       sdl_too_old=yes
@@ -1075,7 +1079,6 @@ EOF
 
     # static link with sdl ? (note: sdl.pc's --static --libs is broken)
     if test "$sdl" = "yes" -a "$static" = "yes" ; then
-      sdl_libs=`sdl-config --static-libs 2>/dev/null`
       if test $? = 0 && echo $sdl_libs | grep -- -laa > /dev/null; then
          sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`"
          sdl_cflags="$sdl_cflags `aalib-config --cflags >2 /dev/null`"
Signature · 4 lines
1.6.5.1.1367.gcd48

--
SUN OF A BEACH
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net