8383
8484cd AdventureCoin
8585
86+ # --------------------------
87+ # Confirm Protobuf environment
88+ # --------------------------
89+ echo -e " ${CYAN} >>> Checking protoc version...${RESET} "
90+ which protoc
91+ protoc --version || { echo -e " ${RED} ✖ protoc not found or not working.${RESET} " ; exit 1; }
92+
93+ echo -e " ${CYAN} >>> Checking pkg-config path for protobuf...${RESET} "
94+ pkg-config --modversion protobuf || echo -e " ${RED} ⚠ protobuf not found via pkg-config${RESET} "
95+
8696# --------------------------
8797# Patch configure.ac properly
8898# --------------------------
@@ -166,13 +176,15 @@ else
166176fi
167177
168178# --------------------------
169- # Build
179+ # Configure and Build
170180# --------------------------
181+ CONFIGURE_ARGS=" --with-incompatible-bdb --with-boost-libdir=$BOOST_LIBRARYDIR --with-protobuf=$PROTOBUF_DIR "
182+
183+ echo -e " ${GREEN} >>> Running autogen.sh...${RESET} "
171184chmod +x share/genbuild.sh autogen.sh
172185./autogen.sh
173186
174- CONFIGURE_ARGS=" --with-incompatible-bdb --with-boost-libdir=$BOOST_LIBRARYDIR "
175-
187+ echo -e " ${GREEN} >>> Running configure with args: $CONFIGURE_ARGS ${RESET} "
176188if [[ " $BUILD_CHOICE " == " 1" ]]; then
177189 ./configure $CONFIGURE_ARGS --without-gui
178190elif [[ " $BUILD_CHOICE " == " 2" ]]; then
@@ -181,6 +193,7 @@ elif [[ "$BUILD_CHOICE" == "3" ]]; then
181193 ./configure $CONFIGURE_ARGS --disable-wallet --with-gui=qt5
182194fi
183195
196+ echo -e " ${GREEN} >>> Starting make...${RESET} "
184197make -j" $( sysctl -n hw.logicalcpu) "
185198
186199mkdir -p " $COMPILED_DIR "
0 commit comments