mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Scons: fix ICONV support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14690 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b1a54e83eb
commit
22a3512110
@ -1049,8 +1049,8 @@ int count()
|
||||
(conf.CheckIconvConst(),
|
||||
'ICONV_CONST',
|
||||
'Define as const if the declaration of iconv() needs const.',
|
||||
'#define ICONV_CONST',
|
||||
'#define ICONV_CONST const',
|
||||
'#define ICONV_CONST',
|
||||
),
|
||||
(conf.CheckLC_MESSAGES(),
|
||||
'HAVE_LC_MESSAGES',
|
||||
@ -1232,8 +1232,8 @@ int mkstemp(char*);
|
||||
(conf.CheckIconvConst(),
|
||||
'ICONV_CONST',
|
||||
'Define as const if the declaration of iconv() needs const.',
|
||||
'#define ICONV_CONST',
|
||||
'#define ICONV_CONST const',
|
||||
'#define ICONV_CONST',
|
||||
),
|
||||
(conf.CheckType('intmax_t', includes='#include <stdint.h>') or \
|
||||
conf.CheckType('intmax_t', includes='#include <inttypes.h>'),
|
||||
@ -1246,7 +1246,7 @@ int mkstemp(char*);
|
||||
),
|
||||
],
|
||||
extra_items = [
|
||||
('#define HAVE_ICONV', 'Define if iconv or libiconv is found')
|
||||
('#define HAVE_ICONV 1', 'Define if iconv or libiconv is found')
|
||||
],
|
||||
config_post = '#endif'
|
||||
)
|
||||
|
@ -241,23 +241,12 @@ int main()
|
||||
def checkIconvConst(conf):
|
||||
''' check the declaration of iconv '''
|
||||
check_iconv_const = '''
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#ifndef LIBICONV_DLL_EXPORTED
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#endif
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
return 1;
|
||||
// this declaration will fail when there already exists a non const char**
|
||||
// version which returns size_t
|
||||
double iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
conf.Message('Check if the declaration of iconv needs const... ')
|
||||
|
Loading…
Reference in New Issue
Block a user