Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpoptConfig.h
Go to the documentation of this file.
1 /* Copyright (C) 2011
2  * All Rights Reserved.
3  * This code is published under the Eclipse Public License.
4  *
5  * $Id: IpoptConfig.h 2666 2016-07-20 16:02:55Z stefan $
6  *
7  * Include file for the configuration of Ipopt.
8  *
9  * On systems where the code is configured with the configure script
10  * (i.e., compilation is always done with HAVE_CONFIG_H defined), this
11  * header file includes the automatically generated header file, and
12  * undefines macros that might configure with other Config.h files.
13  *
14  * On systems that are compiled in other ways (e.g., with the
15  * Developer Studio), a header files is included to define those
16  * macros that depend on the operating system and the compiler. The
17  * macros that define the configuration of the particular user setting
18  * (e.g., presence of other COIN-OR packages or third party code) are set
19  * by the files config_*default.h. The project maintainer needs to remember
20  * to update these file and choose reasonable defines.
21  * A user can modify the default setting by editing the config_*default.h files.
22  *
23  */
24 
25 #ifndef __IPOPTCONFIG_H__
26 #define __IPOPTCONFIG_H__
27 
28 #ifdef HAVE_CONFIG_H
29 
30 #ifdef IPOPT_BUILD
31 #include "config.h"
32 #else
33 #include "config_ipopt.h"
34 #endif
35 
36 #else /* HAVE_CONFIG_H */
37 
38 #ifdef IPOPT_BUILD
39 #include "config_default.h"
40 #else
41 #include "config_ipopt_default.h"
42 #endif
43 
44 #endif /* HAVE_CONFIG_H */
45 
46 /* If F77_FUNC has not been defined, then because no Fortran compiler was available.
47  * However, Ipopt needs this define to call functions from library that are usually
48  * written in Fortran (Blas, Lapack). We make up some definition here, but the user
49  * may have to adapt for their system.
50  */
51 #if defined(IPOPT_BUILD) && !defined(F77_FUNC)
52 #if 1
53 # define F77_FUNC(name,NAME) NAME
54 # define F77_FUNC_(name,NAME) NAME
55 #else
56 # define F77_FUNC(name,NAME) name ## _
57 # define F77_FUNC_(name,NAME) name ## __
58 #endif
59 #endif
60 
61 #endif /*__IPOPTCONFIG_H__*/