Changeset 195

Show
Ignore:
Timestamp:
11/19/08 13:45:17 (17 years ago)
Author:
yumileroy
Message:

[svn] One more attempt to fix build in Linux (somebody helps me, I do not even have a Linux).

Original author: megamage
Date: 2008-11-08 09:19:26-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r44 r195  
    1313## Process this file with autoconf to produce a configure script. 
    1414 
     15# TODO: create m4 directory and put the checks there, because this file got realy poluted ( by Derex ) 
     16 
    1517## Prelude, basic settings for Autoconf 
     18#  PACKAGE:            trinity 
     19#  VERSION:            0.0.1 (trunk) 
     20#  BUG-REPORT-ADDRESS: devs@trinitycore.org 
    1621AC_INIT( [trinitycore], [0.0.1], [devs@trinitycore.org]) 
    17  
    1822AC_CONFIG_SRCDIR([src/shared/Base.cpp]) 
    1923 
     
    2630## Prevent the configure script from continuing any further if 
    2731# configuration is being performed in the top-level directory. 
    28 # The idea is to prevent this ,because some maintainers tend  
     32# The idea is to prevent this ,because some maintainers tend 
    2933# to break parallel build trees (a.k.a. VPATH builds). 
    3034if test "$srcdir" = "." && test "$enable_maintainer_mode" != "yes"; then 
     
    3337      Please configure and build in a directory other than the 
    3438      top-level source directory. This is needed because a lot 
    35       of maintainers tend to break parallel build trees  
    36       (a.k.a. VPATH builds). This is kinda real ensurance they  
     39      of maintainers tend to break parallel build trees 
     40      (a.k.a. VPATH builds). This is kinda real ensurance they 
    3741      will not do it (by enforcing everybody to do VPATH builds). 
    3842 
     
    6569AC_PROG_CC 
    6670AC_PROG_CXX 
     71AM_PROG_CC_C_O 
    6772AC_PROG_LIBTOOL 
    6873AC_PROG_INSTALL 
    69 AM_PROG_CC_C_O 
     74 
    7075 
    7176# Check if enable scripts 
     
    102107 
    103108## Check for required libraries. 
    104 AC_CHECK_LIB( pthread, pthread_create, [],  
     109AC_CHECK_LIB( pthread, pthread_create, [], 
    105110    [LDFLAGS="-pthread $LDFLAGS" 
    106111     AC_TRY_LINK([char pthread_create();], 
     
    121126    esac], 
    122127[DO_POSTGRESQL=no]) 
    123                                   
     128 
    124129AC_ARG_WITH(mysql, 
    125130[  --with-mysql            Use MySQL as a backend (default: yes)], 
     
    141146fi 
    142147AC_MSG_RESULT($DO_POSTGRESQL) 
    143          
     148 
    144149# here mysql 
    145150AC_MSG_CHECKING(whether to build/link MYSQL) 
     
    255260then 
    256261  tri_need_to_build_ace=no 
    257   ACE_LIBS="-lACE" 
    258   ACE_INCLUDES="" 
    259262  AC_MSG_RESULT([no]) 
    260263else 
     
    280283 
    281284AM_CONDITIONAL([TRI_BUILD_ACE], [test X$tri_need_to_build_ace = Xyes]) 
     285 
     286 
     287## Unify all additional includes/libs in one variable. 
     288# TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ). 
     289TRINI_INCLUDES="$POSTGRE_INCLUDES $MYSQL_INCLUDES $TRINI_INCLUDES" 
     290TRINI_LIBS="$POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $SSLLIB $TRINI_LIBS" 
    282291 
    283292## Export defined variables 
     
    293302AC_SUBST(TRINITYD_ENABLE_CLI) 
    294303AC_SUBST(TRINITYD_ENABLE_RA) 
     304 
     305## Additional CPPFLAGS and LDFLAGS. 
    295306AC_SUBST(TRINI_INCLUDES) 
    296307AC_SUBST(TRINI_LIBS) 
     
    313324   src/framework/Makefile 
    314325   src/shared/Makefile 
     326   src/shared/Auth/Makefile 
     327   src/shared/Config/Makefile 
     328   src/shared/Database/Makefile 
    315329   src/shared/vmap/Makefile 
     330   src/shared/SystemConfig.h 
    316331   src/game/Makefile 
    317332   src/trinityrealm/Makefile 
     
    321336]) 
    322337 
     338## Configure ACE, if needed 
     339if test X$tri_need_to_build_ace = Xyes; then 
     340  AC_CONFIG_SUBDIRS([dep/ACE_wrappers]) 
     341fi 
     342 
     343## Configure ACE 
    323344if test X$tri_build_scripts = Xyes; then 
    324345AC_CONFIG_FILES([src/bindings/scripts/Makefile]) 
    325346fi 
    326  
    327 ## Configure ACE 
    328 if test X$tri_need_to_build_ace = Xyes; then 
    329   AC_CONFIG_SUBDIRS([dep/ACE_wrappers]) 
    330 fi 
    331  
    332 ## Disabled Makefiles, until they are ready for a successful make and 
    333 #  make dist run. 
    334347 
    335348AC_CONFIG_COMMANDS([default],[ 
     
    339352 ],[PACKAGE_VERSION=$PACKAGE_VERSION]) 
    340353 
     354## Disabled Makefiles, until they are ready for a successful make and 
     355#  make dist run. 
     356 
    341357## Output files. 
    342358AC_OUTPUT