Changeset 2431
- Timestamp:
- Jul 19, 2007, 2:06:50 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 11 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.am
r2407 r2431 11 11 MAC_DIR = macosx 12 12 endif 13 if HAVE_WX 14 WX_DIR = wx 15 endif 13 16 14 SUBDIRS = libtransmission $(DAEMON_DIR) cli $(GTK_DIR) $(BEOS_DIR) $(MAC_DIR) 17 SUBDIRS = libtransmission $(DAEMON_DIR) cli $(GTK_DIR) $(BEOS_DIR) $(MAC_DIR) $(WX_DIR) 15 18 16 19 DISTCLEANFILES = \ -
trunk/acinclude.m4
r2400 r2431 199 199 200 200 201 dnl 202 dnl nicked from wxwin.m4 203 dnl 204 205 206 dnl --------------------------------------------------------------------------- 207 dnl Macros for wxWidgets detection. Typically used in configure.in as: 208 dnl 209 dnl AC_ARG_ENABLE(...) 210 dnl AC_ARG_WITH(...) 211 dnl ... 212 dnl AM_OPTIONS_WXCONFIG 213 dnl ... 214 dnl ... 215 dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 216 dnl if test "$wxWin" != 1; then 217 dnl AC_MSG_ERROR([ 218 dnl wxWidgets must be installed on your system 219 dnl but wx-config script couldn't be found. 220 dnl 221 dnl Please check that wx-config is in path, the directory 222 dnl where wxWidgets libraries are installed (returned by 223 dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 224 dnl equivalent variable and wxWidgets version is 2.3.4 or above. 225 dnl ]) 226 dnl fi 227 dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 228 dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 229 dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 230 dnl 231 dnl LIBS="$LIBS $WX_LIBS" 232 dnl --------------------------------------------------------------------------- 233 234 dnl --------------------------------------------------------------------------- 235 dnl AM_OPTIONS_WXCONFIG 236 dnl 237 dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and 238 dnl --wx-config command line options 239 dnl --------------------------------------------------------------------------- 240 241 AC_DEFUN([AM_OPTIONS_WXCONFIG], 242 [ 243 AC_ARG_WITH(wxdir, 244 [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], 245 [ wx_config_name="$withval/wx-config" 246 wx_config_args="--inplace"]) 247 AC_ARG_WITH(wx-config, 248 [ --with-wx-config=CONFIG wx-config script to use (optional)], 249 wx_config_name="$withval" ) 250 AC_ARG_WITH(wx-prefix, 251 [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], 252 wx_config_prefix="$withval", wx_config_prefix="") 253 AC_ARG_WITH(wx-exec-prefix, 254 [ --with-wx-exec-prefix=PREFIX 255 Exec prefix where wxWidgets is installed (optional)], 256 wx_config_exec_prefix="$withval", wx_config_exec_prefix="") 257 ]) 258 259 dnl Helper macro for checking if wx version is at least $1.$2.$3, set's 260 dnl wx_ver_ok=yes if it is: 261 AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], 262 [ 263 wx_ver_ok="" 264 if test "x$WX_VERSION" != x ; then 265 if test $wx_config_major_version -gt $1; then 266 wx_ver_ok=yes 267 else 268 if test $wx_config_major_version -eq $1; then 269 if test $wx_config_minor_version -gt $2; then 270 wx_ver_ok=yes 271 else 272 if test $wx_config_minor_version -eq $2; then 273 if test $wx_config_micro_version -ge $3; then 274 wx_ver_ok=yes 275 fi 276 fi 277 fi 278 fi 279 fi 280 fi 281 ]) 282 283 dnl --------------------------------------------------------------------------- 284 dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND 285 dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) 286 dnl 287 dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC 288 dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME 289 dnl environment variable to override the default name of the wx-config script 290 dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this 291 dnl case the macro won't even waste time on tests for its existence. 292 dnl 293 dnl Optional WX-LIBS argument contains comma- or space-separated list of 294 dnl wxWidgets libraries to link against (it may include contrib libraries). If 295 dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to 296 dnl link with all of the core wxWidgets libraries. 297 dnl 298 dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config 299 dnl invocation command in present. It can be used to fine-tune lookup of 300 dnl best wxWidgets build available. 301 dnl 302 dnl Example use: 303 dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] 304 dnl [--unicode --debug]) 305 dnl --------------------------------------------------------------------------- 306 307 dnl 308 dnl Get the cflags and libraries from the wx-config script 309 dnl 310 AC_DEFUN([AM_PATH_WXCONFIG], 311 [ 312 dnl do we have wx-config name: it can be wx-config or wxd-config or ... 313 if test x${WX_CONFIG_NAME+set} != xset ; then 314 WX_CONFIG_NAME=wx-config 315 fi 316 317 if test "x$wx_config_name" != x ; then 318 WX_CONFIG_NAME="$wx_config_name" 319 fi 320 321 dnl deal with optional prefixes 322 if test x$wx_config_exec_prefix != x ; then 323 wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" 324 WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" 325 fi 326 if test x$wx_config_prefix != x ; then 327 wx_config_args="$wx_config_args --prefix=$wx_config_prefix" 328 WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" 329 fi 330 if test "$cross_compiling" = "yes"; then 331 wx_config_args="$wx_config_args --host=$host_alias" 332 fi 333 334 dnl don't search the PATH if WX_CONFIG_NAME is absolute filename 335 if test -x "$WX_CONFIG_NAME" ; then 336 AC_MSG_CHECKING(for wx-config) 337 WX_CONFIG_PATH="$WX_CONFIG_NAME" 338 AC_MSG_RESULT($WX_CONFIG_PATH) 339 else 340 AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") 341 fi 342 343 if test "$WX_CONFIG_PATH" != "no" ; then 344 WX_VERSION="" 345 346 min_wx_version=ifelse([$1], ,2.2.1,$1) 347 if test -z "$5" ; then 348 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) 349 else 350 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) 351 fi 352 353 WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4" 354 355 WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` 356 wx_config_major_version=`echo $WX_VERSION | \ 357 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 358 wx_config_minor_version=`echo $WX_VERSION | \ 359 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 360 wx_config_micro_version=`echo $WX_VERSION | \ 361 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 362 363 wx_requested_major_version=`echo $min_wx_version | \ 364 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 365 wx_requested_minor_version=`echo $min_wx_version | \ 366 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 367 wx_requested_micro_version=`echo $min_wx_version | \ 368 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 369 370 _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], 371 [$wx_requested_minor_version], 372 [$wx_requested_micro_version]) 373 374 if test -n "$wx_ver_ok"; then 375 376 AC_MSG_RESULT(yes (version $WX_VERSION)) 377 WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` 378 379 dnl is this even still appropriate? --static is a real option now 380 dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is 381 dnl what the user actually wants, making this redundant at best. 382 dnl For now keep it in case anyone actually used it in the past. 383 AC_MSG_CHECKING([for wxWidgets static library]) 384 WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null` 385 if test "x$WX_LIBS_STATIC" = "x"; then 386 AC_MSG_RESULT(no) 387 else 388 AC_MSG_RESULT(yes) 389 fi 390 391 dnl starting with version 2.2.6 wx-config has --cppflags argument 392 wx_has_cppflags="" 393 if test $wx_config_major_version -gt 2; then 394 wx_has_cppflags=yes 395 else 396 if test $wx_config_major_version -eq 2; then 397 if test $wx_config_minor_version -gt 2; then 398 wx_has_cppflags=yes 399 else 400 if test $wx_config_minor_version -eq 2; then 401 if test $wx_config_micro_version -ge 6; then 402 wx_has_cppflags=yes 403 fi 404 fi 405 fi 406 fi 407 fi 408 409 dnl starting with version 2.7.0 wx-config has --rescomp option 410 wx_has_rescomp="" 411 if test $wx_config_major_version -gt 2; then 412 wx_has_rescomp=yes 413 else 414 if test $wx_config_major_version -eq 2; then 415 if test $wx_config_minor_version -ge 7; then 416 wx_has_rescomp=yes 417 fi 418 fi 419 fi 420 if test "x$wx_has_rescomp" = x ; then 421 dnl cannot give any useful info for resource compiler 422 WX_RESCOMP= 423 else 424 WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` 425 fi 426 427 if test "x$wx_has_cppflags" = x ; then 428 dnl no choice but to define all flags like CFLAGS 429 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 430 WX_CPPFLAGS=$WX_CFLAGS 431 WX_CXXFLAGS=$WX_CFLAGS 432 433 WX_CFLAGS_ONLY=$WX_CFLAGS 434 WX_CXXFLAGS_ONLY=$WX_CFLAGS 435 else 436 dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS 437 WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags` 438 WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags` 439 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 440 441 WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` 442 WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` 443 fi 444 445 ifelse([$2], , :, [$2]) 446 447 else 448 449 if test "x$WX_VERSION" = x; then 450 dnl no wx-config at all 451 AC_MSG_RESULT(no) 452 else 453 AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) 454 fi 455 456 WX_CFLAGS="" 457 WX_CPPFLAGS="" 458 WX_CXXFLAGS="" 459 WX_LIBS="" 460 WX_LIBS_STATIC="" 461 WX_RESCOMP="" 462 ifelse([$3], , :, [$3]) 463 464 fi 465 else 466 467 WX_CFLAGS="" 468 WX_CPPFLAGS="" 469 WX_CXXFLAGS="" 470 WX_LIBS="" 471 WX_LIBS_STATIC="" 472 WX_RESCOMP="" 473 474 ifelse([$3], , :, [$3]) 475 476 fi 477 478 AC_SUBST(WX_CPPFLAGS) 479 AC_SUBST(WX_CFLAGS) 480 AC_SUBST(WX_CXXFLAGS) 481 AC_SUBST(WX_CFLAGS_ONLY) 482 AC_SUBST(WX_CXXFLAGS_ONLY) 483 AC_SUBST(WX_LIBS) 484 AC_SUBST(WX_LIBS_STATIC) 485 AC_SUBST(WX_VERSION) 486 AC_SUBST(WX_RESCOMP) 487 ]) 488 489 dnl --------------------------------------------------------------------------- 490 dnl Get information on the wxrc program for making C++, Python and xrs 491 dnl resource files. 492 dnl 493 dnl AC_ARG_ENABLE(...) 494 dnl AC_ARG_WITH(...) 495 dnl ... 496 dnl AM_OPTIONS_WXCONFIG 497 dnl ... 498 dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 499 dnl if test "$wxWin" != 1; then 500 dnl AC_MSG_ERROR([ 501 dnl wxWidgets must be installed on your system 502 dnl but wx-config script couldn't be found. 503 dnl 504 dnl Please check that wx-config is in path, the directory 505 dnl where wxWidgets libraries are installed (returned by 506 dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 507 dnl equivalent variable and wxWidgets version is 2.6.0 or above. 508 dnl ]) 509 dnl fi 510 dnl 511 dnl AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0]) 512 dnl if test "x$HAVE_WXRC" != x1; then 513 dnl AC_MSG_ERROR([ 514 dnl The wxrc program was not installed or not found. 515 dnl 516 dnl Please check the wxWidgets installation. 517 dnl ]) 518 dnl fi 519 dnl 520 dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 521 dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 522 dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 523 dnl 524 dnl LDFLAGS="$LDFLAGS $WX_LIBS" 525 dnl --------------------------------------------------------------------------- 526 527 528 529 dnl --------------------------------------------------------------------------- 530 dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 531 dnl 532 dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS 533 dnl resources. The variable WXRC will be set and substituted in the configure 534 dnl script and Makefiles. 535 dnl 536 dnl Example use: 537 dnl AM_PATH_WXRC([wxrc=1], [wxrc=0]) 538 dnl --------------------------------------------------------------------------- 539 540 dnl 541 dnl wxrc program from the wx-config script 542 dnl 543 AC_DEFUN([AM_PATH_WXRC], 544 [ 545 AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) 546 547 if test "x$WX_CONFIG_NAME" = x; then 548 AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) 549 else 550 551 AC_MSG_CHECKING([for wxrc]) 552 553 if test "x$WXRC" = x ; then 554 dnl wx-config --utility is a new addition to wxWidgets: 555 _WX_PRIVATE_CHECK_VERSION(2,5,3) 556 if test -n "$wx_ver_ok"; then 557 WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` 558 fi 559 fi 560 561 if test "x$WXRC" = x ; then 562 AC_MSG_RESULT([not found]) 563 ifelse([$2], , :, [$2]) 564 else 565 AC_MSG_RESULT([$WXRC]) 566 ifelse([$1], , :, [$1]) 567 fi 568 569 AC_SUBST(WXRC) 570 fi 571 ]) -
trunk/autogen.sh
r2400 r2431 1 1 #!/bin/sh 2 autoreconf --force --install -I config -I m4 --verbose2 autoreconf --force --install -I config -I m4 -
trunk/configure.ac
r2422 r2431 60 60 dnl ---------------------------------------------------------------------------- 61 61 dnl 62 dnl GTK+detection for the GTK+ client62 dnl detection for the GTK+ client 63 63 64 64 AM_PATH_GTK_2_0($GTK_MINIMUM,[have_gtk=yes],[have_gtk=no][gthread]) … … 77 77 fi 78 78 AM_CONDITIONAL([WITH_GTK],[test "x$use_gtk" = "xyes"]) 79 80 81 dnl ---------------------------------------------------------------------------- 82 dnl 83 dnl wxWidgets detection for the wxWidgets client 84 85 86 AM_OPTIONS_WXCONFIG 87 AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no]) 88 AC_ARG_WITH(wx, AC_HELP_STRING([--with-wx], [Build wxWidgets client]), 89 [want_wx=$withval], 90 [want_wx=$have_wx]) 91 use_wx=no 92 if test "x$want_wx" = "xyes" ; then 93 if test "x$have_wx" = "xyes"; then 94 use_wx=yes 95 else 96 AC_MSG_ERROR("wxWidgets not found!") 97 fi 98 fi 99 AM_CONDITIONAL([HAVE_WX],[test "x$use_wx" = "xyes"]) 79 100 80 101 … … 202 223 libtransmission/version.h 203 224 macosx/Makefile 204 macosx/Info.plist]) 225 macosx/Info.plist 226 wx/Makefile 227 wx/xpm/Makefile]) 205 228 206 229 AC_OUTPUT … … 210 233 Configuration: 211 234 212 Source code location: ${srcdir} 213 Compiler: ${CXX} 214 Build BeOS client: ${beos} 215 Build Daemon: ${use_libevent} 216 Build GTK+ client: ${use_gtk} 217 Build OS X client: ${darwin} 235 Source code location: ${srcdir} 236 Compiler: ${CXX} 237 Build BeOS client: ${beos} 238 Build Daemon: ${use_libevent} 239 Build GTK+ client: ${use_gtk} 240 Build OS X client: ${darwin} 241 Build wxWidgets client: ${use_wx} 218 242 219 243 "
Note: See TracChangeset
for help on using the changeset viewer.