diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2006-11-27 23:34:10 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2006-11-27 23:34:10 +0900 |
commit | a444ce20b20407d7720572c6558ae742423a5a28 (patch) | |
tree | c3af3969f9ee6316cce129554dfa868430c036d8 /configure.ac | |
parent | 589a20d52666a8cdc4efc5914c2303437da13d28 (diff) | |
download | libhangul-a444ce20b20407d7720572c6558ae742423a5a28.tar.gz |
hangulconf.h을 자동 생성하는 코드 추가
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@99 8f00fcd2-89fc-0310-932e-b01be5b65e01
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 03046fb..a476897 100644 --- a/configure.ac +++ b/configure.ac @@ -23,13 +23,52 @@ AC_PROG_LIBTOOL # Checks for libraries. # Checks for header files. -AC_CHECK_HEADERS([locale.h stdint.h stdlib.h string.h wchar.h]) +AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE + +# Generate hangulconf.h file +AC_CONFIG_COMMANDS([hangulconfig.h], +[ + outfile=hangulconfig.h + cat > $outfile << _HANGULCONFEOF +/* hangulconfig.h + * This is generated file. Do not directly modify this. + */ + +_HANGULCONFEOF + +if test "$stdbool_h" = "yes" ; then + echo "#include <stdbool.h>" >> $outfile +else + if test "$bool_type" != "yes" ; then + cat >> $outfile << _HANGULCONFEOF +# ifdef __cplusplus + typedef bool _Bool; +# else + typedef unsigned char _Bool; +#endif +_HANGULCONFEOF + fi + + cat >> $outfile << _HANGULCONFEOF +#define bool _Bool +#define false 0 +#define true 1 +#define __bool_true_false_are_defined 1 +_HANGULCONFEOF +fi +], [ + +stdbool_h="$ac_cv_header_stdbool_h" +bool_type="$ac_cv_type__Bool" + +]) + # Checks for library functions. AC_CONFIG_FILES([ Makefile |