This commit is contained in:
38
Makefile.am
38
Makefile.am
@@ -23,45 +23,29 @@ nolambocoin_miner_SOURCES = \
|
||||
YespowerItc.c YespowerYtn.c \
|
||||
yespower-1.0.1-power2b/sha256-p2b.c yespower-1.0.1-power2b/yespower-opt-p2b.c \
|
||||
yespower-1.0.1-power2b/blake2b.c YespowerMbc.c \
|
||||
<<<<<<< HEAD
|
||||
YespowerARM.c
|
||||
=======
|
||||
YespowerARM.c version.h
|
||||
YespowerARM.c
|
||||
|
||||
# Entferne Header-Dateien aus SOURCES und definiere sie separat
|
||||
include_HEADERS = \
|
||||
elist.h miner.h compat.h
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
elist.h miner.h compat.h version.h
|
||||
|
||||
# Entferne Header-Dateien aus SOURCES und definiere sie separat
|
||||
include_HEADERS = \
|
||||
elist.h miner.h compat.h
|
||||
|
||||
AM_CPPFLAGS = $(JANSSON_INCLUDES) -I$(top_srcdir)/compat/jansson $(PTHREAD_CFLAGS)
|
||||
AM_CPPFLAGS = $(JANSSON_INCLUDES) -I$(top_srcdir)/compat/jansson @PTHREAD_CFLAGS@
|
||||
|
||||
# Allgemeine Compiler-Flags basierend auf den Conditionals setzen
|
||||
if TARGET_RASPBERRY_PI
|
||||
AM_CPPFLAGS += -DTARGET_RASPBERRY_PI
|
||||
if TARGET_RASPBERRY
|
||||
AM_CPPFLAGS += -DTARGET_RASPBERRY
|
||||
endif
|
||||
|
||||
if TARGET_ARM_SERVER
|
||||
AM_CPPFLAGS += -DTARGET_ARM_SERVER
|
||||
if TARGET_NOARM
|
||||
AM_CPPFLAGS += -DTARGET_NOARM
|
||||
endif
|
||||
|
||||
if TARGET_X86_64
|
||||
AM_CPPFLAGS += -DTARGET_X86_64
|
||||
if TARGET_DEFAULT
|
||||
AM_CPPFLAGS += -DTARGET_DEFAULT
|
||||
endif
|
||||
|
||||
if TARGET_MACOS
|
||||
AM_CPPFLAGS += -DTARGET_MACOS
|
||||
endif
|
||||
|
||||
if TARGET_WINDOWS
|
||||
AM_CPPFLAGS += -DTARGET_WINDOWS
|
||||
endif
|
||||
|
||||
nolambocoin_miner_LDFLAGS = $(PTHREAD_LIBS)
|
||||
nolambocoin_miner_LDADD = @CURL_LIBS@ @JANSSON_LIBS@ $(PTHREAD_LIBS) @WS2_LIBS@
|
||||
nolambocoin_miner_LDFLAGS = @PTHREAD_LIBS@
|
||||
nolambocoin_miner_LDADD = @CURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
|
||||
|
||||
if TARGET_WINDOWS
|
||||
nolambocoin_miner_LDADD += @WS2_LIBS@
|
||||
|
||||
110
YespoerARM.c
Normal file
110
YespoerARM.c
Normal file
@@ -0,0 +1,110 @@
|
||||
#include "cpuminer-config.h"
|
||||
#include "version.h"
|
||||
#include "miner.h"
|
||||
|
||||
#include "yespower-1.0.1/yespower.h"
|
||||
#include "yespower-1.0.1/sysendian.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef TARGET_RASPBERRY
|
||||
#define BLOCK_VERSION 0x10000000 // Raspberry Pi spezifische Version
|
||||
#elif defined(TARGET_NOARM)
|
||||
#define BLOCK_VERSION 0x20000000 // Non-ARM spezifische Version
|
||||
#else
|
||||
#define BLOCK_VERSION 0x00000000 // Standard Block-Version
|
||||
#endif
|
||||
|
||||
/* Auswahl der Yespower-Parameter basierend auf der Zielplattform */
|
||||
const yespower_params_t *select_yespower_params(void) {
|
||||
#ifdef TARGET_RASPBERRY
|
||||
static const yespower_params_t params_raspberry = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 2048,
|
||||
.r = 8,
|
||||
.pers = (const uint8_t *)"Raspberry",
|
||||
.perslen = 9 // "Raspberry" hat 9 Zeichen
|
||||
};
|
||||
return ¶ms_raspberry;
|
||||
|
||||
#elif defined(TARGET_NOARM)
|
||||
static const yespower_params_t params_noarm = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Default",
|
||||
.perslen = 7 // "Default" hat 7 Zeichen
|
||||
};
|
||||
return ¶ms_noarm;
|
||||
|
||||
#else
|
||||
static const yespower_params_t params_default = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Default",
|
||||
.perslen = 7 // "Default" hat 7 Zeichen
|
||||
};
|
||||
return ¶ms_default;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Scanhash-Funktion für Yespower */
|
||||
int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) {
|
||||
const yespower_params_t *params = select_yespower_params();
|
||||
|
||||
union {
|
||||
uint8_t u8[80];
|
||||
uint32_t u32[20];
|
||||
} data;
|
||||
union {
|
||||
yespower_binary_t yb;
|
||||
uint32_t u32[8];
|
||||
} hash;
|
||||
|
||||
uint32_t n = pdata[19] - 1; // Startwert für Nonce
|
||||
const uint32_t Htarg = ptarget[7]; // Zielwert für den Hash
|
||||
int i;
|
||||
|
||||
*hashes_done = 0;
|
||||
|
||||
// Konvertiere pdata in Big-Endian für Yespower
|
||||
for (i = 0; i < 19; i++) {
|
||||
be32enc(&data.u32[i], pdata[i]);
|
||||
}
|
||||
|
||||
do {
|
||||
// Nonce inkrementieren und in Big-Endian umwandeln
|
||||
be32enc(&data.u32[19], ++n);
|
||||
|
||||
// Berechnung des Yespower-Hashes
|
||||
if (yespower_tls(data.u8, 80, params, &hash.yb)) {
|
||||
fprintf(stderr, "Thread %d: Fehler bei der Yespower-Berechnung.\n", thr_id);
|
||||
abort();
|
||||
}
|
||||
|
||||
// Prüfe, ob der berechnete Hash unterhalb des Zielwerts liegt
|
||||
if (le32dec(&hash.u32[7]) <= Htarg) {
|
||||
// Konvertiere den berechneten Hash zurück zu Little-Endian
|
||||
for (i = 0; i < 8; i++) {
|
||||
hash.u32[i] = le32dec(&hash.u32[i]);
|
||||
}
|
||||
|
||||
// Überprüfe den vollständigen Zieltest
|
||||
if (fulltest(hash.u32, ptarget)) {
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Aktualisiere die Nonce
|
||||
fprintf(stderr, "Thread %d: Erfolgreicher Hash gefunden! Nonce=%u\n", thr_id, n);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
(*hashes_done)++;
|
||||
|
||||
} while (n < max_nonce && !work_restart[thr_id].restart);
|
||||
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Aktualisiere die Nonce
|
||||
return 0;
|
||||
}
|
||||
151
YespowerARM-c
Normal file
151
YespowerARM-c
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Copyright ...
|
||||
* Lizenztext
|
||||
*
|
||||
* This file implements the scanhash_arm_yespower function for ARM-based mining.
|
||||
*/
|
||||
|
||||
#include "cpuminer-config.h"
|
||||
#include "miner.h"
|
||||
#include "yespower-1.0.1/yespower.h"
|
||||
#include "sysendian.h"
|
||||
#include "version.h" // Enthält Definitionen für BLOCK_VERSION_RASPBERRY, BLOCK_VERSION_NOARM, BLOCK_VERSION_DEFAULT
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <jansson.h>
|
||||
#include <curl/curl.h>
|
||||
#include <pthread.h>
|
||||
|
||||
// Externe Deklarationen aus miner.h
|
||||
extern struct work_restart *work_restart;
|
||||
extern bool fulltest(const uint32_t *hash, const uint32_t *target);
|
||||
|
||||
// Funktion zur Auswahl der Yespower-Parameter basierend auf der Blockversion
|
||||
static const yespower_params_t *select_yespower_params_by_version(int32_t nVersion) {
|
||||
/*
|
||||
* Prüfe, ob das Raspberry-Bit gesetzt ist.
|
||||
*/
|
||||
if ((nVersion & BLOCK_VERSION_RASPBERRY) == BLOCK_VERSION_RASPBERRY) {
|
||||
/*
|
||||
* Beispiel-Parameter für Raspberry (ARM).
|
||||
* N, r und pers/perslen kannst du anpassen.
|
||||
*/
|
||||
static const yespower_params_t params_raspberry = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 2048,
|
||||
.r = 8,
|
||||
.pers = (const uint8_t *)"Raspberry",
|
||||
.perslen = 9 // "Raspberry" hat 9 Zeichen
|
||||
};
|
||||
return ¶ms_raspberry;
|
||||
}
|
||||
/*
|
||||
* Prüfe, ob das Non-ARM-Bit gesetzt ist.
|
||||
*/
|
||||
else if ((nVersion & BLOCK_VERSION_NOARM) == BLOCK_VERSION_NOARM) {
|
||||
/*
|
||||
* Beispiel-Parameter für Non-ARM (z. B. x86).
|
||||
*/
|
||||
static const yespower_params_t params_noarm = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"NoARM",
|
||||
.perslen = 5
|
||||
};
|
||||
return ¶ms_noarm;
|
||||
}
|
||||
/*
|
||||
* Prüfe, ob das Default-Bit gesetzt ist.
|
||||
*/
|
||||
else if ((nVersion & BLOCK_VERSION_DEFAULT) == BLOCK_VERSION_DEFAULT) {
|
||||
static const yespower_params_t params_default = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096, // Standardwert für alle Plattformen
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Default",
|
||||
.perslen = 7 // "Default" hat 7 Zeichen
|
||||
};
|
||||
return ¶ms_default;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* Fallback, falls kein passendes Bit gesetzt ist.
|
||||
*/
|
||||
static const yespower_params_t params_fallback = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Fallback",
|
||||
.perslen = 8
|
||||
};
|
||||
return ¶ms_fallback;
|
||||
}
|
||||
}
|
||||
|
||||
// Scanhash-Funktion (berechnet den Hash für verschiedene Nonces)
|
||||
int scanhash_arm_yespower(int thr_id, uint32_t *pdata,
|
||||
const uint32_t *ptarget,
|
||||
uint32_t max_nonce, unsigned long *hashes_done)
|
||||
{
|
||||
// Wähle die Yespower-Parameter basierend auf der Blockversion
|
||||
const yespower_params_t *params = select_yespower_params_by_version(pdata[0]);
|
||||
|
||||
if (!params) {
|
||||
fprintf(stderr, "Thread %d: Ungültige Yespower-Parameter.\n", thr_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
union {
|
||||
uint8_t u8[80]; // 80 Bytes für den Blockheader
|
||||
uint32_t u32[20];
|
||||
} data;
|
||||
union {
|
||||
yespower_binary_t yb;
|
||||
uint32_t u32[8];
|
||||
} hash;
|
||||
|
||||
uint32_t n = pdata[19] - 1; // Nonce starten
|
||||
const uint32_t Htarg = ptarget[7]; // Zielwert (nur ein Teil des Ziels wird verwendet)
|
||||
int i;
|
||||
|
||||
*hashes_done = 0;
|
||||
|
||||
// Konvertiere pdata in Big-Endian für Yespower
|
||||
for (i = 0; i < 20; i++) { // Korrigiert auf 20, nicht 19
|
||||
be32enc(&data.u32[i], pdata[i]);
|
||||
}
|
||||
|
||||
do {
|
||||
be32enc(&data.u32[19], ++n); // Nonce inkrementieren
|
||||
|
||||
// Berechnung des Yespower-Hashes
|
||||
if (yespower_tls(data.u8, 80, params, &hash.yb)) {
|
||||
fprintf(stderr, "Thread %d: Fehler bei der Yespower-Berechnung.\n", thr_id);
|
||||
abort();
|
||||
}
|
||||
|
||||
// Prüfe, ob der berechnete Hash das Ziel erfüllt
|
||||
if (le32dec(&hash.u32[7]) <= Htarg) {
|
||||
for (i = 0; i < 8; i++) { // Korrigiere die Anzahl auf 8
|
||||
hash.u32[i] = le32dec(&hash.u32[i]);
|
||||
}
|
||||
|
||||
if (fulltest(hash.u32, ptarget)) {
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Nonce aktualisieren
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
(*hashes_done)++;
|
||||
} while (n < max_nonce && !work_restart[thr_id].restart);
|
||||
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Nonce aktualisieren
|
||||
return 0;
|
||||
}
|
||||
@@ -114,4 +114,4 @@ int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n;
|
||||
return 0; // Kein gültiger Block gefunden
|
||||
}
|
||||
}
|
||||
|
||||
110
YespowerARM.c.07.01
Normal file
110
YespowerARM.c.07.01
Normal file
@@ -0,0 +1,110 @@
|
||||
#include "cpuminer-config.h"
|
||||
#include "version.h"
|
||||
#include "miner.h"
|
||||
|
||||
#include "yespower-1.0.1/yespower.h"
|
||||
#include "yespower-1.0.1/sysendian.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef TARGET_RASPBERRY
|
||||
#define BLOCK_VERSION 0x10000000 // Raspberry Pi spezifische Version
|
||||
#elif defined(TARGET_NOARM)
|
||||
#define BLOCK_VERSION 0x20000000 // Non-ARM spezifische Version
|
||||
#else
|
||||
#define BLOCK_VERSION 0x00000000 // Standard Block-Version
|
||||
#endif
|
||||
|
||||
/* Auswahl der Yespower-Parameter basierend auf der Zielplattform */
|
||||
const yespower_params_t *select_yespower_params(void) {
|
||||
#ifdef TARGET_RASPBERRY
|
||||
static const yespower_params_t params_raspberry = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 2048,
|
||||
.r = 8,
|
||||
.pers = (const uint8_t *)"Raspberry",
|
||||
.perslen = 9 // "Raspberry" hat 9 Zeichen
|
||||
};
|
||||
return ¶ms_raspberry;
|
||||
|
||||
#elif defined(TARGET_NOARM)
|
||||
static const yespower_params_t params_noarm = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Default",
|
||||
.perslen = 7 // "Default" hat 7 Zeichen
|
||||
};
|
||||
return ¶ms_noarm;
|
||||
|
||||
#else
|
||||
static const yespower_params_t params_default = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 4096,
|
||||
.r = 16,
|
||||
.pers = (const uint8_t *)"Default",
|
||||
.perslen = 7 // "Default" hat 7 Zeichen
|
||||
};
|
||||
return ¶ms_default;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Scanhash-Funktion für Yespower */
|
||||
int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) {
|
||||
const yespower_params_t *params = select_yespower_params();
|
||||
|
||||
union {
|
||||
uint8_t u8[80];
|
||||
uint32_t u32[20];
|
||||
} data;
|
||||
union {
|
||||
yespower_binary_t yb;
|
||||
uint32_t u32[8];
|
||||
} hash;
|
||||
|
||||
uint32_t n = pdata[19] - 1; // Startwert für Nonce
|
||||
const uint32_t Htarg = ptarget[7]; // Zielwert für den Hash
|
||||
int i;
|
||||
|
||||
*hashes_done = 0;
|
||||
|
||||
// Konvertiere pdata in Big-Endian für Yespower
|
||||
for (i = 0; i < 19; i++) {
|
||||
be32enc(&data.u32[i], pdata[i]);
|
||||
}
|
||||
|
||||
do {
|
||||
// Nonce inkrementieren und in Big-Endian umwandeln
|
||||
be32enc(&data.u32[19], ++n);
|
||||
|
||||
// Berechnung des Yespower-Hashes
|
||||
if (yespower_tls(data.u8, 80, params, &hash.yb)) {
|
||||
fprintf(stderr, "Thread %d: Fehler bei der Yespower-Berechnung.\n", thr_id);
|
||||
abort();
|
||||
}
|
||||
|
||||
// Prüfe, ob der berechnete Hash unterhalb des Zielwerts liegt
|
||||
if (le32dec(&hash.u32[7]) <= Htarg) {
|
||||
// Konvertiere den berechneten Hash zurück zu Little-Endian
|
||||
for (i = 0; i < 8; i++) {
|
||||
hash.u32[i] = le32dec(&hash.u32[i]);
|
||||
}
|
||||
|
||||
// Überprüfe den vollständigen Zieltest
|
||||
if (fulltest(hash.u32, ptarget)) {
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Aktualisiere die Nonce
|
||||
fprintf(stderr, "Thread %d: Erfolgreicher Hash gefunden! Nonce=%u\n", thr_id, n);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
(*hashes_done)++;
|
||||
|
||||
} while (n < max_nonce && !work_restart[thr_id].restart);
|
||||
|
||||
*hashes_done = n - pdata[19] + 1;
|
||||
pdata[19] = n; // Aktualisiere die Nonce
|
||||
return 0;
|
||||
}
|
||||
101
YespowerARM.c_save
Normal file
101
YespowerARM.c_save
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* yespowerARM.c - Yespower Implementation for ARM Architecture
|
||||
*
|
||||
* Copyright 2025, Your Name or Company
|
||||
*/
|
||||
|
||||
#include "cpuminer-config.h"
|
||||
#include "version.h"
|
||||
#include "miner.h"
|
||||
|
||||
#include "yespower-1.0.1/yespower.h"
|
||||
#include "yespower-1.0.1/sysendian.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
// Yespower parameters for ARM-specific optimization
|
||||
static const yespower_params_t yespower_params_arm = {
|
||||
.version = YESPOWER_1_0,
|
||||
.N = 2048, // Reduced for ARM performance
|
||||
.r = 8,
|
||||
.pers = (const uint8_t *)"ARMMining",
|
||||
.perslen = 9 // Length of "ARMMining"
|
||||
};
|
||||
|
||||
// Initialize local data structure for thread-local storage
|
||||
int yespower_arm_init_local(yespower_local_t *local) {
|
||||
return yespower_init_local(local);
|
||||
}
|
||||
|
||||
// Free local thread storage
|
||||
int yespower_arm_free_local(yespower_local_t *local) {
|
||||
return yespower_free_local(local);
|
||||
}
|
||||
|
||||
// Compute the Yespower hash for ARM
|
||||
int yespower_arm_hash(const uint8_t *src, size_t srclen, uint8_t *dst) {
|
||||
yespower_binary_t hash;
|
||||
|
||||
int ret = yespower_tls(src, srclen, &yespower_params_arm, &hash);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Error computing Yespower hash on ARM\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Copy the computed hash to the destination
|
||||
memcpy(dst, hash.uc, 32);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Example usage for mining
|
||||
int scanhash_arm_yespower(int thr_id, uint32_t *data, const uint32_t *target, uint32_t max_nonce, unsigned long *hashes_done) {
|
||||
uint32_t nonce = data[19]; // Nonce is at index 19
|
||||
uint8_t hash[32];
|
||||
int result = 0;
|
||||
|
||||
*hashes_done = 0; // Initialize hash counter
|
||||
|
||||
for (; nonce < max_nonce; nonce++) {
|
||||
data[19] = nonce; // Update the nonce
|
||||
|
||||
// Compute Yespower hash
|
||||
if (yespower_arm_hash((const uint8_t *)data, 80, hash) != 0) {
|
||||
fprintf(stderr, "Thread %d: Error in Yespower hash computation.\n", thr_id);
|
||||
break;
|
||||
}
|
||||
|
||||
// Check if the hash is below the target
|
||||
if (memcmp(hash, target, 32) <= 0) {
|
||||
printf("Thread %d: Valid hash found! Nonce: %u\n", thr_id, nonce);
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
(*hashes_done)++;
|
||||
}
|
||||
|
||||
data[19] = nonce; // Restore the final nonce value
|
||||
return result;
|
||||
}
|
||||
|
||||
// Test function for Yespower on ARM
|
||||
void test_yespower_arm() {
|
||||
uint8_t input[80] = {0};
|
||||
uint8_t output[32] = {0};
|
||||
|
||||
// Example input data
|
||||
memset(input, 0xAB, sizeof(input));
|
||||
|
||||
if (yespower_arm_hash(input, sizeof(input), output) == 0) {
|
||||
printf("Yespower hash successfully computed on ARM:\n");
|
||||
for (int i = 0; i < 32; i++) {
|
||||
printf("%02x", output[i]);
|
||||
}
|
||||
printf("\n");
|
||||
} else {
|
||||
printf("Failed to compute Yespower hash on ARM\n");
|
||||
}
|
||||
}
|
||||
|
||||
3
build.sh
3
build.sh
@@ -3,12 +3,9 @@ make distclean || echo clean
|
||||
rm -f config.status
|
||||
|
||||
sudo chmod +x autogen.sh
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
cd share
|
||||
sudo chmod +x genbuild.sh
|
||||
cd ..
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
# BUILD
|
||||
./autogen.sh
|
||||
./configure CFLAGS="-Wall -O2 -fomit-frame-pointer"
|
||||
|
||||
74
configure.ac
74
configure.ac
@@ -1,7 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
AC_INIT([nolambocoin], [1.0])
|
||||
=======
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
|
||||
AC_PREREQ([2.59c])
|
||||
AC_INIT([nolambocoin-miner], [1.0])
|
||||
@@ -10,8 +6,13 @@ AM_INIT_AUTOMAKE([foreign])
|
||||
AC_CONFIG_SRCDIR([cpu-miner.c])
|
||||
AC_CONFIG_HEADERS([cpuminer-config.h])
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [false])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [false])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [false])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [false])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [false])
|
||||
AM_CONDITIONAL([TARGET_DEFAULT], [false])
|
||||
|
||||
# Füge die Makefile-Konfiguration hinzu
|
||||
AC_CONFIG_FILES([Makefile
|
||||
compat/Makefile
|
||||
@@ -21,26 +22,10 @@ AC_CONFIG_FILES([Makefile
|
||||
# Lade pkg-config Makros
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
EXTERNAL_CFLAGS="$CFLAGS"
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Check for jansson
|
||||
PKG_CHECK_MODULES([JANSSON], [jansson], [], [AC_MSG_ERROR([jansson is required but not installed.])])
|
||||
|
||||
AM_CONDITIONAL([WANT_JANSSON], [true])
|
||||
AC_SUBST([JANSSON_CFLAGS])
|
||||
AC_SUBST([JANSSON_LIBS])
|
||||
|
||||
# Check for libcurl
|
||||
PKG_CHECK_MODULES([CURL], [libcurl], [], [AC_MSG_ERROR([libcurl is required but not installed.])])
|
||||
AC_SUBST([CURL_CFLAGS])
|
||||
AC_SUBST([CURL_LIBS])
|
||||
|
||||
=======
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
# Checks for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
@@ -69,18 +54,6 @@ AC_CHECK_DECLS([be32dec, le32dec, be32enc, le32enc], [],
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS([getopt_long])
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Define WS2_LIBS for Windows (set to empty for non-Windows platforms)
|
||||
WS2_LIBS=""
|
||||
case "$target_os" in
|
||||
mingw*|cygwin*)
|
||||
WS2_LIBS="-lws2_32"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([WS2_LIBS])
|
||||
|
||||
# Platform detection
|
||||
=======
|
||||
# Pthread Flags
|
||||
AC_CHECK_LIB([pthread], [pthread_create],
|
||||
[PTHREAD_LIBS="-lpthread"],
|
||||
@@ -100,7 +73,6 @@ WS2_LIBS=""
|
||||
have_win32=false
|
||||
|
||||
# Plattform-Erkennung
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
UNAME_S=`uname -s`
|
||||
UNAME_M=`uname -m`
|
||||
|
||||
@@ -112,17 +84,17 @@ case "$UNAME_S" in
|
||||
case "$UNAME_M" in
|
||||
armv7l*|armv8*|aarch64*)
|
||||
if grep -q "Raspberry Pi" /proc/device-tree/model 2>/dev/null; then
|
||||
AC_DEFINE([TARGET_RASPBERRY_PI], [1], [Define to 1 if compiling for Raspberry Pi])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [true])
|
||||
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
|
||||
AC_DEFINE([TARGET_RASPBERRY], [1], [Define to 1 if compiling for Raspberry])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [true])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [false])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [false])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [false])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [false])
|
||||
AC_MSG_NOTICE([Target platform: Raspberry Pi])
|
||||
else
|
||||
AC_DEFINE([TARGET_ARM_SERVER], [1], [Define to 1 if compiling for ARM Server])
|
||||
AM_CONDITIONAL([TARGET_ARM_SERVER], [true])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
|
||||
AC_DEFINE([TARGET_NOARM], [1], [Define to 1 if compiling for ARM Server])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [true])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [false])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [false])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [false])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [false])
|
||||
@@ -132,8 +104,8 @@ case "$UNAME_S" in
|
||||
x86_64*)
|
||||
AC_DEFINE([TARGET_X86_64], [1], [Define to 1 if compiling for x86_64])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [true])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
|
||||
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [false])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [false])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [false])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [false])
|
||||
AC_MSG_NOTICE([Target platform: x86_64])
|
||||
@@ -146,8 +118,8 @@ case "$UNAME_S" in
|
||||
Darwin*)
|
||||
AC_DEFINE([TARGET_MACOS], [1], [Define to 1 if compiling for macOS])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [true])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
|
||||
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [false])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [false])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [false])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [false])
|
||||
AC_MSG_NOTICE([Target platform: macOS])
|
||||
@@ -155,8 +127,8 @@ case "$UNAME_S" in
|
||||
CYGWIN*|MINGW32*|MSYS*|MINGW*)
|
||||
AC_DEFINE([TARGET_WINDOWS], [1], [Define to 1 if compiling for Windows])
|
||||
AM_CONDITIONAL([TARGET_WINDOWS], [true])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY_PI], [false])
|
||||
AM_CONDITIONAL([TARGET_ARM_SERVER], [false])
|
||||
AM_CONDITIONAL([TARGET_RASPBERRY], [false])
|
||||
AM_CONDITIONAL([TARGET_NOARM], [false])
|
||||
AM_CONDITIONAL([TARGET_X86_64], [false])
|
||||
AM_CONDITIONAL([TARGET_MACOS], [false])
|
||||
AC_MSG_NOTICE([Target platform: Windows])
|
||||
@@ -166,13 +138,6 @@ case "$UNAME_S" in
|
||||
;;
|
||||
esac
|
||||
|
||||
<<<<<<< HEAD
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
compat/Makefile
|
||||
compat/jansson/Makefile
|
||||
])
|
||||
=======
|
||||
AM_CONDITIONAL([WANT_JANSSON], [true])
|
||||
|
||||
# Checks für libcurl
|
||||
@@ -191,5 +156,4 @@ AC_SUBST([PTHREAD_CFLAGS])
|
||||
AC_SUBST([PTHREAD_LIBS])
|
||||
AC_SUBST([WS2_LIBS])
|
||||
|
||||
>>>>>>> b12eeead377cb6dddc74a57b520c4f3334d3e21f
|
||||
AC_OUTPUT
|
||||
|
||||
775
configure~
775
configure~
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for nolambocoin 1.0.
|
||||
# Generated by GNU Autoconf 2.71 for nolambocoin-miner 1.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
|
||||
@@ -606,10 +606,10 @@ MFLAGS=
|
||||
MAKEFLAGS=
|
||||
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='nolambocoin'
|
||||
PACKAGE_TARNAME='nolambocoin'
|
||||
PACKAGE_NAME='nolambocoin-miner'
|
||||
PACKAGE_TARNAME='nolambocoin-miner'
|
||||
PACKAGE_VERSION='1.0'
|
||||
PACKAGE_STRING='nolambocoin 1.0'
|
||||
PACKAGE_STRING='nolambocoin-miner 1.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -650,6 +650,13 @@ ac_subst_vars='am__EXEEXT_FALSE
|
||||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
WS2_LIBS
|
||||
JANSSON_LIBS
|
||||
JANSSON_CFLAGS
|
||||
CURL_LIBS
|
||||
CURL_CFLAGS
|
||||
WANT_JANSSON_FALSE
|
||||
WANT_JANSSON_TRUE
|
||||
TARGET_WINDOWS_FALSE
|
||||
TARGET_WINDOWS_TRUE
|
||||
TARGET_MACOS_FALSE
|
||||
@@ -660,7 +667,8 @@ TARGET_ARM_SERVER_FALSE
|
||||
TARGET_ARM_SERVER_TRUE
|
||||
TARGET_RASPBERRY_PI_FALSE
|
||||
TARGET_RASPBERRY_PI_TRUE
|
||||
WS2_LIBS
|
||||
PTHREAD_CFLAGS
|
||||
PTHREAD_LIBS
|
||||
ALLOCA
|
||||
RANLIB
|
||||
am__fastdepCCAS_FALSE
|
||||
@@ -687,18 +695,12 @@ CPPFLAGS
|
||||
LDFLAGS
|
||||
CFLAGS
|
||||
CC
|
||||
CURL_LIBS
|
||||
CURL_CFLAGS
|
||||
WANT_JANSSON_FALSE
|
||||
WANT_JANSSON_TRUE
|
||||
JANSSON_LIBS
|
||||
JANSSON_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
MAINT
|
||||
MAINTAINER_MODE_FALSE
|
||||
MAINTAINER_MODE_TRUE
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
AM_BACKSLASH
|
||||
AM_DEFAULT_VERBOSITY
|
||||
AM_DEFAULT_V
|
||||
@@ -782,10 +784,6 @@ target_alias
|
||||
PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
JANSSON_CFLAGS
|
||||
JANSSON_LIBS
|
||||
CURL_CFLAGS
|
||||
CURL_LIBS
|
||||
CC
|
||||
CFLAGS
|
||||
LDFLAGS
|
||||
@@ -793,7 +791,11 @@ LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
CCAS
|
||||
CCASFLAGS'
|
||||
CCASFLAGS
|
||||
CURL_CFLAGS
|
||||
CURL_LIBS
|
||||
JANSSON_CFLAGS
|
||||
JANSSON_LIBS'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -1342,7 +1344,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures nolambocoin 1.0 to adapt to many kinds of systems.
|
||||
\`configure' configures nolambocoin-miner 1.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1391,7 +1393,8 @@ Fine tuning of the installation directories:
|
||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
||||
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
|
||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/nolambocoin]
|
||||
--docdir=DIR documentation root
|
||||
[DATAROOTDIR/doc/nolambocoin-miner]
|
||||
--htmldir=DIR html documentation [DOCDIR]
|
||||
--dvidir=DIR dvi documentation [DOCDIR]
|
||||
--pdfdir=DIR pdf documentation [DOCDIR]
|
||||
@@ -1409,7 +1412,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of nolambocoin 1.0:";;
|
||||
short | recursive ) echo "Configuration of nolambocoin-miner 1.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1433,12 +1436,6 @@ Some influential environment variables:
|
||||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
JANSSON_CFLAGS
|
||||
C compiler flags for JANSSON, overriding pkg-config
|
||||
JANSSON_LIBS
|
||||
linker flags for JANSSON, overriding pkg-config
|
||||
CURL_CFLAGS C compiler flags for CURL, overriding pkg-config
|
||||
CURL_LIBS linker flags for CURL, overriding pkg-config
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
@@ -1449,6 +1446,12 @@ Some influential environment variables:
|
||||
CPP C preprocessor
|
||||
CCAS assembler compiler command (defaults to CC)
|
||||
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
|
||||
CURL_CFLAGS C compiler flags for CURL, overriding pkg-config
|
||||
CURL_LIBS linker flags for CURL, overriding pkg-config
|
||||
JANSSON_CFLAGS
|
||||
C compiler flags for JANSSON, overriding pkg-config
|
||||
JANSSON_LIBS
|
||||
linker flags for JANSSON, overriding pkg-config
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
@@ -1517,7 +1520,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
nolambocoin configure 1.0
|
||||
nolambocoin-miner configure 1.0
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -1925,7 +1928,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by nolambocoin $as_me 1.0, which was
|
||||
It was created by nolambocoin-miner $as_me 1.0, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -2680,9 +2683,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
am__api_version='1.16'
|
||||
|
||||
|
||||
@@ -3196,7 +3196,7 @@ fi
|
||||
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='nolambocoin'
|
||||
PACKAGE='nolambocoin-miner'
|
||||
VERSION='1.0'
|
||||
|
||||
|
||||
@@ -3300,37 +3300,16 @@ END
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers cpuminer-config.h"
|
||||
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||
printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
|
||||
# Check whether --enable-maintainer-mode was given.
|
||||
if test ${enable_maintainer_mode+y}
|
||||
then :
|
||||
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
|
||||
else $as_nop
|
||||
USE_MAINTAINER_MODE=no
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
|
||||
printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
|
||||
if test $USE_MAINTAINER_MODE = yes; then
|
||||
MAINTAINER_MODE_TRUE=
|
||||
MAINTAINER_MODE_FALSE='#'
|
||||
else
|
||||
MAINTAINER_MODE_TRUE='#'
|
||||
MAINTAINER_MODE_FALSE=
|
||||
fi
|
||||
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
# Füge die Makefile-Konfiguration hinzu
|
||||
ac_config_files="$ac_config_files Makefile compat/Makefile compat/jansson/Makefile"
|
||||
|
||||
|
||||
|
||||
EXTERNAL_CFLAGS="$CFLAGS"
|
||||
|
||||
# Check for jansson
|
||||
# Lade pkg-config Makros
|
||||
|
||||
|
||||
|
||||
@@ -3462,162 +3441,32 @@ printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for jansson" >&5
|
||||
printf %s "checking for jansson... " >&6; }
|
||||
|
||||
if test -n "$JANSSON_CFLAGS"; then
|
||||
pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "jansson") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_JANSSON_CFLAGS=`$PKG_CONFIG --cflags "jansson" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||
printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
|
||||
# Check whether --enable-maintainer-mode was given.
|
||||
if test ${enable_maintainer_mode+y}
|
||||
then :
|
||||
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
|
||||
else $as_nop
|
||||
USE_MAINTAINER_MODE=no
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
|
||||
printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
|
||||
if test $USE_MAINTAINER_MODE = yes; then
|
||||
MAINTAINER_MODE_TRUE=
|
||||
MAINTAINER_MODE_FALSE='#'
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$JANSSON_LIBS"; then
|
||||
pkg_cv_JANSSON_LIBS="$JANSSON_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "jansson") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_JANSSON_LIBS=`$PKG_CONFIG --libs "jansson" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
MAINTAINER_MODE_TRUE='#'
|
||||
MAINTAINER_MODE_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
JANSSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "jansson" 2>&1`
|
||||
else
|
||||
JANSSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "jansson" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$JANSSON_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "jansson is required but not installed." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
as_fn_error $? "jansson is required but not installed." "$LINENO" 5
|
||||
else
|
||||
JANSSON_CFLAGS=$pkg_cv_JANSSON_CFLAGS
|
||||
JANSSON_LIBS=$pkg_cv_JANSSON_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
if true; then
|
||||
WANT_JANSSON_TRUE=
|
||||
WANT_JANSSON_FALSE='#'
|
||||
else
|
||||
WANT_JANSSON_TRUE='#'
|
||||
WANT_JANSSON_FALSE=
|
||||
fi
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
# Check for libcurl
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcurl" >&5
|
||||
printf %s "checking for libcurl... " >&6; }
|
||||
|
||||
if test -n "$CURL_CFLAGS"; then
|
||||
pkg_cv_CURL_CFLAGS="$CURL_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$CURL_LIBS"; then
|
||||
pkg_cv_CURL_LIBS="$CURL_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libcurl") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl" 2>&1`
|
||||
else
|
||||
CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$CURL_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "libcurl is required but not installed." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
as_fn_error $? "libcurl is required but not installed." "$LINENO" 5
|
||||
else
|
||||
CURL_CFLAGS=$pkg_cv_CURL_CFLAGS
|
||||
CURL_LIBS=$pkg_cv_CURL_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
|
||||
EXTERNAL_CFLAGS="$CFLAGS"
|
||||
|
||||
# Checks for programs
|
||||
|
||||
@@ -5795,16 +5644,81 @@ then :
|
||||
fi
|
||||
|
||||
|
||||
# Define WS2_LIBS for Windows (set to empty for non-Windows platforms)
|
||||
# Pthread Flags
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
|
||||
printf %s "checking for pthread_create in -lpthread... " >&6; }
|
||||
if test ${ac_cv_lib_pthread_pthread_create+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char pthread_create ();
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_lib_pthread_pthread_create=yes
|
||||
else $as_nop
|
||||
ac_cv_lib_pthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
|
||||
printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_pthread_pthread_create" = xyes
|
||||
then :
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
else $as_nop
|
||||
as_fn_error $? "pthread library not found." "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Ersetze AC_CHECK_FLAGS durch AC_COMPILE_IFELSE
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -pthread flag is supported" >&5
|
||||
printf %s "checking whether -pthread flag is supported... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
else $as_nop
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CFLAGS" >&5
|
||||
printf "%s\n" "$PTHREAD_CFLAGS" >&6; }
|
||||
|
||||
|
||||
# WS2 Libraries (Windows)
|
||||
WS2_LIBS=""
|
||||
case "$target_os" in
|
||||
mingw*|cygwin*)
|
||||
WS2_LIBS="-lws2_32"
|
||||
;;
|
||||
esac
|
||||
have_win32=false
|
||||
|
||||
|
||||
# Platform detection
|
||||
# Plattform-Erkennung
|
||||
UNAME_S=`uname -s`
|
||||
UNAME_M=`uname -m`
|
||||
|
||||
@@ -5829,6 +5743,40 @@ else
|
||||
TARGET_RASPBERRY_PI_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_ARM_SERVER_TRUE=
|
||||
TARGET_ARM_SERVER_FALSE='#'
|
||||
else
|
||||
TARGET_ARM_SERVER_TRUE='#'
|
||||
TARGET_ARM_SERVER_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_X86_64_TRUE=
|
||||
TARGET_X86_64_FALSE='#'
|
||||
else
|
||||
TARGET_X86_64_TRUE='#'
|
||||
TARGET_X86_64_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_MACOS_TRUE=
|
||||
TARGET_MACOS_FALSE='#'
|
||||
else
|
||||
TARGET_MACOS_TRUE='#'
|
||||
TARGET_MACOS_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_WINDOWS_TRUE=
|
||||
TARGET_WINDOWS_FALSE='#'
|
||||
else
|
||||
TARGET_WINDOWS_TRUE='#'
|
||||
TARGET_WINDOWS_FALSE=
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target platform: Raspberry Pi" >&5
|
||||
printf "%s\n" "$as_me: Target platform: Raspberry Pi" >&6;}
|
||||
else
|
||||
|
||||
printf "%s\n" "#define TARGET_ARM_SERVER 1" >>confdefs.h
|
||||
@@ -5841,6 +5789,40 @@ else
|
||||
TARGET_ARM_SERVER_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_RASPBERRY_PI_TRUE=
|
||||
TARGET_RASPBERRY_PI_FALSE='#'
|
||||
else
|
||||
TARGET_RASPBERRY_PI_TRUE='#'
|
||||
TARGET_RASPBERRY_PI_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_X86_64_TRUE=
|
||||
TARGET_X86_64_FALSE='#'
|
||||
else
|
||||
TARGET_X86_64_TRUE='#'
|
||||
TARGET_X86_64_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_MACOS_TRUE=
|
||||
TARGET_MACOS_FALSE='#'
|
||||
else
|
||||
TARGET_MACOS_TRUE='#'
|
||||
TARGET_MACOS_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_WINDOWS_TRUE=
|
||||
TARGET_WINDOWS_FALSE='#'
|
||||
else
|
||||
TARGET_WINDOWS_TRUE='#'
|
||||
TARGET_WINDOWS_FALSE=
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target platform: ARM Server" >&5
|
||||
printf "%s\n" "$as_me: Target platform: ARM Server" >&6;}
|
||||
fi
|
||||
;;
|
||||
x86_64*)
|
||||
@@ -5855,6 +5837,40 @@ else
|
||||
TARGET_X86_64_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_RASPBERRY_PI_TRUE=
|
||||
TARGET_RASPBERRY_PI_FALSE='#'
|
||||
else
|
||||
TARGET_RASPBERRY_PI_TRUE='#'
|
||||
TARGET_RASPBERRY_PI_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_ARM_SERVER_TRUE=
|
||||
TARGET_ARM_SERVER_FALSE='#'
|
||||
else
|
||||
TARGET_ARM_SERVER_TRUE='#'
|
||||
TARGET_ARM_SERVER_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_MACOS_TRUE=
|
||||
TARGET_MACOS_FALSE='#'
|
||||
else
|
||||
TARGET_MACOS_TRUE='#'
|
||||
TARGET_MACOS_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_WINDOWS_TRUE=
|
||||
TARGET_WINDOWS_FALSE='#'
|
||||
else
|
||||
TARGET_WINDOWS_TRUE='#'
|
||||
TARGET_WINDOWS_FALSE=
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target platform: x86_64" >&5
|
||||
printf "%s\n" "$as_me: Target platform: x86_64" >&6;}
|
||||
;;
|
||||
*)
|
||||
as_fn_error $? "Unsupported architecture: $UNAME_M" "$LINENO" 5
|
||||
@@ -5873,6 +5889,40 @@ else
|
||||
TARGET_MACOS_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_RASPBERRY_PI_TRUE=
|
||||
TARGET_RASPBERRY_PI_FALSE='#'
|
||||
else
|
||||
TARGET_RASPBERRY_PI_TRUE='#'
|
||||
TARGET_RASPBERRY_PI_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_ARM_SERVER_TRUE=
|
||||
TARGET_ARM_SERVER_FALSE='#'
|
||||
else
|
||||
TARGET_ARM_SERVER_TRUE='#'
|
||||
TARGET_ARM_SERVER_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_X86_64_TRUE=
|
||||
TARGET_X86_64_FALSE='#'
|
||||
else
|
||||
TARGET_X86_64_TRUE='#'
|
||||
TARGET_X86_64_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_WINDOWS_TRUE=
|
||||
TARGET_WINDOWS_FALSE='#'
|
||||
else
|
||||
TARGET_WINDOWS_TRUE='#'
|
||||
TARGET_WINDOWS_FALSE=
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target platform: macOS" >&5
|
||||
printf "%s\n" "$as_me: Target platform: macOS" >&6;}
|
||||
;;
|
||||
CYGWIN*|MINGW32*|MSYS*|MINGW*)
|
||||
|
||||
@@ -5886,13 +5936,208 @@ else
|
||||
TARGET_WINDOWS_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_RASPBERRY_PI_TRUE=
|
||||
TARGET_RASPBERRY_PI_FALSE='#'
|
||||
else
|
||||
TARGET_RASPBERRY_PI_TRUE='#'
|
||||
TARGET_RASPBERRY_PI_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_ARM_SERVER_TRUE=
|
||||
TARGET_ARM_SERVER_FALSE='#'
|
||||
else
|
||||
TARGET_ARM_SERVER_TRUE='#'
|
||||
TARGET_ARM_SERVER_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_X86_64_TRUE=
|
||||
TARGET_X86_64_FALSE='#'
|
||||
else
|
||||
TARGET_X86_64_TRUE='#'
|
||||
TARGET_X86_64_FALSE=
|
||||
fi
|
||||
|
||||
if false; then
|
||||
TARGET_MACOS_TRUE=
|
||||
TARGET_MACOS_FALSE='#'
|
||||
else
|
||||
TARGET_MACOS_TRUE='#'
|
||||
TARGET_MACOS_FALSE=
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target platform: Windows" >&5
|
||||
printf "%s\n" "$as_me: Target platform: Windows" >&6;}
|
||||
;;
|
||||
*)
|
||||
as_fn_error $? "Unsupported operating system: $UNAME_S" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
|
||||
ac_config_files="$ac_config_files Makefile compat/Makefile compat/jansson/Makefile"
|
||||
if true; then
|
||||
WANT_JANSSON_TRUE=
|
||||
WANT_JANSSON_FALSE='#'
|
||||
else
|
||||
WANT_JANSSON_TRUE='#'
|
||||
WANT_JANSSON_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
# Checks für libcurl
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcurl >= 7.0" >&5
|
||||
printf %s "checking for libcurl >= 7.0... " >&6; }
|
||||
|
||||
if test -n "$CURL_CFLAGS"; then
|
||||
pkg_cv_CURL_CFLAGS="$CURL_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libcurl >= 7.0") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$CURL_LIBS"; then
|
||||
pkg_cv_CURL_LIBS="$CURL_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libcurl >= 7.0") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl >= 7.0" 2>&1`
|
||||
else
|
||||
CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl >= 7.0" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$CURL_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "libcurl is required but not installed." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
as_fn_error $? "libcurl is required but not installed." "$LINENO" 5
|
||||
else
|
||||
CURL_CFLAGS=$pkg_cv_CURL_CFLAGS
|
||||
CURL_LIBS=$pkg_cv_CURL_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
# Checks für jansson
|
||||
|
||||
pkg_failed=no
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for jansson >= 2.0" >&5
|
||||
printf %s "checking for jansson >= 2.0... " >&6; }
|
||||
|
||||
if test -n "$JANSSON_CFLAGS"; then
|
||||
pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson >= 2.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "jansson >= 2.0") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_JANSSON_CFLAGS=`$PKG_CONFIG --cflags "jansson >= 2.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$JANSSON_LIBS"; then
|
||||
pkg_cv_JANSSON_LIBS="$JANSSON_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jansson >= 2.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "jansson >= 2.0") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_JANSSON_LIBS=`$PKG_CONFIG --libs "jansson >= 2.0" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
JANSSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "jansson >= 2.0" 2>&1`
|
||||
else
|
||||
JANSSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "jansson >= 2.0" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$JANSSON_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "jansson is required but not installed." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
as_fn_error $? "jansson is required but not installed." "$LINENO" 5
|
||||
else
|
||||
JANSSON_CFLAGS=$pkg_cv_JANSSON_CFLAGS
|
||||
JANSSON_LIBS=$pkg_cv_JANSSON_LIBS
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -6023,10 +6268,6 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${WANT_JANSSON_TRUE}" && test -z "${WANT_JANSSON_FALSE}"; then
|
||||
as_fn_error $? "conditional \"WANT_JANSSON\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
|
||||
as_fn_error $? "conditional \"AMDEP\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
@@ -6059,6 +6300,90 @@ if test -z "${TARGET_WINDOWS_TRUE}" && test -z "${TARGET_WINDOWS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_WINDOWS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_ARM_SERVER_TRUE}" && test -z "${TARGET_ARM_SERVER_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_ARM_SERVER\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_RASPBERRY_PI_TRUE}" && test -z "${TARGET_RASPBERRY_PI_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_RASPBERRY_PI\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_X86_64_TRUE}" && test -z "${TARGET_X86_64_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_X86_64\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_MACOS_TRUE}" && test -z "${TARGET_MACOS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_MACOS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_WINDOWS_TRUE}" && test -z "${TARGET_WINDOWS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_WINDOWS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_X86_64_TRUE}" && test -z "${TARGET_X86_64_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_X86_64\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_RASPBERRY_PI_TRUE}" && test -z "${TARGET_RASPBERRY_PI_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_RASPBERRY_PI\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_ARM_SERVER_TRUE}" && test -z "${TARGET_ARM_SERVER_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_ARM_SERVER\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_MACOS_TRUE}" && test -z "${TARGET_MACOS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_MACOS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_WINDOWS_TRUE}" && test -z "${TARGET_WINDOWS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_WINDOWS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_MACOS_TRUE}" && test -z "${TARGET_MACOS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_MACOS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_RASPBERRY_PI_TRUE}" && test -z "${TARGET_RASPBERRY_PI_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_RASPBERRY_PI\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_ARM_SERVER_TRUE}" && test -z "${TARGET_ARM_SERVER_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_ARM_SERVER\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_X86_64_TRUE}" && test -z "${TARGET_X86_64_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_X86_64\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_WINDOWS_TRUE}" && test -z "${TARGET_WINDOWS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_WINDOWS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_WINDOWS_TRUE}" && test -z "${TARGET_WINDOWS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_WINDOWS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_RASPBERRY_PI_TRUE}" && test -z "${TARGET_RASPBERRY_PI_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_RASPBERRY_PI\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_ARM_SERVER_TRUE}" && test -z "${TARGET_ARM_SERVER_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_ARM_SERVER\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_X86_64_TRUE}" && test -z "${TARGET_X86_64_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_X86_64\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${TARGET_MACOS_TRUE}" && test -z "${TARGET_MACOS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"TARGET_MACOS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${WANT_JANSSON_TRUE}" && test -z "${WANT_JANSSON_FALSE}"; then
|
||||
as_fn_error $? "conditional \"WANT_JANSSON\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
|
||||
: "${CONFIG_STATUS=./config.status}"
|
||||
ac_write_fail=0
|
||||
@@ -6449,7 +6774,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by nolambocoin $as_me 1.0, which was
|
||||
This file was extended by nolambocoin-miner $as_me 1.0, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -6517,7 +6842,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
nolambocoin config.status 1.0
|
||||
nolambocoin-miner config.status 1.0
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -6647,10 +6972,10 @@ for ac_config_target in $ac_config_targets
|
||||
do
|
||||
case $ac_config_target in
|
||||
"cpuminer-config.h") CONFIG_HEADERS="$CONFIG_HEADERS cpuminer-config.h" ;;
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"compat/Makefile") CONFIG_FILES="$CONFIG_FILES compat/Makefile" ;;
|
||||
"compat/jansson/Makefile") CONFIG_FILES="$CONFIG_FILES compat/jansson/Makefile" ;;
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
||||
17
cpu-miner.c
17
cpu-miner.c
@@ -11,7 +11,8 @@
|
||||
#include "version.h"
|
||||
#include "cpuminer-config.h"
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "version.h"
|
||||
//#include "YespowerARM.c"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -195,7 +196,7 @@ Options:\n\
|
||||
YespowerItc: Intercoin\n\
|
||||
YespowerSugar: Sugarchain\n\
|
||||
YespowerMbc: power2b for MicroBitcoin\n\
|
||||
YespowerARM: NoLamboCoin\n\
|
||||
YespowerARM: NoLamboCoin\n\
|
||||
-o, --url=URL URL of mining server\n\
|
||||
-O, --userpass=U:P username:password pair for mining server\n\
|
||||
-u, --user=USERNAME username for mining server\n\
|
||||
@@ -1124,6 +1125,16 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
|
||||
diff_to_target(work->target, sctx->job.diff / 65536.0);
|
||||
}
|
||||
|
||||
int get_dynamic_block_version() {
|
||||
#ifdef TARGET_RASPBERRY
|
||||
return BLOCK_VERSION_RASPBERRY;
|
||||
#elif defined(TARGET_NOARM)
|
||||
return BLOCK_VERSION_NOARM;
|
||||
#else
|
||||
return BLOCK_VERSION_DEFAULT;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *miner_thread(void *userdata)
|
||||
{
|
||||
struct thr_info *mythr = userdata;
|
||||
@@ -1301,7 +1312,7 @@ static void *miner_thread(void *userdata)
|
||||
|
||||
case ALGO_ARM_YESPOWER_1_0_1:
|
||||
rc = scanhash_arm_yespower(
|
||||
thr_id, work.data, work.target, max_nonce, &hashes_done
|
||||
thr_id, work.data, work.target, max_nonce, &hashes_done, get_dynamic_block_version()
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
5
miner.h
5
miner.h
@@ -135,6 +135,9 @@ static inline void le32enc(void *pp, uint32_t x)
|
||||
void sha256_init(uint32_t *state);
|
||||
void sha256_transform(uint32_t *state, const uint32_t *block, int swap);
|
||||
void sha256d(unsigned char *hash, const unsigned char *data, int len);
|
||||
//const yespower_params_t *select_yespower_params(int block_version);
|
||||
void print_version_debug();
|
||||
void create_block(uint32_t *pdata);
|
||||
|
||||
extern int scanhash_sugar_yespower(int thr_id, uint32_t *pdata,
|
||||
const uint32_t *ptarget,
|
||||
@@ -174,7 +177,7 @@ extern int scanhash_mbc_yespower(int thr_id, uint32_t *pdata,
|
||||
|
||||
extern int scanhash_arm_yespower(int thr_id, uint32_t *pdata,
|
||||
const uint32_t *ptarget,
|
||||
uint32_t max_nonce, unsigned long *hashes_done);
|
||||
uint32_t max_nonce, unsigned long *hashes_done, int nVersion);
|
||||
|
||||
struct thr_info {
|
||||
int id;
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
// version.h
|
||||
|
||||
#pragma once
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
// Definiere Blockversionskonstanten
|
||||
#define BLOCK_VERSION_RASPBERRY 0x10000000
|
||||
#define BLOCK_VERSION_NOARM 0x20000000
|
||||
#define BLOCK_VERSION_NOARM 0x20000000
|
||||
#define BLOCK_VERSION_DEFAULT 0x00000000
|
||||
|
||||
int get_dynamic_block_version();
|
||||
|
||||
#endif // VERSION_H
|
||||
|
||||
Reference in New Issue
Block a user