Skip to content

Commit

Permalink
- configure: include lp_lib.h or lpsolve/lp_lib.h depending on platform
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9121 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 26, 2011
1 parent 8a36c71 commit c6c7527
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 147 deletions.
2 changes: 2 additions & 0 deletions Compiler/runtime/config.h
Expand Up @@ -56,9 +56,11 @@
#define CONFIG_DLL_EXT ".dll"
#define CONFIG_OS "Windows_NT"
#define CONFIG_CORBALIBS "-L$(OPENMODELICAHOME)/lib/omc -lmico2313"
#define CONFIG_LPSOLVEINC "lp_lib.h"
/* Windows is always "special" */
#define CONFIG_SYSTEMLIBS mk_nil()


#if defined(__i386__) || defined(__x86_64__) || defined(_MSC_VER)
/*
* if we are on i386 or x86_64 or compiling with
Expand Down
4 changes: 3 additions & 1 deletion Compiler/runtime/config.unix.h.in
Expand Up @@ -34,6 +34,8 @@
#define CONFIG_OS "linux"
#endif

#define CONFIG_LPSOLVEINC "@LPSOLVEINC@"

#define CONFIG_DEFAULT_OPENMODELICAHOME "@prefix@"
#define CONFIG_PATH_DELIMITER "/"
#define CONFIG_GROUP_DELIMITER ":"
Expand All @@ -42,4 +44,4 @@
#define CONFIG_LPSOLVE55 "@LIBLPSOLVE55@"
#define CONFIG_REVISION "@SOURCE_REVISION@"

#define CONFIG_SYSTEMLIBS mk_cons(mk_scon("-lomcruntime"),mk_cons(mk_scon(CONFIG_LPSOLVE55),mk_cons(mk_scon(CONFIG_CORBALIBS),mk_nil())))
#define CONFIG_SYSTEMLIBS mk_cons(mk_scon("-lomcruntime"),mk_cons(mk_scon("-lsqlite3"),mk_cons(mk_scon(CONFIG_LPSOLVE55),mk_cons(mk_scon(CONFIG_CORBALIBS),mk_nil()))))
2 changes: 1 addition & 1 deletion Compiler/runtime/systemimpl.c
Expand Up @@ -1364,7 +1364,7 @@ int SystemImpl__dgesv(void *lA, void *lB, void **res)
return info;
}

#include "lp_lib.h"
#include CONFIG_LPSOLVEINC

int SystemImpl__lpsolve55(void *lA, void *lB, void *ix, void **res)
{
Expand Down
5 changes: 3 additions & 2 deletions Compiler/runtime/unitparser.cpp
Expand Up @@ -28,6 +28,7 @@
*
*/

#include "config.h"
#include "unitparser.h"
#include <iostream>
#include <sstream>
Expand All @@ -40,12 +41,12 @@
#ifndef WIN32
#define WIN32
#endif
#include "lp_lib.h"
#include CONFIG_LPSOLVEINC
#endif

#else

#include "lp_lib.h"
#include CONFIG_LPSOLVEINC

#endif

Expand Down

0 comments on commit c6c7527

Please sign in to comment.