| | 134 | dnl **** |
| | 135 | dnl Cocoa |
| | 136 | dnl **** |
| | 137 | AC_ARG_ENABLE([cocoa], |
| | 138 | [ --disable-cocoa build cocoa integration [default auto]], |
| | 139 | enable_cocoa=$enableval, enable_cocoa=yes) |
| | 140 | |
| | 141 | if test "x$enable_cocoa" = "xyes";then |
| | 142 | dnl There is no pkgconfig for cocoa; lets do a header check |
| | 143 | temp_save_cflags="$CFLAGS" |
| | 144 | CFLAGS="$CFLAGS -ObjC" |
| | 145 | AC_CHECK_HEADER(Cocoa/Cocoa.h, [have_cocoa=true], [have_cocoa=false]) |
| | 146 | AC_CHECK_HEADER(AppKit/AppKit.h, [have_appkit=true], [have_appkit=false]) |
| | 147 | CFLAGS="$temp_save_cflags" |
| | 148 | |
| | 149 | if test "x$have_cocoa" = "xtrue";then |
| | 150 | COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker Cocoa" |
| | 151 | fi |
| | 152 | if test "x$have_appkit" = "xtrue";then |
| | 153 | COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker AppKit" |
| | 154 | fi |
| | 155 | if test "x$COCOA_LIBS" != "x";then |
| | 156 | AC_SUBST(COCOA_LIBS) |
| | 157 | true |
| | 158 | fi |
| | 159 | fi |
| | 160 | AM_CONDITIONAL(BUILD_COCOA, $have_cocoa) |
| | 161 | |
| | 162 | dnl **** |
| | 163 | dnl Carbon |
| | 164 | dnl **** |
| | 165 | AC_ARG_ENABLE([carbon], |
| | 166 | [ --disable-carbon build with carbon [default auto]], |
| | 167 | enable_carbon=$enableval, enable_carbon=yes) |
| | 168 | |
| | 169 | if test "x$enable_carbon" = "xyes";then |
| | 170 | dnl There is no pkgconfig for carbon; lets do a header check |
| | 171 | AC_CHECK_HEADER(Carbon/Carbon.h, [have_carbon=true], [have_carbon=false]) |
| | 172 | AC_CHECK_HEADER(IOKit/IOKitLib.h, [have_iokit=true], [have_iokit=false]) |
| | 173 | |
| | 174 | if test "x$have_carbon" = "xtrue";then |
| | 175 | CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker Carbon" |
| | 176 | fi |
| | 177 | if test "x$have_iokit" = "xtrue";then |
| | 178 | CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker IOKit" |
| | 179 | fi |
| | 180 | if test "x$CARBON_LIBS" != "x";then |
| | 181 | AC_SUBST(CARBON_LIBS) |
| | 182 | have_idle_osx=true |
| | 183 | dnl Disable X11 idle |
| | 184 | have_idle=false |
| | 185 | AM_CONDITIONAL(BUILD_IDLE, false) |
| | 186 | dnl Disable custom trayicon |
| | 187 | have_trayicon=gtk+ |
| | 188 | AM_CONDITIONAL(BUILD_TRAYICON, false) |
| | 189 | dnl Hack to work around failure in gettext package detection on OS/X |
| | 190 | if test "x$GMSGFMT" = "x";then |
| | 191 | AC_SUBST(GMSGFMT, msgfmt) |
| | 192 | AC_SUBST(MSGFMT, msgfmt) |
| | 193 | AC_SUBST(XGETTEXT, xgettext) |
| | 194 | fi |
| | 195 | else |
| | 196 | have_carbon=false |
| | 197 | have_idle_osx=false |
| | 198 | fi |
| | 199 | fi |
| | 200 | AM_CONDITIONAL(BUILD_IDLE_OSX, $have_carbon) |
| | 201 | AM_CONDITIONAL(BUILD_CARBON, $have_carbon) |
| | 202 | |