configure.ac

changeset 410
e3f8a51b566a
parent 409
cdf68044adaf
child 411
ae85e91dcc58
equal deleted inserted replaced
409:cdf68044adaf 410:e3f8a51b566a
80 else 80 else
81 AC_MSG_ERROR(libuuid not found) 81 AC_MSG_ERROR(libuuid not found)
82 fi 82 fi
83 83
84 # Check for SDL 84 # Check for SDL
85 SDL_CFLAGS=""
86 SDL_LIBS=""
85 AC_MSG_CHECKING(SDL library) 87 AC_MSG_CHECKING(SDL library)
86 pkg-config --exists sdl 88 pkg-config --exists sdl
87 if test "$?" = "0"; then 89 if test "$?" = "0"; then
88 AC_MSG_RESULT(yes) 90 AC_MSG_RESULT(yes)
91 AC_MSG_CHECKING(sdl library v1.2.0 or newer)
92 pkg-config --atleast-version=1.2.0 sdl
93 if test "$?" = "0"; then
94 AC_MSG_RESULT(found)
95 else
96 AC_MSG_ERROR(not found)
97 fi
98 SDL_CFLAGS="$(pkg-config --cflags sdl)"
99 SDL_LIBS="$(pkg-config --libs sdl)"
100 AC_CHECK_HEADERS(SDL/SDL.h)
89 else 101 else
90 AC_MSG_ERROR(no) 102 AC_MSG_RESULT(no)
91 fi 103 fi
92 AC_MSG_CHECKING(sdl library v1.2.0 or newer)
93 pkg-config --atleast-version=1.2.0 sdl
94 if test "$?" = "0"; then
95 AC_MSG_RESULT(found)
96 else
97 AC_MSG_ERROR(not found)
98 fi
99 SDL_CFLAGS="$(pkg-config --cflags sdl)"
100 SDL_LIBS="$(pkg-config --libs sdl)"
101 AC_CHECK_HEADERS(SDL/SDL.h)
102 104
103 # Check for SDL_ttf 105 # Check for SDL_ttf
104 AC_MSG_CHECKING(SDL_ttf library) 106 AC_MSG_CHECKING(SDL_ttf library)
105 pkg-config --exists SDL_ttf 107 pkg-config --exists SDL_ttf
106 if test "$?" = "0"; then 108 if test "$?" = "0"; then
107 AC_MSG_RESULT(yes) 109 AC_MSG_RESULT(yes)
110 AC_MSG_CHECKING(sdl library v2.0.0 or newer)
111 pkg-config --atleast-version=2.0.0 SDL_ttf
112 if test "$?" = "0"; then
113 AC_MSG_RESULT(found)
114 else
115 AC_MSG_ERROR(not found)
116 fi
117 # Override flags
118 SDL_CFLAGS="$(pkg-config --cflags SDL_ttf)"
119 SDL_LIBS="$(pkg-config --libs SDL_ttf)"
108 else 120 else
109 AC_MSG_ERROR(no) 121 AC_MSG_RESULT(no)
110 fi 122 fi
111 AC_MSG_CHECKING(sdl library v2.0.0 or newer)
112 pkg-config --atleast-version=2.0.0 SDL_ttf
113 if test "$?" = "0"; then
114 AC_MSG_RESULT(found)
115 else
116 AC_MSG_ERROR(not found)
117 fi
118 # Override flags
119 SDL_CFLAGS="$(pkg-config --cflags SDL_ttf)"
120 SDL_LIBS="$(pkg-config --libs SDL_ttf)"
121
122 123
123 dnl Checks for header files. 124 dnl Checks for header files.
124 AC_HEADER_STDC 125 AC_HEADER_STDC
125 126
126 AC_SUBST(SDL_CFLAGS) 127 AC_SUBST(SDL_CFLAGS)

mercurial