From 4da9b3ba280cb73c8abcc21d177830d57e9b582e Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Tue, 2 Aug 2005 14:53:32 +0000 Subject: [PATCH] More changes to try to make library work with apple runtime/foundation git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@21597 72102866-910b-0410-8b05-ffd578937521 --- GNUmakefile | 34 +++++++++++++++++++++++++++++++++- SQLClient.h | 2 ++ SQLClient.m | 1 - 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 99068a7..0f588e6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -23,7 +23,15 @@ SQLClient_AGSDOC_FILES = SQLClient.h # Assume that the use of the gnu runtime means we have the gnustep # base library and can use its extensions to build WebServer stuff. # -ifeq ($(OBJC_RUNTIME_LIB), gnu) +ifeq ($(OBJC_RUNTIME_LIB),gnu) +APPLE=0 +else +APPLE=1 +endif + +ifeq ($(APPLE),1) +ADDITIONAL_OBJC_LIBS += -lgnustep-baseadd +else SQLClient_OBJC_FILES += WebServer.m WebServerBundles.m SQLClient_HEADER_FILES += WebServer.h SQLClient_AGSDOC_FILES += WebServer.h @@ -42,6 +50,13 @@ BUNDLE_INSTALL_DIR=$(GNUSTEP_INSTALLATION_DIR)/Library/Bundles/SQLClient # has _libs appended to the bundle name, and has the extra libraries linked. ifneq ($(ECPG),) +ifeq ($(APPLE),1) +BUNDLE_NAME += ECPG +ECPG_OBJC_FILES = ECPG.m +ECPG_LIB_DIRS = -L./obj +ECPG_BUNDLE_LIBS += -lSQLClient -lecpg +ECPG_PRINCIPAL_CLASS = SQLClientECPG +else BUNDLE_NAME += ECPG ECPG_OBJC_FILES = ECPG.m ECPG_LIB_DIRS = -L./obj @@ -52,6 +67,7 @@ ECPG_libs_OBJC_FILES = ECPG.m ECPG_libs_LIB_DIRS = -L./obj ECPG_libs_BUNDLE_LIBS += -lSQLClient -lgnustep-base -lobjc -lecpg ECPG_libs_PRINCIPAL_CLASS = SQLClientECPG_libs +endif TEST_TOOL_NAME += testECPG testECPG_OBJC_FILES = testECPG.m testECPG_TOOL_LIBS += -lSQLClient @@ -59,6 +75,13 @@ testECPG_LIB_DIRS += -L./obj endif ifneq ($(POSTGRES),) +ifeq ($(APPLE),1) +BUNDLE_NAME += Postgres +Postgres_OBJC_FILES = Postgres.m +Postgres_LIB_DIRS = -L./obj +Postgres_BUNDLE_LIBS += -lSQLClient -lpq +Postgres_PRINCIPAL_CLASS = SQLClientPostgres +else BUNDLE_NAME += Postgres Postgres_OBJC_FILES = Postgres.m Postgres_LIB_DIRS = -L./obj @@ -69,6 +92,7 @@ Postgres_libs_OBJC_FILES = Postgres.m Postgres_libs_LIB_DIRS = -L./obj Postgres_libs_BUNDLE_LIBS += -lSQLClient -lgnustep-base -lobjc -lpq Postgres_libs_PRINCIPAL_CLASS = SQLClientPostgres_libs +endif TEST_TOOL_NAME += testPostgres testPostgres_OBJC_FILES = testPostgres.m testPostgres_LIB_DIRS += -L./obj @@ -76,6 +100,13 @@ testPostgres_TOOL_LIBS += -lSQLClient endif ifneq ($(MYSQL),) +ifeq ($(APPLE),1) +BUNDLE_NAME += MySQL +MySQL_OBJC_FILES = MySQL.m +MySQL_LIB_DIRS = -L./obj +MySQL_BUNDLE_LIBS += -lSQLClient -lmysqlclient +MySQL_PRINCIPAL_CLASS = SQLClientMySQL +else BUNDLE_NAME += MySQL MySQL_OBJC_FILES = MySQL.m MySQL_LIB_DIRS = -L./obj @@ -86,6 +117,7 @@ MySQL_libs_OBJC_FILES = MySQL.m MySQL_libs_LIB_DIRS = -L./obj MySQL_libs_BUNDLE_LIBS += -lSQLClient -lgnustep-base -lobjc -lmysqlclient MySQL_libs_PRINCIPAL_CLASS = SQLClientMySQL_libs +endif TEST_TOOL_NAME += testMySQL testMySQL_OBJC_FILES = testMySQL.m testMySQL_LIB_DIRS += -L./obj diff --git a/SQLClient.h b/SQLClient.h index b13aca4..28c1eef 100644 --- a/SQLClient.h +++ b/SQLClient.h @@ -175,6 +175,8 @@ #include #include +#include + @class NSData; @class NSDate; @class NSMutableSet; diff --git a/SQLClient.m b/SQLClient.m index 2f259d3..c10111f 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -45,7 +45,6 @@ #include #include -#include #include #include "SQLClient.h"