dsrc isn't necessary for this repo
[client-tools.git] / src / game / configure.in
blob896ea9974f2122b1f5df4357868779afc04421ed
1 AC_PREREQ(2.53)
2 AC_INIT(game, 1.0.0, swoprogrammers@soe.sony.com)
3 AC_CONFIG_AUX_DIR(config)
4 # AM_CONFIG_HEADER(config.h)
5 AC_CANONICAL_BUILD
6 AC_CANONICAL_HOST
7 AC_CANONICAL_TARGET
9 AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug\[=yes\|no\] ], [defines _DEBUG and enables debugging features]), AC_DEFINE(_DEBUG) CXXFLAGS="$CXXFLAGS -g", CXXFLAGS="$CXXFLAGS -O2")
11 # todo -  when using gcc-3, pick more optimizations for use
12 AC_ARG_ENABLE([optimized], AC_HELP_STRING([--enable-optimized\[=yes\|no\] ], [enables optimizations]), CXXFLAGS="$CXXFLAGS -O2", [])
14 case $target in
15 *-linux-*)
16         platform=[linux];
17         CXXFLAGS="$CXXFLAGS -DLINUX";
18         AC_DEFINE(LINUX)
19         AC_DEFINE(_REENTRANT)
20         AC_DEFINE(_XOPEN_SOURCE, 500)
21         AC_DEFINE(_GNU_SOURCE)
22         AC_DEFINE(linux)
23         AC_DEFINE(_GNU_SOURCE)
24         AC_DEFINE(_USING_STL)
25         AC_DEFINE(__STL_NO_BAD_ALLOC)
26 esac
27 AC_SUBST(platform)
28 #AC_DISABLE_SHARED
30 AM_INIT_AUTOMAKE
32 AC_PROG_LIBTOOL
33 AC_PROG_CXX
34 AC_PROG_CC
36 AC_DEFUN([REQUIRE_PACKAGE], [if ! test $$3; then AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=path/to/$1], [where to find $1]), AC_SUBST($3, $withval), AC_SUBST($3, $2)) AC_CHECK_FILE($4, [], AC_MSG_ERROR([$1 is required but was not found in $$3])) fi])
38 REQUIRE_PACKAGE(engine, [`pwd`/../engine], engine_dir, [$engine_dir/shared/library/sharedFoundation/include/public/sharedFoundation/FirstSharedFoundation.h]) AC_SUBST(engine_dir)
39 REQUIRE_PACKAGE(stlport, [`pwd`/../external/3rd/library/stlport453], stlport_dir, [$stlport_dir/stlport/algorithm]) AC_SUBST(stlport_dir)
40 REQUIRE_PACKAGE(archive, [`pwd`/../external/ours/library/archive], archive_dir, [$archive_dir/include/Archive/Archive.h]) AC_SUBST(archive_dir)
41 REQUIRE_PACKAGE(localization, [`pwd`/../external/ours/library/localization], localization_dir, [$localization_dir/include/FirstLocalization.h]) AC_SUBST(localization_dir)
42 REQUIRE_PACKAGE(crypto, [`pwd`/../external/ours/library/crypto], crypto_dir, [$crypto_dir/include/FirstCrypto.h]) AC_SUBST(crypto_dir)
43 REQUIRE_PACKAGE(localizationArchive, [`pwd`/../external/ours/library/localizationArchive], localizationArchive_dir, [$localizationArchive_dir/include/public/localizationArchive/FirstLocalizationArchive.h]) AC_SUBST(localizationArchive_dir)
44 REQUIRE_PACKAGE(fileInterface, [`pwd`/../external/ours/library/fileInterface], fileInterface_dir, [$fileInterface_dir/include/public/fileInterface/FirstFileInterface.h]) AC_SUBST(fileInterface_dir)
45 REQUIRE_PACKAGE(unicode, [`pwd`/../external/ours/library/unicode], unicode_dir, [$unicode_dir/include/Unicode.h]) AC_SUBST(unicode_dir)
46 REQUIRE_PACKAGE(unicodeArchive, [`pwd`/../external/ours/library/unicodeArchive], unicodeArchive_dir, [$unicodeArchive_dir/include/public/unicodeArchive/FirstUnicodeArchive.h]) AC_SUBST(unicodeArchive_dir)
47 REQUIRE_PACKAGE(udplibrary, [`pwd`/../external/3rd/library/udplibrary], udplibrary_dir, [$udplibrary_dir/UdpLibrary.hpp]) AC_SUBST(udplibrary_dir)
48 REQUIRE_PACKAGE(oracle, [`pwd`/../external/3rd/library/oracle], oracle_dir, [$oracle_dir/include/oci.h]) AC_SUBST(oracle_dir)
49 REQUIRE_PACKAGE(libxml, [`pwd`/../external/3rd/library/libxml], libxml_dir, [$libxml_dir/libxml.h]) AC_SUBST(libxml_dir)
50 AC_MSG_WARN([engine has a forward dependency on game])
51 REQUIRE_PACKAGE(game, [`pwd`], game_dir, [$game_dir/shared/library/swgSharedUtility/include/public/swgSharedUtility/FirstSwgSharedUtility.h]) AC_SUBST(game_dir)
52 REQUIRE_PACKAGE(singleton, [`pwd`/../external/ours/library/singleton], singleton_dir, [$singleton_dir/include/Singleton/Singleton.h]) AC_SUBST(singleton_dir)
53 REQUIRE_PACKAGE(boost, [`pwd`/../external/3rd/library/boost], boost_dir, [$boost_dir/boost/smart_ptr.hpp]) AC_SUBST(boost_dir)
54 REQUIRE_PACKAGE(pcre, [`pwd`/../external/3rd/library/pcre/4.1/$platform], pcre_dir, [$pcre_dir/include/pcre/pcre.h]) AC_SUBST(pcre_dir)
55 REQUIRE_PACKAGE(perforce, [`pwd`/../external/3rd/library/perforce], perforce_dir, [$perforce_dir/include/clientapi.h]) AC_SUBST(perforce_dir)
56 REQUIRE_PACKAGE(soePlatform, [`pwd`/../external/3rd/library/soePlatform], soePlatform_dir, [$soePlatform_dir/Base/Base.h]) AC_SUBST(soePlatform_dir)
57 REQUIRE_PACKAGE(platform, [`pwd`/../external/3rd/library/platform], platform_dir, [$platform_dir/MonAPI2/MonitorAPI.h]) AC_SUBST(platform_dir)
59 AC_DEFUN([GAME_AUTOMAKE], [AC_MSG_NOTICE([creating $1.in]) ; automake $1])
61 GAME_AUTOMAKE(server/application/SwgDatabaseServer/src/linux/Makefile)
62 GAME_AUTOMAKE(server/application/SwgGameServer/src/linux/Makefile)
64 AC_OUTPUT(Makefile \
65           shared/Makefile \
66           shared/application/Makefile \
67           shared/application/SwgLoadClient/Makefile \
68           shared/application/SwgLoadClient/src/Makefile \
69           shared/application/SwgLoadClient/src/shared/Makefile \
70           shared/library/Makefile \
71           shared/library/swgSharedNetworkMessages/Makefile \
72           shared/library/swgSharedNetworkMessages/src/Makefile \
73           shared/library/swgSharedNetworkMessages/src/shared/Makefile \
74           shared/library/swgSharedNetworkMessages/src/shared/combat/Makefile \
75           shared/library/swgSharedNetworkMessages/src/shared/consent/Makefile \
76           shared/library/swgSharedNetworkMessages/src/shared/core/Makefile \
77           shared/library/swgSharedNetworkMessages/src/shared/permissionList/Makefile \
78           shared/library/swgSharedNetworkMessages/src/shared/survey/Makefile \
79           shared/library/swgSharedUtility/Makefile \
80           shared/library/swgSharedUtility/src/Makefile \
81           shared/library/swgSharedUtility/src/shared/Makefile \
82           server/Makefile \
83           server/library/Makefile \
84           server/library/swgServerNetworkMessages/Makefile \
85           server/library/swgServerNetworkMessages/src/Makefile \
86           server/library/swgServerNetworkMessages/src/shared/Makefile \
87           server/library/swgServerNetworkMessages/src/shared/combat/Makefile \
88           server/library/swgServerNetworkMessages/src/shared/core/Makefile \
89           server/library/swgServerNetworkMessages/src/shared/jedi/Makefile \
90           server/library/swgServerNetworkMessages/src/shared/money/Makefile \
91           server/library/swgServerNetworkMessages/src/shared/resource/Makefile \
92           server/library/swgServerNetworkMessages/src/shared/travel/Makefile \
93           server/application/Makefile \
94           server/application/SwgBattlefieldTool/Makefile \
95           server/application/SwgBattlefieldTool/src/Makefile \
96           server/application/SwgBattlefieldTool/src/shared/Makefile \
97           server/application/SwgDatabaseServer/Makefile \
98           server/application/SwgDatabaseServer/src/Makefile \
99           server/application/SwgDatabaseServer/src/linux/Makefile \
100           server/application/SwgDatabaseServer/src/shared/Makefile \
101           server/application/SwgDatabaseServer/src/shared/buffers/Makefile \
102           server/application/SwgDatabaseServer/src/shared/cleanup/Makefile \
103           server/application/SwgDatabaseServer/src/shared/core/Makefile \
104           server/application/SwgDatabaseServer/src/shared/generated/Makefile \
105           server/application/SwgDatabaseServer/src/shared/persistable/Makefile \
106           server/application/SwgDatabaseServer/src/shared/queries/Makefile \
107           server/application/SwgDatabaseServer/src/shared/tasks/Makefile \
108           server/application/SwgGameServer/Makefile \
109           server/application/SwgGameServer/src/Makefile \
110           server/application/SwgGameServer/src/linux/Makefile \
111           server/application/SwgGameServer/src/shared/Makefile \
112           server/application/SwgGameServer/src/shared/combat/Makefile \
113           server/application/SwgGameServer/src/shared/console/Makefile \
114           server/application/SwgGameServer/src/shared/controller/Makefile \
115           server/application/SwgGameServer/src/shared/core/Makefile \
116           server/application/SwgGameServer/src/shared/lint/Makefile \
117           server/application/SwgGameServer/src/shared/object/Makefile \
118           server/application/SwgGameServer/src/shared/objectTemplate/Makefile \
119           server/application/SwgGameServer/src/shared/snapshot/Makefile)