HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #593

Ticket #593: sdl-config

File sdl-config, 1.6 KB (added by pulkomandy, 3 years ago)

Modified sdl-config script

Line 
1#!/bin/sh
2
3libDir=`finddir B_SYSTEM_LIB_DIRECTORY`
4
5# Determine which GCC we're running
6if [ -f "$libDir"/libsupc++.so ] ; then
7        HAIKU_GCC_VERSION=4
8else
9        HAIKU_GCC_VERSION=2
10fi
11
12SETGCC_OUTPUT=`setgcc`
13CURRENT_COMPILER=${SETGCC_OUTPUT: -1:1}
14
15if [ $CURRENT_COMPILER == $HAIKU_GCC_VERSION ] ; then
16        libdir=`finddir B_COMMON_LIB_DIRECTORY`
17else
18        libdir=`finddir B_COMMON_LIB_DIRECTORY`/gcc$CURRENT_COMPILER
19fi
20
21prefix=/boot/common
22exec_prefix=${prefix}
23exec_prefix_set=no
24
25#usage="\
26#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
27usage="\
28Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
29
30if test $# -eq 0; then
31      echo "${usage}" 1>&2
32      exit 1
33fi
34
35while test $# -gt 0; do
36  case "$1" in
37  -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
38  *) optarg= ;;
39  esac
40
41  case $1 in
42    --prefix=*)
43      prefix=$optarg
44      if test $exec_prefix_set = no ; then
45        exec_prefix=$optarg
46      fi
47      ;;
48    --prefix)
49      echo $prefix
50      ;;
51    --exec-prefix=*)
52      exec_prefix=$optarg
53      exec_prefix_set=yes
54      ;;
55    --exec-prefix)
56      echo $exec_prefix
57      ;;
58    --version)
59      echo 1.2.15
60      ;;
61    --cflags)
62      echo -I${prefix}/include/SDL -D_GNU_SOURCE=1
63      ;;
64#    --libs)
65#      echo -L$libdir  -lSDL
66#      ;;
67#    --static-libs)
68    --libs|--static-libs)
69      echo -L$libdir  -lSDL   -liconv -lGL -lroot -lbe -lmedia -lgame -ldevice -ltextencoding
70      ;;
71    *)
72      echo "${usage}" 1>&2
73      exit 1
74      ;;
75  esac
76  shift
77done

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/