forked from linux-ha-japan/pm_extra_tools
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure.ac
More file actions
71 lines (60 loc) · 1.87 KB
/
configure.ac
File metadata and controls
71 lines (60 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
# TODO : In the future, when using separate versions for RHEL8 and RHEL9, please enable the following processing.
#m4_define([CURRENT_VERSION],
# m4_esyscmd([
# if [ `cat /etc/redhat-release | sed -e 's/.*\s\([0-9]\)\..*/\1/'` = "9" ];then
# printf "1.5"
# else
# printf "1.4"
# fi
# ]))
#
#AC_INIT(pm_extra_tools, [CURRENT_VERSION])
m4_define([CURRENT_VERSION], [1.7])
AC_INIT(pm_extra_tools, [CURRENT_VERSION])
AM_INIT_AUTOMAKE
PM_PCSGEN_VER=CURRENT_VERSION
AC_SUBST(PM_PCSGEN_VER)
# Checks for programs.
AC_PROG_LN_S
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_SUBST([current_rhel],
m4_esyscmd([
cat /etc/redhat-release | sed -e 's/.*\s\([0-9]\+\)\..*/\1/'
]))
RSCS_PATH="${srcdir}/resources"
case $current_rhel in
10)
PGSQL_RA="$RSCS_PATH/pgsql.rhel10"
HULFT_RA="$RSCS_PATH/hulft.rhel10"
;;
9)
PGSQL_RA="$RSCS_PATH/pgsql.rhel9"
HULFT_RA="$RSCS_PATH/hulft.rhel9"
;;
8)
PGSQL_RA="$RSCS_PATH/pgsql.rhel8"
HULFT_RA="$RSCS_PATH/hulft.rhel8"
;;
*) AC_MSG_ERROR([Unsupported RHEL version: $current_rhel]) ;;
esac
AC_CONFIG_COMMANDS([resources_setup], [
rm -rf resources/pgsql
cp "$pgsql_ra" resources/pgsql
#rm -rf resources/hulft
#cp "$hulft_ra" resources/hulft
], [
pgsql_ra=$PGSQL_RA
hulft_ra=$HULFT_RA
])
AC_CONFIG_FILES([Makefile
pm_extra_tools.spec
pm_pcsgen/Makefile
pm_pcsgen/pm_pcsgen.py
resources/Makefile])
AC_OUTPUT